#include <corrector.h>
Public Member Functions | |
corrector (const std::string &, dictionary &) | |
Constructor. | |
~corrector () | |
Destructor. | |
void | annotate (sentence &) |
Navigates the sentence adding alternative words (possible correct spelling data). | |
Private Member Functions | |
std::string | getKey (std::string) |
returns the consonant key of a word | |
void | putWords (std::string, word &) |
adds the new words that are posible correct spellings from original word to the word analysys data | |
Private Attributes | |
database | similar_words |
indexed file with similar words | |
dictionary * | dict |
The dictionary that FreeLing is currently using. | |
phonetics * | ph |
The class that translates a word into phonetic sounds. | |
bool | useSoundDict |
Whether phonetic conversions should use a sound dictionary. | |
phoneticDistance * | phd |
The class that calculate the phonetic distante between two phonetic transcriptions. | |
similarity * | sm |
the class that computes edit distance between two words | |
int | distanceMethod |
The method to calculate the distance between words. | |
double | SimThresholdKnown |
Minimum similariy to consider a word as a possible correction for a known word. | |
double | SimThresholdUnknownLow |
Minimum similariy to consider a word as a possible correction for an unknown word, when no exact phonetic match is found. | |
double | SimThresholdUnknownHigh |
Minimum similariy to consider a word as a possible correction for an unknown word, when some exact phonetic match is found. | |
int | MaxSizeDiff |
Maximum lentgh difference to consider a word as a possible correction. | |
RegEx | dictionaryCheck |
contains the tags for which the words that are present in the dictionary will be checked | |
bool | noDictionaryCheck |
whether words not present in the dictionary are to be spell checked |
corrector::corrector | ( | const std::string & | , | |
dictionary & | ||||
) |
Constructor.
corrector::~corrector | ( | ) |
Destructor.
void corrector::annotate | ( | sentence & | ) |
Navigates the sentence adding alternative words (possible correct spelling data).
Referenced by maco::analyze().
std::string corrector::getKey | ( | std::string | ) | [private] |
returns the consonant key of a word
void corrector::putWords | ( | std::string | , | |
word & | ||||
) | [private] |
adds the new words that are posible correct spellings from original word to the word analysys data
dictionary* corrector::dict [private] |
The dictionary that FreeLing is currently using.
RegEx corrector::dictionaryCheck [private] |
contains the tags for which the words that are present in the dictionary will be checked
int corrector::distanceMethod [private] |
The method to calculate the distance between words.
int corrector::MaxSizeDiff [private] |
Maximum lentgh difference to consider a word as a possible correction.
bool corrector::noDictionaryCheck [private] |
whether words not present in the dictionary are to be spell checked
phonetics* corrector::ph [private] |
The class that translates a word into phonetic sounds.
phoneticDistance* corrector::phd [private] |
The class that calculate the phonetic distante between two phonetic transcriptions.
database corrector::similar_words [private] |
indexed file with similar words
double corrector::SimThresholdKnown [private] |
Minimum similariy to consider a word as a possible correction for a known word.
double corrector::SimThresholdUnknownHigh [private] |
Minimum similariy to consider a word as a possible correction for an unknown word, when some exact phonetic match is found.
double corrector::SimThresholdUnknownLow [private] |
Minimum similariy to consider a word as a possible correction for an unknown word, when no exact phonetic match is found.
similarity* corrector::sm [private] |
the class that computes edit distance between two words
bool corrector::useSoundDict [private] |
Whether phonetic conversions should use a sound dictionary.