Documentation

Horde_SpellChecker
in package

Provides a unified spellchecker API.

Tags
author

Chuck Hagenbuch chuck@horde.org

author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2005-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

SUGGEST_FAST  = 1
SUGGEST_NORMAL  = 2
SUGGEST_SLOW  = 3
$_params  : array<string|int, mixed>
Configuration parameters.
__construct()  : mixed
Constructor.
factory()  : Horde_SpellChecker
Attempts to return a concrete Horde_SpellChecker instance based on $driver.
setParams()  : mixed
Set configuration parmeters.
spellCheck()  : array<string|int, mixed>
Perform spellcheck.
_getWords()  : array<string|int, mixed>
TODO
_inLocalDictionary()  : bool
Determine if a word exists in the local dictionary.

Constants

Properties

$_params

Configuration parameters.

protected array<string|int, mixed> $_params = array('html' => \false, 'locale' => 'en', 'localDict' => array(), 'maxSuggestions' => 10, 'minLength' => 3, 'suggestMode' => self::SUGGEST_FAST)

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed> = array()

TODO

Return values
mixed

factory()

Attempts to return a concrete Horde_SpellChecker instance based on $driver.

public static factory(string $driver[, array<string|int, mixed> $params = array() ]) : Horde_SpellChecker
Parameters
$driver : string

The type of concrete subclass to return.

$params : array<string|int, mixed> = array()

A hash containing any additional configuration or connection parameters a subclass might need.

Tags
deprecated
throws
Horde_Exception
Return values
Horde_SpellChecker

The newly created instance.

setParams()

Set configuration parmeters.

public setParams(array<string|int, mixed> $params) : mixed
Parameters
$params : array<string|int, mixed>

Parameters to set.

Return values
mixed

spellCheck()

Perform spellcheck.

public abstract spellCheck(string $text) : array<string|int, mixed>
Parameters
$text : string

Text to spellcheck.

Tags
throws
Horde_SpellChecker_Exception
Return values
array<string|int, mixed>

TODO

_getWords()

TODO

protected _getWords(string $text) : array<string|int, mixed>
Parameters
$text : string

TODO

Return values
array<string|int, mixed>

TODO

_inLocalDictionary()

Determine if a word exists in the local dictionary.

protected _inLocalDictionary(string $word) : bool
Parameters
$word : string

The word to check.

Return values
bool

True if the word appears in the local dictionary.

Search results