Skip to content

sulujulianto/your-name-in-japanese

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Katakana Name Converter

Python License Version

A Python program that converts names and words into Japanese katakana characters with proper pronunciation adaptation.

📝 Description

This program takes English names or words as input and converts them into Japanese katakana script. It applies various phonetic rules and transformations to make the pronunciation more natural in Japanese.

✨ Features

  • Double Letter Simplification: Removes duplicate consecutive letters (e.g., "aa" → "a")
  • Phonetic Adaptations: Converts difficult sound combinations to Japanese-friendly alternatives
  • Special Character Handling: Replaces non-Japanese sounds with closest Japanese equivalents
  • Consonant Cluster Processing: Handles consonant combinations by adding vowels or removing letters
  • Automatic Katakana Conversion: Converts the processed romanized text to katakana characters
  • Interactive Interface: User-friendly command-line interface

🚀 Installation

  1. Make sure you have Python 3.6 or higher installed
  2. Download the katakana_converter.py file
  3. No additional dependencies required!

📖 Usage

Command Line Interface

Run the program from your terminal:

python katakana_converter.py

Then enter names or words when prompted:

Katakana Name Converter
Type 'quit' to exit

Enter name: Michael

Using as a Module

You can also import and use the converter in your own Python scripts:

from katakana_converter import KatakanaConverter

# Create converter instance
converter = KatakanaConverter()

# Convert a name
result = converter.convert("Michael")

print(f"Original: {result['original']}")
print(f"Romanized: {result['romanized']}")
print(f"Katakana: {result['katakana']}")

🔄 Conversion Process

The program applies several transformation steps:

  1. Normalization: Convert input to lowercase
  2. Double Letter Removal: Simplify repeated letters
  3. End Pattern Replacement: Handle common ending patterns
  4. Exception Handling: Replace problematic letter combinations
  5. Y-Combination Processing: Handle 'y' combinations specially
  6. Consonant Cluster Resolution: Add vowels or remove consonants as needed
  7. Final Consonant Handling: Add 'u' to final consonants (except 'h' and 'n')
  8. Katakana Conversion: Map romanized text to katakana characters

📋 Examples

Input Romanized Katakana
Michael maikaru マイカル
Elizabeth erizabesu エリザベス
Smith sumisu スミス
Christopher kurisutofua クリストファ
McDonald makudonarudo マクドナルド

🎯 Supported Transformations

Common Letter Replacements

  • wibi
  • vibi
  • phf
  • ths
  • ckk
  • schsh
  • ingin

Ending Patterns

  • era
  • ded
  • kek

Special Handling

  • German umlauts (ä, ü, ö)
  • Double consonants
  • Y-combinations
  • Consonant clusters

⚡ Requirements

  • Python 3.6+
  • No external dependencies

🤝 Contributing

Feel free to submit issues or pull requests to improve the conversion rules or add new features.

📄 License

This project is open source and available under the MIT License.

📈 Changelog

See CHANGELOG.md for a complete list of changes and version history.


⭐ If you find this project helpful, please give it a star on GitHub!

About

Create your name in japanese with simplely code python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages