Skip to content

Implement Voikko Spell and Divvun spell Integration #238

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

satti-hari-krishna-reddy
Copy link

@satti-hari-krishna-reddy satti-hari-krishna-reddy commented Jul 26, 2024

Description

This pull request introduces the integration of both Voikko and Divvun spell checkers into the Apertium APy. It is designed to handle spell-checking requests using either Voikkospell or Divvunspell based on user preference.

Features

  • Automatically searches for installed Voikko modes and uses them for spell checking.
  • Splits input text into tokens and checks each token using the selected spell checker.
  • Returns known status and suggestions for each token.
  • Handles errors when the requested spelling mode is not installed.
  • Allows toggling between Voikko and Divvun spell checkers via a query parameter.

Usage

To toggle between Voikko and Divvun spell checkers, use the spellchecker query parameter. The default spell checker is Voikko.

Example Requests

Voikko:

curl 'http://localhost:2737/spellCheck?q=қазақша билмеймін&lang=kaz'

or

curl 'http://localhost:2737/spellCheck?q=қазақша билмеймін&lang=kaz&spellchecker=voikko'

DivunnSpell:

curl 'http://localhost:2737/spellCheck?q=қазақша билмеймін&lang=kaz&spellchecker=divvun'

Expected Output
For the input text "қазақша билмеймін", the output will be:

[
  {"token": "қазақша", "known": true, "sugg": []},
  {"token": "билмеймін", "known": false, "sugg": ["білмеймін", "билеймін", "билемеймін", "бөлмеймін", "білмейміз"]}
]

@satti-hari-krishna-reddy satti-hari-krishna-reddy changed the title Implement Voikko Spell Checker Integration Implement Voikko Spell and Divvun spell Integration Jul 28, 2024
@satti-hari-krishna-reddy
Copy link
Author

@jonorthwash Could you please review the PR.

@TinoDidriksen TinoDidriksen force-pushed the master branch 3 times, most recently from e88afb1 to ee3db28 Compare March 25, 2025 11:42
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.

1 participant