Overview

Namespaces

  • PHP
  • Sastrawi
    • Dictionary
    • Morphology
      • Disambiguator
    • Specification
    • Stemmer
      • Cache
      • ConfixStripping
      • Context
        • Visitor
      • Filter
    • StopWordRemover

Classes

  • ArrayDictionary

Interfaces

  • DictionaryInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class ArrayDictionary

Implementation of the DictionaryInterface using Array

Sastrawi\Dictionary\ArrayDictionary implements Sastrawi\Dictionary\DictionaryInterface
Namespace: Sastrawi\Dictionary
Located at Sastrawi/Dictionary/ArrayDictionary.php
Methods summary
public
# __construct( array $words = array() )
public boolean
# contains( string $word )

Checks whether a word is contained in the dictionary.

Checks whether a word is contained in the dictionary.

Parameters

$word
string
$word The word to search for.

Returns

boolean
TRUE if the dictionary contains the word, FALSE otherwise.

Implementation of

Sastrawi\Dictionary\DictionaryInterface::contains()
public
# count( )

Implementation of

Countable::count()
public
# addWords( array $words )

Add multiple words to the dictionary

Add multiple words to the dictionary

Parameters

$words
array
$words
public
# add( string $word )

Add a word to the dictionary

Add a word to the dictionary

Parameters

$word
string
$word
Properties summary
protected string[] $words array()
#
API documentation generated by ApiGen 2.8.0