Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding dictionary for Arabic #129

Merged
merged 5 commits into from
Aug 29, 2022
Merged

Adding dictionary for Arabic #129

merged 5 commits into from
Aug 29, 2022

Conversation

msalhab96
Copy link
Contributor

@msalhab96 msalhab96 commented Jun 23, 2022

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))

@barrust barrust merged commit 1ef8359 into barrust:master Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants