PostgreSQL Source Code git master
|
Go to the source code of this file.
Data Structures | |
struct | SPNodeData |
struct | SPNode |
struct | spell_struct |
struct | aff_struct |
struct | AffixNodeData |
struct | AffixNode |
struct | CMPDAffix |
struct | CompoundAffixFlag |
struct | IspellDict |
Macros | |
#define | FF_COMPOUNDONLY 0x01 |
#define | FF_COMPOUNDBEGIN 0x02 |
#define | FF_COMPOUNDMIDDLE 0x04 |
#define | FF_COMPOUNDLAST 0x08 |
#define | FF_COMPOUNDFLAG |
#define | FF_COMPOUNDFLAGMASK 0x0f |
#define | SPNHDRSZ (offsetof(SPNode,data)) |
#define | SPELLHDRSZ (offsetof(SPELL, word)) |
#define | FF_COMPOUNDPERMITFLAG 0x10 |
#define | FF_COMPOUNDFORBIDFLAG 0x20 |
#define | FF_CROSSPRODUCT 0x40 |
#define | FF_SUFFIX 1 |
#define | FF_PREFIX 0 |
#define | ANHRDSZ (offsetof(AffixNode, data)) |
#define | FLAGNUM_MAXSIZE (1 << 16) |
Typedefs | |
typedef struct SPNode | SPNode |
typedef struct spell_struct | SPELL |
typedef struct aff_struct | AFFIX |
typedef struct AffixNode | AffixNode |
typedef struct CompoundAffixFlag | CompoundAffixFlag |
Enumerations | |
enum | FlagMode { FM_CHAR , FM_LONG , FM_NUM } |
Functions | |
TSLexeme * | NINormalizeWord (IspellDict *Conf, const char *word) |
void | NIStartBuild (IspellDict *Conf) |
void | NIImportAffixes (IspellDict *Conf, const char *filename) |
void | NIImportDictionary (IspellDict *Conf, const char *filename) |
void | NISortDictionary (IspellDict *Conf) |
void | NISortAffixes (IspellDict *Conf) |
void | NIFinishBuild (IspellDict *Conf) |
#define FF_COMPOUNDFLAG |
typedef struct aff_struct AFFIX |
typedef struct CompoundAffixFlag CompoundAffixFlag |
typedef struct spell_struct SPELL |
enum FlagMode |
void NIFinishBuild | ( | IspellDict * | Conf | ) |
Definition at line 104 of file spell.c.
References IspellDict::buildCxt, IspellDict::CompoundAffixFlags, IspellDict::firstfree, MemoryContextDelete(), and IspellDict::Spell.
Referenced by dispell_init().
void NIImportAffixes | ( | IspellDict * | Conf, |
const char * | filename | ||
) |
Definition at line 1426 of file spell.c.
References addCompoundAffixFlagValue(), COPYCHAR, ereport, errcode(), errmsg(), ERROR, FF_COMPOUNDFLAG, FF_COMPOUNDONLY, FF_CROSSPRODUCT, FF_PREFIX, FF_SUFFIX, filename, find(), findchar2(), flag(), IspellDict::flagMode, FM_CHAR, NIAddAffix(), NIImportOOAffixes(), parse_affentry(), pfree(), pg_mblen(), prefixes(), str_tolower(), STRNCMP, tsearch_readline(), tsearch_readline_begin(), tsearch_readline_end(), IspellDict::usecompound, and IspellDict::useFlagAliases.
Referenced by dispell_init().
void NIImportDictionary | ( | IspellDict * | Conf, |
const char * | filename | ||
) |
Definition at line 518 of file spell.c.
References ereport, errcode(), errmsg(), ERROR, filename, findchar(), flag(), lowerstr_ctx(), NIAddSpell(), pfree(), pg_mblen(), tsearch_readline(), tsearch_readline_begin(), and tsearch_readline_end().
Referenced by dispell_init().
TSLexeme * NINormalizeWord | ( | IspellDict * | Conf, |
const char * | word | ||
) |
Definition at line 2541 of file spell.c.
References addNorm(), FF_COMPOUNDLAST, i, MAX_NORM, SplitVar::next, NormalizeSubWord(), SplitVar::nstem, pfree(), pstrdup(), res, SplitToVariants(), SplitVar::stem, IspellDict::usecompound, and word().
Referenced by dispell_lexize().
void NISortAffixes | ( | IspellDict * | Conf | ) |
Definition at line 1977 of file spell.c.
References CMPDAffix::affix, IspellDict::Affix, cmpaffix(), IspellDict::CompoundAffix, FF_COMPOUNDFLAG, FF_PREFIX, FF_SUFFIX, aff_struct::flag, aff_struct::flagflags, i, isAffixInUse(), CMPDAffix::issuffix, CMPDAffix::len, mkANode(), mkVoidAffix(), IspellDict::naffixes, palloc(), IspellDict::Prefix, qsort, repalloc(), aff_struct::repl, aff_struct::replen, strbncmp(), IspellDict::Suffix, and aff_struct::type.
Referenced by dispell_init().
void NISortDictionary | ( | IspellDict * | Conf | ) |
Definition at line 1723 of file spell.c.
References spell_struct::affix, IspellDict::AffixData, Assert, cmpspell(), cmpspellaffix(), cpstrdup(), spell_struct::d, IspellDict::Dictionary, ereport, errcode(), errmsg(), ERROR, spell_struct::flag, i, spell_struct::len, IspellDict::lenAffixData, mkSPNode(), IspellDict::nAffixData, IspellDict::nspell, spell_struct::p, palloc0(), qsort, IspellDict::Spell, IspellDict::useFlagAliases, and spell_struct::word.
Referenced by dispell_init().
void NIStartBuild | ( | IspellDict * | Conf | ) |
Definition at line 89 of file spell.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, IspellDict::buildCxt, and CurTransactionContext.
Referenced by dispell_init().