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

Public Types

enum  Forceucase : bool { FORBID_BAD_FORCEUCASE = false, ALLOW_BAD_FORCEUCASE = true }
 
enum  Hidden_Homonym : bool { ACCEPT_HIDDEN_HOMONYM = false, SKIP_HIDDEN_HOMONYM = true }
 
enum  High_Quality_Sugs : bool { ALL_LOW_QUALITY_SUGS = false, HAS_HIGH_QUALITY_SUGS = true }
 

Public Member Functions

auto spell_priv (std::wstring &s) const -> bool
 
auto spell_break (std::wstring &s, size_t depth=0) const -> bool
 
auto spell_casing (std::wstring &s) const -> const Flag_Set *
 
auto spell_casing_upper (std::wstring &s) const -> const Flag_Set *
 
auto spell_casing_title (std::wstring &s) const -> const Flag_Set *
 
auto spell_sharps (std::wstring &base, size_t n_pos=0, size_t n=0, size_t rep=0) const -> const Flag_Set *
 
auto check_word (std::wstring &s, Forceucase allow_bad_forceucase={}, Hidden_Homonym skip_hidden_homonym={}) const -> const Flag_Set *
 
auto check_simple_word (std::wstring &word, Hidden_Homonym skip_hidden_homonym={}) const -> const Flag_Set *
 
template<Affixing_Mode m>
auto affix_NOT_valid (const Prefix< wchar_t > &a) const
 
template<Affixing_Mode m>
auto affix_NOT_valid (const Suffix< wchar_t > &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::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Prefix< wchar_t >>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_only (std::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Suffix< wchar_t >>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_then_suffix (std::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Suffix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_pfx_then_sfx_2 (const Prefix< wchar_t > &pe, std::wstring &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_then_prefix (std::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Prefix< wchar_t >, Suffix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_sfx_then_pfx_2 (const Suffix< wchar_t > &se, std::wstring &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Prefix< wchar_t >, Suffix< wchar_t >>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_then_suffix_commutative (std::wstring &word, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Suffix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_pfx_then_sfx_comm_2 (const Prefix< wchar_t > &pe, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_then_suffix (std::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Suffix< wchar_t >, Suffix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_sfx_then_sfx_2 (const Suffix< wchar_t > &se1, std::wstring &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >, Suffix< wchar_t >>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_then_prefix (std::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result< Prefix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_pfx_then_pfx_2 (const Prefix< wchar_t > &pe1, std::wstring &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Prefix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_then_2_suffixes (std::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_pfx_2_sfx_3 (const Prefix< wchar_t > &pe1, const Suffix< wchar_t > &se1, std::wstring &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_prefix_suffix (std::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_s_p_s_3 (const Suffix< wchar_t > &se1, const Prefix< wchar_t > &pe1, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_2_suffixes_then_prefix (std::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_2_sfx_pfx_3 (const Suffix< wchar_t > &se1, const Suffix< wchar_t > &se2, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_suffix_then_2_prefixes (std::wstring &s, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_sfx_2_pfx_3 (const Suffix< wchar_t > &se1, const Prefix< wchar_t > &pe1, std::wstring &s, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_prefix_suffix_prefix (std::wstring &word, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_p_s_p_3 (const Prefix< wchar_t > &pe1, const Suffix< wchar_t > &se1, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m = FULL_WORD>
auto strip_2_prefixes_then_suffix (std::wstring &word, Hidden_Homonym skip_hidden_homonym={}) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_2_pfx_sfx_3 (const Prefix< wchar_t > &pe1, const Prefix< wchar_t > &pe2, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
auto check_compound (std::wstring &word, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m = AT_COMPOUND_BEGIN>
auto check_compound (std::wstring &word, size_t start_pos, size_t num_part, std::wstring &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m = AT_COMPOUND_BEGIN>
auto check_compound_classic (std::wstring &word, size_t start_pos, size_t i, size_t num_part, std::wstring &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m = AT_COMPOUND_BEGIN>
auto check_compound_with_pattern_replacements (std::wstring &word, size_t start_pos, size_t i, size_t num_part, std::wstring &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m>
auto check_word_in_compound (std::wstring &s) const -> Compounding_Result
 
auto calc_num_words_modifier (const Prefix< wchar_t > &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< wchar_t > &sfx) const -> signed char
 
auto count_syllables (const std::wstring &word) const -> size_t
 
auto check_compound_with_rules (std::wstring &word, std::vector< const Flag_Set * > &words_data, size_t start_pos, std::wstring &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
auto suggest_priv (std::wstring &word, List_WStrings &out) const -> void
 
auto suggest_low (std::wstring &word, List_WStrings &out) const -> High_Quality_Sugs
 
auto add_sug_if_correct (std::wstring &word, List_WStrings &out) const -> bool
 
auto uppercase_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto rep_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto try_rep_suggestion (std::wstring &word, List_WStrings &out) const -> void
 
auto is_rep_similar (std::wstring &word) const -> bool
 
auto map_suggest (std::wstring &word, List_WStrings &out, size_t i=0) const -> void
 
auto adjacent_swap_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto distant_swap_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto keyboard_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto extra_char_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto forgotten_char_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto move_char_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto bad_char_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto doubled_two_chars_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto two_words_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto phonetic_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto ngram_suggest (std::wstring &word, List_WStrings &out) const -> void
 
auto expand_root_word_for_ngram (Word_List::const_reference root, std::wstring_view wrong, List_WStrings &expanded_list, std::vector< bool > &cross_affix) const -> void
 
template<Affixing_Mode m>
auto affix_NOT_valid (const Prefix< wchar_t > &e) const
 
template<Affixing_Mode m>
auto affix_NOT_valid (const Suffix< wchar_t > &e) const
 
template<Affixing_Mode m, class AffixT >
auto outer_affix_NOT_valid (const AffixT &e) 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>
auto strip_prefix_only (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Prefix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_suffix_only (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_prefix_then_suffix (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_pfx_then_sfx_2 (const Prefix< wchar_t > &pe, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_suffix_then_prefix (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Prefix< wchar_t >, Suffix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_sfx_then_pfx_2 (const Suffix< wchar_t > &se, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Prefix< wchar_t >, Suffix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_prefix_then_suffix_commutative (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_pfx_then_sfx_comm_2 (const Prefix< wchar_t > &pe, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_suffix_then_suffix (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >, Suffix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_sfx_then_sfx_2 (const Suffix< wchar_t > &se1, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Suffix< wchar_t >, Suffix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_prefix_then_prefix (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Prefix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_pfx_then_pfx_2 (const Prefix< wchar_t > &pe1, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result< Prefix< wchar_t >, Prefix< wchar_t >>
 
template<Affixing_Mode m>
auto strip_prefix_then_2_suffixes (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_pfx_2_sfx_3 (const Prefix< wchar_t > &pe1, const Suffix< wchar_t > &se1, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_suffix_prefix_suffix (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_s_p_s_3 (const Suffix< wchar_t > &se1, const Prefix< wchar_t > &pe1, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_2_suffixes_then_prefix (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_2_sfx_pfx_3 (const Suffix< wchar_t > &se1, const Suffix< wchar_t > &se2, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_suffix_then_2_prefixes (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_sfx_2_pfx_3 (const Suffix< wchar_t > &se1, const Prefix< wchar_t > &pe1, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_prefix_suffix_prefix (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_p_s_p_3 (const Prefix< wchar_t > &pe1, const Suffix< wchar_t > &se1, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_2_prefixes_then_suffix (std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto strip_2_pfx_sfx_3 (const Prefix< wchar_t > &pe1, const Prefix< wchar_t > &pe2, std::wstring &word, Hidden_Homonym skip_hidden_homonym) const -> Affixing_Result<>
 
template<Affixing_Mode m>
auto check_compound (std::wstring &word, size_t start_pos, size_t num_part, std::wstring &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m>
auto check_compound_classic (std::wstring &word, size_t start_pos, size_t i, size_t num_part, std::wstring &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m>
auto check_compound_with_pattern_replacements (std::wstring &word, size_t start_pos, size_t i, size_t num_part, std::wstring &part, Forceucase allow_bad_forceucase) const -> Compounding_Result
 
template<Affixing_Mode m>
auto check_word_in_compound (std::wstring &word) const -> Compounding_Result
 
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< wchar_t > &sfx) const -> signed char
 
- Public Member Functions inherited from nuspell::v4::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::v4::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< wchar_t > break_table
 
Substr_Replacer< wchar_t > input_substr_replacer
 
std::wstring ignored_chars
 
icu::Locale icu_locale
 
Substr_Replacer< wchar_t > output_substr_replacer
 
Replacement_Table< wchar_t > replacements
 
std::vector< Similarity_Group< wchar_t > > similarities
 
std::wstring keyboard_closeness
 
std::wstring try_chars
 
Phonetic_Table< wchar_t > phonetic_table
 
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::wstring compound_syllable_vowels
 
std::vector< Compound_Pattern< wchar_t > > compound_patterns
 
Flag_Type flag_type
 
Encoding encoding
 
std::vector< Flag_Setflag_aliases
 
std::string wordchars
 
- Static Public Attributes inherited from nuspell::v4::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: