kernel
[ class tree: kernel ] [ index: kernel ] [ all elements ]

Class: Bablotron

Source Location: /languages/Bablotron.php

Class Overview

BitBase
   |
   --Bablotron

Spellcheck Library


Author(s):

Variables

Methods


Inherited Constants

Inherited Variables

Inherited Methods

Class: BitBase

BitBase::BitBase()
During initialisation, we assign a name which is used by the class.
BitBase::__construct()
BitBase::clearFromCache()
BitBase::expunge()
Delete content object and all related records
BitBase::load()
BitBase::__destruct()

Class Details

[line 30]
Spellcheck Library



Tags:

todo:  does not need to inherit BitBase class. Should hold a BitDb connection as a global variable.


[ Top ]


Class Variables

$db =

[line 45]



Tags:

todo:  Empty variable - does nothing

Type:   mixed


[ Top ]

$lan =

[line 41]

Used to store the current language.



Tags:

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

Type:   mixed


[ Top ]

$words =

[line 35]



Tags:

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

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 49]

Bablotron __construct( $lan)

Spellchecking and finding of alternative words



Overrides BitBase::__construct() (parent method not documented)

Parameters:

   $lan  

[ Top ]

method find_similar [line 168]

void find_similar( $word, $threshold)



Tags:

todo:  Empty function - does nothing


Parameters:

   $word  
   $threshold  

[ Top ]

method find_similar_words [line 120]

array find_similar_words( word $word, threshold $threshold)

Lists similar words by relevance threshold.



Tags:

return:  of similar words and Levenshtein distance


Parameters:

word   $word   the word
threshold   $threshold   the similarity threshold

[ Top ]

method quick_spellcheck_text [line 101]

array quick_spellcheck_text( text $text, [threshold $threshold = 5])

Spellchecks a line of text



Tags:

return:  a list of incorrectly spelt words or words not found in the database


Parameters:

text   $text   line of text
threshold   $threshold   Not used @todo param threshold Not used

[ Top ]

method spellcheck_text [line 67]

array spellcheck_text( text $text, [threshold $threshold = 5])

Spellchecks a line of text



Tags:

return:  a list of alternative words if spelt incorrectly


Parameters:

text   $text   line of text
threshold   $threshold   the similarity threshold

[ Top ]

method spellcheck_word [line 86]

array spellcheck_word( word $word, [threshold $threshold = 5])

Spellchecks a word



Tags:

return:  a list of alternative words if spelt incorrectly


Parameters:

word   $word   the word
threshold   $threshold   the similarity threshold

[ Top ]

method sql_error [line 57]

void sql_error( $query, $result)



Tags:

todo:  Empty function - does nothing


Parameters:

   $query  
   $result  

[ Top ]

method word_exists [line 157]

int word_exists( word $word)

Checks if a word exists



Tags:

return:  number of matches


Parameters:

word   $word   the word

[ Top ]


Documentation generated on Wed, 29 Jul 2015 13:55:36 +0000 by phpDocumentor 1.5.0-lsces