Nuspell
spellchecker
Classes | Typedefs | Enumerations | Functions
nuspell::v3 Namespace Reference

inline namespace for API and ABI versioning More...

Classes

struct  Aff_Data
 
class  Affix_Table
 
struct  Affixing_Result
 
struct  Affixing_Result< T1, void >
 
struct  Affixing_Result< void, void >
 
struct  Affixing_Result_Base
 
class  Break_Table
 
struct  Compound_Pattern
 
class  Compound_Rule_Table
 
struct  Compounding_Result
 
class  Condition
 Limited regular expression matching used in affix entries. More...
 
struct  Condition_Exception
 
struct  Dict_Base
 
class  Dictionary
 The only important public class. More...
 
class  Dictionary_Loading_Error
 The only important public exception. More...
 
class  Encoding
 
struct  Extractor_First_of_Word_Pair
 
struct  Extractor_Of_Appending_From_Affix
 
class  Finder
 
class  Hash_Multiset
 
struct  identity
 
class  List_Basic_Strings
 Vector of strings that recycles erased strings. More...
 
class  Phonetic_Table
 
class  Prefix
 
class  Prefix_Multiset
 
class  Prefix_Table
 
class  Replacement_Table
 
class  Reversed_String_View
 
struct  Similarity_Group
 
class  Simple_Short_String
 
class  String_Pair
 
struct  String_Reverser
 
class  String_Set
 A Set class backed by a string. More...
 
class  Substr_Replacer
 
class  Suffix
 
class  Suffix_Table
 

Typedefs

using Word_List = Hash_Multiset< std::pair< std::wstring, Flag_Set >, std::wstring, Extractor_First_of_Word_Pair >
 Map between words and word_flags. More...
 
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 Short_WString = Simple_Short_String< wchar_t >
 
using List_Strings = List_Basic_Strings< char >
 
using List_WStrings = List_Basic_Strings< wchar_t >
 

Enumerations

enum  Flag_Type { Flag_Type::SINGLE_CHAR, Flag_Type::DOUBLE_CHAR, Flag_Type::NUMBER, Flag_Type::UTF8 }
 
enum  Affixing_Mode { FULL_WORD, AT_COMPOUND_BEGIN, AT_COMPOUND_END, AT_COMPOUND_MIDDLE }
 
enum  Casing {
  Casing::SMALL, Casing::INIT_CAPITAL, Casing::ALL_CAPITAL, Casing::CAMEL,
  Casing::PASCAL
}
 Casing type enum, ignoring neutral case characters. More...
 

Functions

template<class CharT >
auto constexpr literal_choose (const char *narrow, const wchar_t *wide)
 
template<>
auto constexpr literal_choose< char > (const char *narrow, const wchar_t *)
 
template<>
auto constexpr literal_choose< wchar_t > (const char *, const wchar_t *wide)
 
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)
 
template<class CharT >
auto swap (List_Basic_Strings< CharT > &a, List_Basic_Strings< CharT > &b)
 

Detailed Description

inline namespace for API and ABI versioning

Everything that is public API gets here, and even symbols that should be private at API but are called at ABI level end up here. For example, our public class Dictionary has implicit destructor which gets inlined in client code. Thus, the client code directly calls the destructors of all the private data members of our class Dictionary.

Typedef Documentation

◆ Word_List

using nuspell::v3::Word_List = typedef Hash_Multiset<std::pair<std::wstring, Flag_Set>, std::wstring, Extractor_First_of_Word_Pair>

Map between words and word_flags.

Flags are stored as part of the container. Maybe for the future flags should be stored elsewhere (flag aliases) and this should store pointers.

Does not store morphological data as is low priority feature and is out of scope.

Enumeration Type Documentation

◆ Casing

enum nuspell::v3::Casing
strong

Casing type enum, ignoring neutral case characters.

Enumerator
SMALL 

all lower case or neutral case, e.g.

"lowercase" or "123"

INIT_CAPITAL 

start upper case, rest lower case, e.g.

"Initcap"

ALL_CAPITAL 

all upper case, e.g.

"UPPERCASE" or "ALL4ONE"

CAMEL 

camel case, start lower case, e.g.

"camelCase"

PASCAL 

pascal case, start upper case, e.g.

"PascalCase"

◆ Flag_Type

Enumerator
SINGLE_CHAR 

single-character flag, e.g.

for "a"

DOUBLE_CHAR 

double-character flag, e.g for "aa"

NUMBER 

numerical flag, e.g.

for 61

UTF8 

UTF-8 flag, e.g.

for "รก"