FreeLing  3.0
Public Member Functions | Private Member Functions | Private Attributes
corrector Class Reference

#include <corrector.h>

Inheritance diagram for corrector:
Inheritance graph
[legend]
Collaboration diagram for corrector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 corrector (const std::wstring &, dictionary &)
 Constructor.
 ~corrector ()
 Destructor.
void analyze (sentence &)
 spell check each word in sentence
void analyze (std::list< sentence > &)
 spell check each word in sentences
sentence analyze (const sentence &)
 spell check each word in sentence, return copy
std::list< sentenceanalyze (const std::list< sentence > &)
 spell check each word in sentences, return copy

Private Member Functions

std::wstring getKey (std::wstring)
 returns the consonant key of a word
void putWords (std::wstring, word &)
 adds the new words that are posible correct spellings from original word to the word analysys data
int getPhoneticDistance (aligner< int > *, const std::wstring &, const std::wstring &)
 compute distance between words

Private Attributes

databasesimilar_words
 file with similar words
dictionarydict
 The dictionary that FreeLing is currently using.
phoneticsph
 The class that translates a word into phonetic sounds.
aligner< int > * phd
 The class that calculate the phonetic distante between two phonetic transcriptions.
similaritysm
 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.
boost::u32regex 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

Constructor & Destructor Documentation

corrector::corrector ( const std::wstring &  ,
dictionary  
)

Constructor.

Destructor.


Member Function Documentation

void corrector::analyze ( sentence ) [virtual]

spell check each word in sentence

Implements processor.

Referenced by maco::analyze().

void corrector::analyze ( std::list< sentence > &  )

spell check each word in sentences

Reimplemented from processor.

spell check each word in sentence, return copy

Reimplemented from processor.

std::list<sentence> corrector::analyze ( const std::list< sentence > &  )

spell check each word in sentences, return copy

Reimplemented from processor.

std::wstring corrector::getKey ( std::wstring  ) [private]

returns the consonant key of a word

int corrector::getPhoneticDistance ( aligner< int > *  ,
const std::wstring &  ,
const std::wstring &   
) [private]

compute distance between words

void corrector::putWords ( std::wstring  ,
word  
) [private]

adds the new words that are posible correct spellings from original word to the word analysys data


Member Data Documentation

The dictionary that FreeLing is currently using.

boost::u32regex corrector::dictionaryCheck [private]

contains the tags for which the words that are present in the dictionary will be checked

The method to calculate the distance between words.

int corrector::MaxSizeDiff [private]

Maximum lentgh difference to consider a word as a possible correction.

whether words not present in the dictionary are to be spell checked

The class that translates a word into phonetic sounds.

aligner<int>* corrector::phd [private]

The class that calculate the phonetic distante between two phonetic transcriptions.

file with similar words

double corrector::SimThresholdKnown [private]

Minimum similariy to consider a word as a possible correction for a known word.

Minimum similariy to consider a word as a possible correction for an unknown word, when some exact phonetic match is found.

Minimum similariy to consider a word as a possible correction for an unknown word, when no exact phonetic match is found.

the class that computes edit distance between two words


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