sszuev / ru-grammar-tools

a set of tools to work with russian grammar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ru-Grammar-Tools (a set of tools for working with russian grammar)

This is a java library intended for case declension Russian full-names (Surname, Firstname, Patronymic), official job-titles, legal organization names, regular terms and numerals, and also for spelling cardinal and ordinal numbers.

It is based on petrovich-rules and OpenRussian dictionary. The library contains 1000+ test-cases.

Examples:

GrammarTools.getInflectionEngine().inflectPatronymic("Петрович", Case.GENITIVE, Gender.MALE);
GrammarTools.getInflectionEngine().inflectSurname("Петрова", Case.PREPOSITIONAL, Gender.FEMALE);
GrammarTools.getInflectionEngine().inflectFullname("Петрова Петра Петровна", Case.DATIVE);
GrammarTools.getInflectionEngine().inflectNameOfOrganization("Общество с ограниченной ответственностью Бёрнинг Мэн", Case.ACCUSATIVE);
GrammarTools.getInflectionEngine().inflectNameOfProfession("Вентилевой гидравлического пресса", Case.ACCUSATIVE);
GrammarTools.getInflectionEngine().inflectNumeral("сорок два", "доллар", Case.INSTRUMENTAL);
GrammarTools.getSpellingEngine().spell(42.42);
GrammarTools.getSpellingEngine().spellOrdinal(42, Gender.NEUTER);

Related links:

How to use:

Requirements:
  • Git
  • Java 11+
  • Maven 3+
License
  • Apache License Version 2.0

About

a set of tools to work with russian grammar

License:Apache License 2.0


Languages

Language:Java 100.0%