This is the functional specification of the LibHebrewDeflector library.
LibHebrewDeflector is the core library of Hebrew Deflector. The core of its API is the HebrewDeflector class. Its main function is deflectWord(). It takes a Hebrew word and returns the list of its possible de-inflections:
:::c++
QList<HebrewWordDeflection> LibHebrewDeflector::deflectWord(const QString &word);
The HebrewWordDeflection class represents a single possible de-inflection of a word. It contains various properties, such as:
Patterns are given in their dictionary forms. For noun-like words (including adjectives and participles) it's masculine singular, for verbs it's the third person masculine singular.
The list of prepositions and other stuff also includes the article, if present. All elements of this list are members of the AuxWordPart enum, which is a member of HebrewWordDeflection.
The binyan and its form are represented by enums. The API also provides the isVerb() method based on the binyan and its form.
The changes are represented by HebrewPatternChangeRule instances. HebrewGizrah and HebrewSoundDropping inherit it. HebrewGizrah has a lot of descendants too.
Various behavior of the deflector is controlled by its additional methods. They should allow or disallow certain types of guesses, certain writing systems and so on.