Skip to content

Back Transliteration of Persian names to English names

Notifications You must be signed in to change notification settings

alisha17/persian-to-english

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Back-transliteration of Persian names to English names

This repo has the project specifications, code and the final report.

Run this project by this command:

python edit_distance.py
  1. Edit the paths in the code where we are opening the files, namely train.txt and names.txt.

    with open('/home/alisha/Desktop/KT/2017S1-90049P1-data-dos/train.txt') as f:

    --> Change it to the path where the files reside in your system.

    with open('/home/alisha/Desktop/KT/2017S1-90049P1-data-dos/names.txt') as f:

    --> Here also

    NOTE: I HAVE NOT ATTACHED THE DATASETS AS THEY ARE NON-REPRODUCIBLE. HOWEVER, SIMILAR DATASETS ARE EASILY AVAILABLE ONLINE

  2. To test the output files, precision and recall for the following methods:

    a) Levenshtein Distance: The distance() method calculates this. Simply run the python script and you will get 'edited.txt' output file in the folder where you are running the script and the precision and recall will get printed on the terminal/console.

    b) Jaccard Index: Uncomment the following:

    import distance
    edit_dist = distance.jaccard(ke, item)

    And now run the python script.

    c) Modification of BLOSUM matrix in combination with Soundex method Uncomment the following:

    edit_dist = matchWords(ke, item)

    And now run the python script. Note: This method will take longer than the other ones.

This was a part of my academic course 'Knowledge Technologies'. The lecture sets are here: blog

About

Back Transliteration of Persian names to English names

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages