libscid 0.1.0
Chess applications made easy.
Loading...
Searching...
No Matches
scid::spelling::SpellChecker Class Reference

class SpellChecker - name spelling More...

#include <spelling.h>

Public Member Functions

as a prefix.
std::vector< const char * > find (const scid::database::nameT &nt, const char *name, scid::core::uint nMaxRes=10) const
 
const NameNormalizergetGeneralCorrections (const scid::database::nameT &nt) const
 

Static Public Member Functions

static std::pair< scid::core::errorT, std::unique_ptr< SpellChecker > > create (const char *filename, const scid::database::Progress &progress)
 create() - Create a new SpellChecker object
 

Friends

class SpellingLoader
 

is not found or is ambiguous (match multiple players)

SpellChecker::getPlayerInfo() - get extra info about a player

Get extra data like titles/gender, countries, highest elo, date of birth, date of death or biographic informations. Return:

  • on success a pointer to a valid PlayerInfo object containing the available data. If @bio != 0 the vector is filled with the available biographic informations.
  • if returns NULL and @bio is untouched.
const PlayerInfogetPlayerInfo (const char *name, std::vector< const char * > *bio=0) const
 
const PlayerElogetPlayerElo (const char *name) const
 
bool hasEloData () const
 
size_t numCorrectNames (const scid::database::nameT &nt) const
 

Detailed Description

class SpellChecker - name spelling

Read a spell file and allow to retrieve corrected names and players data. if SCID_SPELLING_VALIDATE is defined also check the spell file for errors.

Member Function Documentation

◆ create()

static std::pair< scid::core::errorT, std::unique_ptr< SpellChecker > > scid::spelling::SpellChecker::create ( const char *  filename,
const scid::database::Progress progress 
)
static

create() - Create a new SpellChecker object

Create a new SpellChecker reading from filename. Return:

  • OK and a pointer to the new object.
  • on error the ERROR_*CODE* and nullptr.

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