This Node.js script leverages GPT-4 to generate various spellings for Arabic names in Latin characters. It's an invaluable tool for creating search aliases or accurately looking up names across different languages, focusing on the complexity and variability of Arabic name transliteration into Latin script.
- Generate multiple spellings for Arabic names in English, Turkish, and French.
- Customizable input from any list of names.
- Option to convert detailed output into a minimal format.
Ensure Node.js is installed on your system to use this script. Follow these steps to get started:
-
Clone the repository:
git clone seemorg/arabic-name-aliases
-
Navigate to the project directory:
cd arabic-name-spellings
-
Prepare the Input List: Create an
input.json
file with the names you wish to process. For example, to generate spellings for "محمد", yourinput.json
should look like this:["محمد"]
-
Generate Spellings: Run the script to generate different spellings for the names:
node script.js
This will produce an
output.json
with the structure:{ "محمد": { "english": ["Mohammed", "Muhammad", "Mohammad"], "turkish": ["Mehmet"], "french": ["Mohammed", "Mohamed", "Muhammad"] } }
-
Optional - Minimal Format Conversion: To convert the detailed output into a minimal format, run:
node convert-to-minimal.js
This produces an
output-minimal.json
like:"محمد": ["Muhammad", "Mohammed", "Mohammad", "Mehmet", "Mohamed"]
To generate spellings for other names, simply modify the input.json
file accordingly. The script is designed to handle lists of names, so you can include as many as needed:
["محمد", "أحمد", "يوسف"]
Contributions to the Arabic Name Spellings project are welcomed. Please create a PR with any bug fixes or improvements
This project is open source and available under the MIT License.