Nuspell
spellchecker
Public Types | Public Member Functions | List of all members
nuspell::v5::Suggester Struct Reference
Inheritance diagram for nuspell::v5::Suggester:
[legend]
Collaboration diagram for nuspell::v5::Suggester:
[legend]

Public Types

enum  High_Quality_Sugs : bool { ALL_LOW_QUALITY_SUGS = false, HAS_HIGH_QUALITY_SUGS = true }
 
- Public Types inherited from nuspell::v5::Checker
enum  Forceucase : bool { FORBID_BAD_FORCEUCASE = false, ALLOW_BAD_FORCEUCASE = true }
 
enum  Hidden_Homonym : bool { ACCEPT_HIDDEN_HOMONYM = false, SKIP_HIDDEN_HOMONYM = true }
 

Public Member Functions

auto suggest_priv (std::string_view input_word, List_Strings &out) const -> void
 
auto suggest_low (std::string &word, List_Strings &out) const -> High_Quality_Sugs
 
auto add_sug_if_correct (std::string &word, List_Strings &out) const -> bool
 
auto uppercase_suggest (const std::string &word, List_Strings &out) const -> void
 
auto rep_suggest (std::string &word, List_Strings &out) const -> void
 
auto try_rep_suggestion (std::string &word, List_Strings &out) const -> void
 
auto max_attempts_for_long_alogs (std::string_view word) const -> size_t
 
auto map_suggest (std::string &word, List_Strings &out) const -> void
 
auto map_suggest (std::string &word, List_Strings &out, size_t i, size_t &remaining_attempts) const -> void
 
auto adjacent_swap_suggest (std::string &word, List_Strings &out) const -> void
 
auto distant_swap_suggest (std::string &word, List_Strings &out) const -> void
 
auto keyboard_suggest (std::string &word, List_Strings &out) const -> void
 
auto extra_char_suggest (std::string &word, List_Strings &out) const -> void
 
auto forgotten_char_suggest (std::string &word, List_Strings &out) const -> void
 
auto move_char_suggest (std::string &word, List_Strings &out) const -> void
 
auto bad_char_suggest (std::string &word, List_Strings &out) const -> void
 
auto doubled_two_chars_suggest (std::string &word, List_Strings &out) const -> void
 
auto two_words_suggest (const std::string &word, List_Strings &out) const -> void
 
auto ngram_suggest (const std::string &word_u8, List_Strings &out) const -> void
 
auto expand_root_word_for_ngram (Word_List::const_reference root, std::string_view wrong, List_Strings &expanded_list, std::vector< bool > &cross_affix) const -> void
 
- Public Member Functions inherited from nuspell::v5::Checker
auto spell_priv (std::string &s) const -> bool
 
auto spell_break (std::string &s, size_t depth=0) const -> bool
 
auto spell_casing (std::string &s) const -> const Flag_Set *
 
auto spell_casing_upper (std::string &s) const -> const Flag_Set *
 
auto spell_casing_title (std::string &s) const -> const Flag_Set *
 
auto spell_sharps (std::string &base, size_t n_pos=0, size_t n=0, size_t rep=0) const -> const Flag_Set *
 
auto check_word (std::string &s, Forceucase allow_bad_forceucase={}, Hidden_Homonym skip_hidden_homonym={}) const -> const Flag_Set *
 
auto check_simple_word (std::string &word, Hidden_Homonym skip_hidden_homonym={}) const -> const Flag_Set *
 
template<Affixing_Mode m>
auto affix_NOT_valid (const Prefix &a) const
 
template<Affixing_Mode m>
auto affix_NOT_valid (const Suffix &a) const
 
template<Affixing_Mode m, class AffixT >
auto outer_affix_NOT_valid (const AffixT &a) const
 
template<class AffixT >
auto is_circumfix (const AffixT &a) const
 
template<Affixing_Mode m>
auto is_valid_inside_compound (const Flag_Set &flags) const
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_only (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Prefix >
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_only (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Suffix >
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_then_suffix (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Suffix, Prefix >
 
template<Affixing_Mode m>
auto strip_pfx_then_sfx_2 (const Prefix &pe, std::string &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix, Prefix >
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_then_prefix (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Prefix, Suffix >
 
template<Affixing_Mode m>
auto strip_sfx_then_pfx_2 (const Suffix &se, std::string &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Prefix, Suffix >
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_then_suffix_commutative (std::string &word, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Suffix, Prefix >
 
template<Affixing_Mode m = FULL_WORD>
auto strip_pfx_then_sfx_comm_2 (const Prefix &pe, std::string &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix, Prefix >
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_then_suffix (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Suffix, Suffix >
 
template<Affixing_Mode m>
auto strip_sfx_then_sfx_2 (const Suffix &se1, std::string &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix, Suffix >
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_then_prefix (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Prefix, Prefix >
 
template<Affixing_Mode m>
auto strip_pfx_then_pfx_2 (const Prefix &pe1, std::string &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Prefix, Prefix >
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_then_2_suffixes (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_pfx_2_sfx_3 (const Prefix &pe1, const Suffix &se1, std::string &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_prefix_suffix (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_s_p_s_3 (const Suffix &se1, const Prefix &pe1, std::string &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_2_suffixes_then_prefix (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_2_sfx_pfx_3 (const Suffix &se1, const Suffix &se2, std::string &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_then_2_prefixes (std::string &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_sfx_2_pfx_3 (const Suffix &se1, const Prefix &pe1, std::string &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_suffix_prefix (std::string &word, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_p_s_p_3 (const Prefix &pe1, const Suffix &se1, std::string &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_2_prefixes_then_suffix (std::string &word, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_2_pfx_sfx_3 (const Prefix &pe1, const Prefix &pe2, std::string &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
auto check_compound (std::string &word, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m = AT_COMPOUND_BEGIN>
auto check_compound (std::string &word, size_t start_pos, size_t num_part, std::string &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m = AT_COMPOUND_BEGIN>
auto check_compound_classic (std::string &word, size_t start_pos, size_t i, size_t num_part, std::string &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m = AT_COMPOUND_BEGIN>
auto check_compound_with_pattern_replacements (std::string &word, size_t start_pos, size_t i, size_t num_part, std::string &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m>
auto check_word_in_compound (std::string &s) const -> Compounding_Result
 
auto calc_num_words_modifier (const Prefix &pfx) const -> unsigned char
 
template<Affixing_Mode m>
auto calc_syllable_modifier (Word_List::const_reference we) const -> signed char
 
template<Affixing_Mode m>
auto calc_syllable_modifier (Word_List::const_reference we, const Suffix &sfx) const -> signed char
 
auto count_syllables (std::string_view word) const -> size_t
 
auto check_compound_with_rules (std::string &word, std::vector< const Flag_Set * > &words_data, size_t start_pos, std::string &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
auto is_rep_similar (std::string &word) const -> bool
 
- Public Member Functions inherited from nuspell::v5::Aff_Data
auto parse_aff (std::istream &in) -> bool
 
auto parse_dic (std::istream &in) -> bool
 
auto parse_aff_dic (std::istream &aff, std::istream &dic)
 

Additional Inherited Members

- Public Attributes inherited from nuspell::v5::Aff_Data
Word_List words
 
Prefix_Table prefixes
 
Suffix_Table suffixes
 
bool complex_prefixes
 
bool fullstrip
 
bool checksharps
 
bool forbid_warn
 
char16_t compound_onlyin_flag
 
char16_t circumfix_flag
 
char16_t forbiddenword_flag
 
char16_t keepcase_flag
 
char16_t need_affix_flag
 
char16_t warn_flag
 
char16_t compound_flag
 
char16_t compound_begin_flag
 
char16_t compound_last_flag
 
char16_t compound_middle_flag
 
Compound_Rule_Table compound_rules
 
Break_Table break_table
 
Substr_Replacer input_substr_replacer
 
std::string ignored_chars
 
icu::Locale icu_locale
 
Substr_Replacer output_substr_replacer
 
Replacement_Table replacements
 
std::vector< Similarity_Groupsimilarities
 
std::string keyboard_closeness
 
std::string try_chars
 
char16_t nosuggest_flag
 
char16_t substandard_flag
 
unsigned short max_compound_suggestions
 
unsigned short max_ngram_suggestions
 
unsigned short max_diff_factor
 
bool only_max_diff
 
bool no_split_suggestions
 
bool suggest_with_dots
 
unsigned short compound_min_length
 
unsigned short compound_max_word_count
 
char16_t compound_permit_flag
 
char16_t compound_forbid_flag
 
char16_t compound_root_flag
 
char16_t compound_force_uppercase
 
bool compound_more_suffixes
 
bool compound_check_duplicate
 
bool compound_check_rep
 
bool compound_check_case
 
bool compound_check_triple
 
bool compound_simplified_triple
 
bool compound_syllable_num
 
unsigned short compound_syllable_max
 
std::string compound_syllable_vowels
 
std::vector< Compound_Patterncompound_patterns
 
Flag_Type flag_type
 
Encoding encoding
 
std::vector< Flag_Setflag_aliases
 
std::string wordchars
 
- Static Public Attributes inherited from nuspell::v5::Aff_Data
static constexpr auto HIDDEN_HOMONYM_FLAG = char16_t(-1)
 
static constexpr auto MAX_SUGGESTIONS = size_t(16)
 

The documentation for this struct was generated from the following files: