|
libscid 0.1.0
Chess applications made easy.
|
class NameNormalizer - apply general corrections to a name More...
#include <spelling.h>
: the name to be corrected | |
normalize() - correct a name Return: count of corrections applied | |
| size_t | normalize (std::string *name) const |
| scid::core::errorT | addPrefix (const char *s) |
| add*fix() - add a general correction | |
| scid::core::errorT | addInfix (const char *s) |
| scid::core::errorT | addSuffix (const char *s) |
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"
| scid::core::errorT scid::spelling::NameNormalizer::addPrefix | ( | const char * | s | ) |
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