Bablotron Class Reference

Inheritance diagram for Bablotron:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Bablotron ($lan)
 find_similar ($word, $threshold)
 find_similar_words ($word, $threshold)
 quick_spellcheck_text ($text, $threshold=5)
 spellcheck_text ($text, $threshold=5)
 spellcheck_word ($word, $threshold=5)
 sql_error ($query, $result)
 word_exists ($word)

Public Attributes

 $db
 $lan
 $words

Detailed Description

Definition at line 30 of file Bablotron.php.


Member Function Documentation

Bablotron::Bablotron ( lan  ) 

Spellchecking and finding of alternative words

Definition at line 49 of file Bablotron.php.

References $lan, and BitBase::BitBase().

Here is the call graph for this function:

Bablotron::find_similar ( word,
threshold 
)

Todo:
Empty function - does nothing

Definition at line 168 of file Bablotron.php.

Bablotron::find_similar_words ( word,
threshold 
)

Lists similar words by relevance threshold.

Parameters:
word the word
threshold the similarity threshold
Returns:
array of similar words and Levenshtein distance

Definition at line 120 of file Bablotron.php.

References $query, $res, $result, and mDb.

Referenced by spellcheck_text(), and spellcheck_word().

Bablotron::quick_spellcheck_text ( text,
threshold = 5 
)

Spellchecks a line of text

Parameters:
text line of text
threshold Not used
Todo:
param threshold Not used
Returns:
array a list of incorrectly spelt words or words not found in the database

Definition at line 101 of file Bablotron.php.

References $results, $text, $words, and word_exists().

Here is the call graph for this function:

Bablotron::spellcheck_text ( text,
threshold = 5 
)

Spellchecks a line of text

Parameters:
text line of text
threshold the similarity threshold
Returns:
array a list of alternative words if spelt incorrectly

Definition at line 67 of file Bablotron.php.

References $results, $text, $words, find_similar_words(), and word_exists().

Here is the call graph for this function:

Bablotron::spellcheck_word ( word,
threshold = 5 
)

Spellchecks a word

Parameters:
word the word
threshold the similarity threshold
Returns:
array a list of alternative words if spelt incorrectly

Definition at line 86 of file Bablotron.php.

References $results, find_similar_words(), and word_exists().

Here is the call graph for this function:

Bablotron::sql_error ( query,
result 
)

Todo:
Empty function - does nothing

Definition at line 57 of file Bablotron.php.

Bablotron::word_exists ( word  ) 

Checks if a word exists

Parameters:
word the word
Returns:
int number of matches

Definition at line 157 of file Bablotron.php.

References $query, $result, and mDb.

Referenced by quick_spellcheck_text(), spellcheck_text(), and spellcheck_word().


Member Data Documentation

Bablotron::$db

Todo:
Empty variable - does nothing

Definition at line 45 of file Bablotron.php.

Bablotron::$lan

Used to store the current language.

Todo:
Not sure where this gets set from. Is used in other libraries.

Definition at line 41 of file Bablotron.php.

Referenced by Bablotron().

Bablotron::$words

Todo:
Variable is scoped here but not really used in this scope below.

Definition at line 35 of file Bablotron.php.

Referenced by quick_spellcheck_text(), and spellcheck_text().


The documentation for this class was generated from the following file:
Generated on Wed Aug 22 19:33:59 2007 for bitweaver by  doxygen 1.5.2