PHP Class Sastrawi\Dictionary\ArrayDictionary

Inheritance: implements Sastrawi\Dictionary\DictionaryInterface
Afficher le fichier Open project: sastrawi/sastrawi Class Usage Examples

Protected Properties

Свойство Type Description
$words string[]

Méthodes publiques

Méthode Description
__construct ( array $words = [] )
add ( string $word ) : void Add a word to the dictionary
addWords ( array $words ) : void Add multiple words to the dictionary
addWordsFromTextFile ( $filePath, $delimiter = " " ) : void Add words from a text file to the dictionary
contains ( $word )
count ( )
remove ( string $word ) : void Remove a word from the dictionary

Method Details

__construct() public méthode

public __construct ( array $words = [] )
$words array

add() public méthode

Add a word to the dictionary
public add ( string $word ) : void
$word string
Résultat void

addWords() public méthode

Add multiple words to the dictionary
public addWords ( array $words ) : void
$words array
Résultat void

addWordsFromTextFile() public méthode

Add words from a text file to the dictionary
public addWordsFromTextFile ( $filePath, $delimiter = " " ) : void
Résultat void

contains() public méthode

public contains ( $word )

count() public méthode

public count ( )

remove() public méthode

Remove a word from the dictionary
public remove ( string $word ) : void
$word string
Résultat void

Property Details

$words protected_oe property

protected string[] $words
Résultat string[]