Menu

LibHebrewDeflector functional specification

Sergey A. Tachenov

This is the functional specification of the LibHebrewDeflector library.

HebrewDeflector

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:

  • the inflected form in the classic spelling with accent;
  • the binyan and its form, if applicable;
  • the list of prepositions, prefixes, endings and prefix/ending combos, if any;
  • the pattern, represented as a string with the placeholder kuf-tet-lamed root;
  • the root of the word, represented as a string;
  • the list of changes applied, including gzarot, dropping of a sound, and so on.

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.


MongoDB Logo MongoDB