Scid  4.6.5
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
SpellChecker Class Reference

class SpellChecker - name spelling More...

#include <spellchk.h>

Public Member Functions

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

Static Public Member Functions

static std::pair< errorT, SpellChecker * > Create (const char *filename, const Progress &progress)
 Create() - Create a new SpellChecker object. More...


class SpellChkLoader

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 != 0 the vector is filled with the available biographic informations.
  • if returns NULL and 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 nameT &nt) const

Detailed Description

class SpellChecker - name spelling

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

Definition at line 260 of file spellchk.h.

Constructor & Destructor Documentation

◆ ~SpellChecker()

SpellChecker::~SpellChecker ( )

Definition at line 283 of file spellchk.h.

Member Function Documentation

◆ Create()

static std::pair<errorT, SpellChecker*> SpellChecker::Create ( const char *  filename,
const Progress progress 

Create() - Create a new SpellChecker object.

Create a new SpellChecker reading from . It's the caller's responsibility to free the object with "delete". Return:

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

Definition at line 296 of file spellchk.h.

◆ find()

std::vector<const char*> SpellChecker::find ( const nameT nt,
const char *  name,
uint  nMaxRes = 10 
) const

Definition at line 319 of file spellchk.h.

◆ getGeneralCorrections()

const NameNormalizer& SpellChecker::getGeneralCorrections ( const nameT nt) const

Definition at line 335 of file spellchk.h.

◆ getPlayerElo()

const PlayerElo* SpellChecker::getPlayerElo ( const char *  name) const

Definition at line 362 of file spellchk.h.

◆ getPlayerInfo()

const PlayerInfo* SpellChecker::getPlayerInfo ( const char *  name,
std::vector< const char *> *  bio = 0 
) const

Definition at line 352 of file spellchk.h.

◆ hasEloData()

bool SpellChecker::hasEloData ( ) const

Definition at line 370 of file spellchk.h.

◆ numCorrectNames()

size_t SpellChecker::numCorrectNames ( const nameT nt) const

Definition at line 374 of file spellchk.h.

Friends And Related Function Documentation

◆ SpellChkLoader

friend class SpellChkLoader

Definition at line 280 of file spellchk.h.

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