|
| std::u32string | deeplima::lemmatization::to_lower (const std::u32string &src) |
| | Lowercases code point by code point (ICU simple case mapping, any script).
|
| std::u32string | deeplima::lemmatization::utf8_to_u32 (const std::string &src) |
| std::string | deeplima::lemmatization::u32_to_utf8 (const std::u32string &src) |
| edit_rule_t | deeplima::lemmatization::extract_rule (const std::u32string &form, const std::u32string &lemma) |
| | The rule turning form into lemma that keeps the longest common prefix: lowercasing is part of the rule only when it shortens the edit ("Princes" -> "prince" is {true, 1, ""}, "Paris" -> "Paris" is {false, 0, ""}).
|
| size_t | deeplima::lemmatization::edit_cost (const affix_rule_t &r) |
| | The length of the edit: characters stripped and added at both ends.
|
| affix_rule_t | deeplima::lemmatization::extract_substring_rule (const std::u32string &form, const std::u32string &lemma, bool lower) |
| | The edit turning form into lemma around their longest common substring, the earliest one in form, then in lemma, on equal lengths.
|
| affix_rule_t | deeplima::lemmatization::extract_affix_rule (const std::u32string &form, const std::u32string &lemma, size_t max_prefix) |
| | The rule turning form into lemma with a prefix edit stripping at most max_prefix characters: the suffix rule of extract_rule unless an edit around the longest common substring is strictly shorter.
|
| bool | deeplima::lemmatization::apply_rule (const std::u32string &form, const edit_rule_t &prefix, const edit_rule_t &suffix, std::u32string &lemma) |
| | Applies the prefix and suffix rules to form.
|
| bool | deeplima::lemmatization::apply_rule (const std::u32string &form, const edit_rule_t &rule, std::u32string &lemma) |
| | Applies a suffix rule alone (see above).
|
| const std::string & | deeplima::lemmatization::any_feats () |
| | The feats value of the rule used when no rule matches the exact features.
|
| std::vector< std::string > | deeplima::lemmatization::split_tabs (const std::string &line) |
| | Splits on tabs, keeping empty fields (utils::split drops them).
|
| void | deeplima::lemmatization::read_rules (std::istream &in, const std::function< void(const rule_line_t &)> &fn) |
| | Reads a rules file, calling fn(const rule_line_t&) on each rule.
|