A web app for Eastern Armenian language tooling — starting with spellchecking, with a verb conjugator planned next.
Early scaffold. Currently working:
- Rails app with PostgreSQL
SpellCheckerservice wrapping Hunspell viaffi-hunspell, using the vendoredhy_AM(Eastern Armenian) dictionary
Not yet built: web UI, conjugation engine, custom-word extension table.
- Ruby on Rails
- PostgreSQL
- ffi-hunspell for spellchecking
- RSpec for testing
The Hunspell dictionary (lib/dictionaries/hy_AM/) is vendored from
martakert/hyspell (CC0-1.0). See
lib/dictionaries/hy_AM/SOURCE.md for pull date and details.
Docker
docker compose run --rm -- web
# inside container:
bundle install
bin/rails db:create db:migrate
bin/rails consoleSpellChecker.new.check("տուն") # => true
SpellChecker.new.check_text("Բարև ինչպես ես")
# => [{word: "Բարև", valid: true}, {word: "ինչպես", valid: true}, {word: "ես", valid: true}]# seed some lemmas
Lemma.create!(word: "գրել", part_of_speech: "verb", conjugation_class: "e_conjugation")
Lemma.create!(word: "խաղալ", part_of_speech: "verb", conjugation_class: "a_conjugation")
# conjugate verbs
Conjugator.new.present_tense(Lemma.find_by(word: "գրել"))
Conjugator.new.present_tense(Lemma.find_by(word: "խաղալ"))- Web UI for pasting text and highlighting misspelled words
-
CustomWordmodel for user-added proper nouns/names -
Conjugatorservice for generating verb paradigms - Rule-based guessing for regular verbs (
def guess_class(word)), database only for exceptions, should work without saying what the conjugation_class is - Public deployment