Nuspell
spellchecker
|
Library main namespace with version number attached. More...
Typedefs | |
using | Word_List = Hash_Multimap< std::string, Flag_Set > |
using | Flag_Set = String_Set< char16_t > |
template<class T , class Key_Extr = identity> | |
using | Suffix_Multiset = Prefix_Multiset< T, Key_Extr, String_Reverser< typename Prefix_Multiset< T, Key_Extr >::Char_Type > > |
using | List_Strings = std::vector< std::string > |
Functions | |
auto | match_compound_pattern (const Compound_Pattern &p, string_view word, size_t i, Compounding_Result first, Compounding_Result second) |
auto | is_compound_forbidden_by_patterns (const vector< Compound_Pattern > &patterns, string_view word, size_t i, Compounding_Result first, Compounding_Result second) |
auto | are_three_code_points_equal (string_view word, size_t i) -> bool |
template<class AffixT > | |
auto | is_modiying_affix (const AffixT &a) |
template<class AffixInner , class AffixOuter > | |
auto | cross_valid_inner_outer (const AffixInner &inner, const AffixOuter &outer) |
template<class Affix > | |
auto | cross_valid_inner_outer (const Flag_Set &word_flags, const Affix &afx) |
auto | append_default_dir_paths (vector< fs::path > &paths) -> void |
Append the paths of the default directories to be searched for dictionaries. More... | |
auto | append_libreoffice_dir_paths (vector< fs::path > &paths) -> void |
Append the paths of the LibreOffice's directories to be searched for dictionaries. More... | |
auto | search_dirs_for_one_dict (const vector< fs::path > &dir_paths, const fs::path &dict_name_stem) -> fs::path |
Serach the directories for only one dictionary. More... | |
catch (const fs::filesystem_error &) | |
auto | search_dirs_for_dicts (const vector< fs::path > &dir_paths, vector< fs::path > &dict_list) -> void |
Search the directories for dictionaries. More... | |
auto | search_default_dirs_for_dicts () -> vector< fs::path > |
Search the default directories for dictionaries. More... | |
auto | append_default_dir_paths (std::vector< std::string > &paths) -> void |
auto | append_libreoffice_dir_paths (std::vector< std::string > &paths) -> void |
auto | search_dir_for_dicts (const string &dir_path, vector< pair< string, string >> &dict_list) -> void |
auto | search_dirs_for_dicts (const std::vector< string > &dir_paths, std::vector< std::pair< string, string >> &dict_list) -> void |
auto | search_default_dirs_for_dicts (std::vector< std::pair< std::string, std::string >> &dict_list) -> void |
auto | find_dictionary (const std::vector< std::pair< std::string, std::string >> &dict_list, const std::string &dict_name) -> std::vector< std::pair< std::string, std::string >>::const_iterator |
NUSPELL_EXPORT auto | append_default_dir_paths (std::vector< std::filesystem::path > &paths) -> void |
NUSPELL_EXPORT auto | append_libreoffice_dir_paths (std::vector< std::filesystem::path > &paths) -> void |
NUSPELL_EXPORT auto | search_dirs_for_one_dict (const std::vector< std::filesystem::path > &dir_paths, const std::filesystem::path &dict_name_stem) -> std::filesystem::path |
NUSPELL_EXPORT auto | search_dirs_for_dicts (const std::vector< std::filesystem::path > &dir_paths, std::vector< std::filesystem::path > &dict_list) -> void |
NUSPELL_DEPRECATED_EXPORT auto | search_dir_for_dicts (const std::string &dir_path, std::vector< std::pair< std::string, std::string >> &dict_list) -> void |
NUSPELL_DEPRECATED_EXPORT auto | search_dirs_for_dicts (const std::vector< std::string > &dir_paths, std::vector< std::pair< std::string, std::string >> &dict_list) -> void |
template<class Range > | |
Subrange (const Range &r) -> Subrange< typename Range::const_iterator > | |
template<class Range > | |
Subrange (Range &r) -> Subrange< typename Range::iterator > | |
template<class CharT > | |
auto | swap (String_Set< CharT > &a, String_Set< CharT > &b) |
template<class DataIter , class PatternIter , class FuncEq = std::equal_to<>> | |
auto | match_simple_regex (DataIter data_first, DataIter data_last, PatternIter pat_first, PatternIter pat_last, FuncEq eq=FuncEq()) |
template<class DataRange , class PatternRange , class FuncEq = std::equal_to<>> | |
auto | match_simple_regex (const DataRange &data, const PatternRange &pattern, FuncEq eq=FuncEq()) |
auto | match_compund_rule (const std::vector< const Flag_Set *> &words_data, const std::u16string &pattern) |
auto & | operator|= (Suggester::High_Quality_Sugs &lhs, Suggester::High_Quality_Sugs rhs) |
auto | u8_is_cp_error (int32_t cp) -> bool |
template<class Range > | |
auto | u8_advance_cp (const Range &str, size_t &i, int32_t &cp) -> void |
template<class Range > | |
auto | u8_advance_index (const Range &str, size_t &i) -> void |
template<class Range > | |
auto | u8_reverse_cp (const Range &str, size_t &i, int32_t &cp) -> void |
template<class Range > | |
auto | u8_reverse_index (const Range &str, size_t &i) -> void |
template<class Range > | |
auto | u8_write_cp_and_advance (Range &buf, size_t &i, int32_t cp, bool &error) -> void |
template<class Range > | |
auto | valid_u8_advance_cp (const Range &str, size_t &i, char32_t &cp) -> void |
template<class Range > | |
auto | valid_u8_advance_index (const Range &str, size_t &i) -> void |
template<class Range > | |
auto | valid_u8_reverse_cp (const Range &str, size_t &i, char32_t &cp) -> void |
template<class Range > | |
auto | valid_u8_reverse_index (const Range &str, size_t &i) -> void |
template<class Range > | |
auto | valid_u8_write_cp_and_advance (Range &buf, size_t &i, char32_t cp) -> void |
auto | u16_is_cp_error (int32_t cp) -> bool |
template<class Range > | |
auto | u16_advance_cp (const Range &str, size_t &i, int32_t &cp) -> void |
template<class Range > | |
auto | u16_advance_index (const Range &str, size_t &i) -> void |
template<class Range > | |
auto | u16_reverse_cp (const Range &str, size_t &i, int32_t &cp) -> void |
template<class Range > | |
auto | u16_reverse_index (const Range &str, size_t &i) -> void |
template<class Range > | |
auto | u16_write_cp_and_advance (Range &buf, size_t &i, int32_t cp, bool &error) -> void |
template<class Range > | |
auto | valid_u16_advance_cp (const Range &str, size_t &i, char32_t &cp) -> void |
template<class Range > | |
auto | valid_u16_advance_index (const Range &str, size_t &i) -> void |
template<class Range > | |
auto | valid_u16_reverse_cp (const Range &str, size_t &i, char32_t &cp) -> void |
template<class Range > | |
auto | valid_u16_reverse_index (const Range &str, size_t &i) -> void |
template<class Range > | |
auto | valid_u16_write_cp_and_advance (Range &buf, size_t &i, char32_t cp) -> void |
auto | u8_swap_adjacent_cp (std::string &str, size_t i1, size_t i2, size_t i3) -> size_t |
auto | u8_swap_cp (std::string &str, U8_CP_Pos pos1, U8_CP_Pos pos2) -> std::pair< size_t, size_t > |
template<class Range > | |
auto | u8_next_cp (const Range &str, size_t i) -> Idx_And_Next_CP |
template<class Range > | |
auto | u8_next_index (const Range &str, size_t i) -> size_t |
template<class Range > | |
auto | u8_prev_cp (const Range &str, size_t i) -> Idx_And_Prev_CP |
template<class Range > | |
auto | u8_prev_index (const Range &str, size_t i) -> size_t |
template<class Range > | |
auto | u8_write_cp (Range &buf, size_t i, int32_t cp) -> Write_CP_Idx_and_Error |
template<class Range > | |
auto | valid_u8_next_cp (const Range &str, size_t i) -> Idx_And_Next_CP_Valid |
template<class Range > | |
auto | valid_u8_next_index (const Range &str, size_t i) -> size_t |
template<class Range > | |
auto | valid_u8_prev_cp (const Range &str, size_t i) -> Idx_And_Prev_CP_Valid |
template<class Range > | |
auto | valid_u8_prev_index (const Range &str, size_t i) -> size_t |
template<class Range > | |
auto | valid_u8_write_cp (Range &buf, size_t i, int32_t cp) -> size_t |
auto | split_on_any_of (std::string_view, const char *, std::vector< std::string > &out) -> std::vector< std::string > & |
auto | utf32_to_utf8 (std::u32string_view in, std::string &out) -> void |
auto | utf32_to_utf8 (std::u32string_view in) -> std::string |
auto | valid_utf8_to_32 (std::string_view in, std::u32string &out) -> void |
auto | valid_utf8_to_32 (std::string_view in) -> std::u32string |
auto | utf8_to_16 (std::string_view in) -> std::u16string |
bool | utf8_to_16 (std::string_view in, std::u16string &out) |
bool | validate_utf8 (string_view s) |
auto | is_all_ascii (std::string_view s) -> bool |
auto | latin1_to_ucs2 (std::string_view s) -> std::u16string |
auto | latin1_to_ucs2 (std::string_view s, std::u16string &out) -> void |
auto | is_all_bmp (std::u16string_view s) -> bool |
auto | to_upper_ascii (std::string &s) -> void |
auto | to_upper (std::string_view in, const icu::Locale &loc) -> std::string |
auto | to_title (std::string_view in, const icu::Locale &loc) -> std::string |
auto | to_lower (std::string_view in, const icu::Locale &loc) -> std::string |
auto | to_upper (string_view in, const icu::Locale &loc, string &out) -> void |
auto | to_title (string_view in, const icu::Locale &loc, string &out) -> void |
auto | to_lower (u32string_view in, const icu::Locale &loc, u32string &out) -> void |
auto | to_lower (string_view in, const icu::Locale &loc, string &out) -> void |
auto | to_lower_char_at (std::string &s, size_t i, const icu::Locale &loc) -> void |
auto | to_title_char_at (std::string &s, size_t i, const icu::Locale &loc) -> void |
auto | classify_casing (string_view s) -> Casing |
auto | has_uppercase_at_compound_word_boundary (string_view word, size_t i) -> bool |
auto | replace_ascii_char (string &s, char from, char to) -> void |
auto | erase_chars (string &s, string_view erase_chars) -> void |
auto | is_number (string_view s) -> bool |
auto | count_appereances_of (string_view haystack, string_view needles) -> size_t |
auto | validate_utf8 (std::string_view s) -> bool |
auto | to_upper (std::string_view in, const icu::Locale &loc, std::string &out) -> void |
auto | to_title (std::string_view in, const icu::Locale &loc, std::string &out) -> void |
auto | to_lower (std::u32string_view in, const icu::Locale &loc, std::u32string &out) -> void |
auto | to_lower (std::string_view in, const icu::Locale &loc, std::string &out) -> void |
NUSPELL_EXPORT auto | classify_casing (std::string_view s) -> Casing |
auto | has_uppercase_at_compound_word_boundary (std::string_view word, size_t i) -> bool |
auto | replace_ascii_char (std::string &s, char from, char to) -> void |
auto | erase_chars (std::string &s, std::string_view erase_chars) -> void |
NUSPELL_EXPORT auto | is_number (std::string_view s) -> bool |
auto | count_appereances_of (std::string_view haystack, std::string_view needles) -> size_t |
auto | begins_with (std::string_view haystack, std::string_view needle) -> bool |
auto | ends_with (std::string_view haystack, std::string_view needle) -> bool |
template<class T > | |
auto | begin_ptr (T &x) |
template<class T > | |
auto | end_ptr (T &x) |
Variables | |
constexpr auto | u8_max_cp_length = U8_MAX_LENGTH |
constexpr auto | u16_max_cp_length = U16_MAX_LENGTH |
Library main namespace with version number attached.
This inline namespace is used for ABI versioning. It is the same as the major verison. Look up on the Internet to see what is it for (ABI versioning mostly). Client code should never mention this inline namespace.
auto nuspell::v5::append_default_dir_paths | ( | vector< fs::path > & | paths | ) | -> void |
Append the paths of the default directories to be searched for dictionaries.
[out] | paths | vector that receives the directory paths |
auto nuspell::v5::append_libreoffice_dir_paths | ( | vector< fs::path > & | paths | ) | -> void |
Append the paths of the LibreOffice's directories to be searched for dictionaries.
[out] | paths | vector that receives the directory paths |
NUSPELL_EXPORT auto nuspell::v5::search_default_dirs_for_dicts | ( | ) | -> vector< fs::path > |
Search the default directories for dictionaries.
This is just a convenience that call two other functions.
auto nuspell::v5::search_dirs_for_dicts | ( | const vector< fs::path > & | dir_paths, |
vector< fs::path > & | dict_list | ||
) | -> void |
Search the directories for dictionaries.
This function searches the directories for files that represent dictionaries and for each found dictionary it appends the path of the .aff file to dict_list
. One dictionary consts of two files, .aff and .dic, and both need to exist, but only the .aff is added.
[in] | dir_paths | list of paths to directories |
[out] | dict_list | vector that receives the paths of the found dictionaries |
auto nuspell::v5::search_dirs_for_one_dict | ( | const vector< fs::path > & | dir_paths, |
const fs::path & | dict_name_stem | ||
) | -> fs::path |
Serach the directories for only one dictionary.
This function is more efficient than search_dirs_for_dicts() because it does not iterate whole directories, it only checks the existance of .dic and .aff files. Useful for some CLI tools. GUI apps generally need a list of all dictionaries.
[in] | dir_paths | list of directories |
[in] | dict_name_stem | dictionary name, filename without extension (stem) |