Module: Kotoshu::Algorithms::Lookup
- Defined in:
- lib/kotoshu/algorithms/lookup.rb
Overview
Main “is this word correct?” algorithm implementation.
Ported from Spylls (Python) lookup.py
On a bird’s-eye view level:
-
Word correctness check is an attempt to analyze word form (maybe it has this suffix? maybe it has this prefix? maybe it
consists of several words?) -
The word is considered correct if at least one form is found that has valid suffixes/prefixes from .aff file and valid stem from .dic file, and they are all compatible with each other.
To follow algorithm details, start reading from Lookup.call method.
Defined Under Namespace
Modules: CompoundPos Classes: AffixForm, CompoundForm, Lookuper
Constant Summary collapse
- NUMBER_REGEXP =
/^\d+(\.\d+)?$/.freeze