This class basically just stores an array of words (TranslationWord objects), count of their appearances in the sentence, and can return these properties. The main function of this class is to compare itself with another instance, and return the contained words' match percentage for finding similar sentences. It can be initialized two ways: Adding words one by one or parse a sentence.
Definition at line 33 of file TranslationWordList.php.
Public Member Functions | |
__construct ($text="") | |
rewind () | |
hasMore () | |
key () | |
current () | |
next () | |
valid () | |
AddWord ($word, $count=1) | |
AddID ($id, $count=1) | |
SetIDByName ($word, $id) | |
SetFakeLength ($length) | |
& | FindByName ($word) |
& | FindByID ($id) |
SumCount () | |
CompareByID ($otherWords) | |
Static Public Member Functions | |
static | InitWordsCache () |
Static Public Attributes | |
static | $WordsCache |
Private Member Functions | |
SplitToWords ($text) | |
AddToWordIndex () | |
Private Attributes | |
$allWords | |
$fakeLength | |
$DB | |
$Tables | |
$currIndex |