I used the Arabic dataset provided by opus to create an Arabic dictionary for the Arabic language, in this pull request I've made the following:
Added the frequency dictionary to resources.
Added the original/full data to data/
Added ar_exclude and ar_include to data/
modified the supported languages by adding ar
modified the README file by adding an Arabic spell checker and added Arabic to the supported languages.
I have tested the code and it works, here's an example
from spellchecker import SpellChecker
spell = SpellChecker(language='ar')
# find those words that may be misspelled
misspelled = spell.unknown(["اذلهب", "كتا", "اساح"])
for word in misspelled:
print(word)
# Get a list of `likely` options
print(spell.candidates(word))
# Get the one `most likely` answer
print(spell.correction(word))
I used the Arabic dataset provided by opus to create an Arabic dictionary for the Arabic language, in this pull request I've made the following:
I have tested the code and it works, here's an example