Convert names between Latin Script and Modern Persian Script. تبدیل نام از رسمالخط فارسی مدرن، به لاتین
-
The following method is used:
-
remove paranthesis from the query, but not the content.
-
If a first or last name is queried, check against the existing list of firstname.csv or lastname.csv and return if match found.
-
If the exact string is not found, check the other csv file (first>last, or last>first) for an exact match. return if match found.
-
If match is not found, but the Persian query has a space or half-space, split the query into substrings, via the whitespace. Search for each substring separately, and concat the result back together and return the result. Log the substrings and their result.
-
If match is not found, add the query in a new line to the file backlog.txt
-
If there is paranthesis in a record, produce the result, but warn the user
-
If anything except these letters [آبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی] and the ignore list comes up, warn the user.
-
Read a list of persian first and lastnames, and transcribe each of them, and write the result in a separate file.
-
English Hashtags should follow camel-case for firstname and lastname.
In Persian string matching:
- Ignore the space or half-space
- Following chars are ignored: َ - ُ - ِ - ّ - ، - ء - ً - ٌ - ٍ ّ
- ة=ه
- ي=ی
- On Ubuntu, make sure gradle is installed.
- To run the JUnit Tests, run
./gradlew test --info