Scid  4.7.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
List of all members
NameNormalizer Class Reference

class NameNormalizer - apply general corrections to a name More...

#include <spellchk.h>

: the name to be corrected

normalize() - correct a name

Return: count of corrections applied

size_t normalize (std::string *name) const
 
errorT addPrefix (const char *s)
 add*fix() - add a general correction More...
 
errorT addInfix (const char *s)
 
errorT addSuffix (const char *s)
 

Detailed Description

class NameNormalizer - apply general corrections to a name

Spelling files can provide general corrections in the form: Prefix "wrong prefix" "correct prefix" Infix "wrong suffix" "correct suffix" Suffix "wrong suffix" "correct suffix"

Example: Prefix "II " "2. " Infix "3rd " "3. " Suffix "(Italy)" "ITA" "II champ 3rd II 3rd (Italy) (Italy)" –> "2. champ 3. II 3. (Italy) ITA"

Definition at line 53 of file spellchk.h.

Member Function Documentation

◆ addInfix()

errorT NameNormalizer::addInfix ( const char *  s)
inline

Definition at line 112 of file spellchk.h.

◆ addPrefix()

errorT NameNormalizer::addPrefix ( const char *  s)
inline

add*fix() - add a general correction

Adds a general prefix, infix or suffix correction. Syntax for s is: Suffix "wrong suffix" "correct suffix" Return: OK if successful

Definition at line 111 of file spellchk.h.

◆ addSuffix()

errorT NameNormalizer::addSuffix ( const char *  s)
inline

Definition at line 113 of file spellchk.h.

◆ normalize()

size_t NameNormalizer::normalize ( std::string *  name) const
inline

Definition at line 66 of file spellchk.h.


The documentation for this class was generated from the following file: