Overview

Namespaces

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

Classes

  • Context
  • Removal

Interfaces

  • ContextInterface
  • RemovalInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class Context

Stemming Context using Nazief and Adriani, CS, ECS, Improved ECS

Sastrawi\Stemmer\Context\Context implements Sastrawi\Stemmer\Context\ContextInterface, Sastrawi\Stemmer\Context\Visitor\VisitableInterface
Namespace: Sastrawi\Stemmer\Context
Located at Sastrawi/Stemmer/Context/Context.php
Methods summary
public
# __construct( string $originalWord, Sastrawi\Dictionary\DictionaryInterface $dictionary, Sastrawi\Stemmer\Context\Visitor\VisitorProvider $visitorProvider )

Parameters

$originalWord
string
$originalWord
$dictionary
Sastrawi\Dictionary\DictionaryInterface
$dictionary
$visitorProvider
Sastrawi\Stemmer\Context\Visitor\VisitorProvider
$visitorProvider
protected
# initVisitors( )
public
# setDictionary( Sastrawi\Dictionary\DictionaryInterface $dictionary )
public Sastrawi\Dictionary\DictionaryInterface
# getDictionary( )

Returns

Sastrawi\Dictionary\DictionaryInterface

Implementation of

Sastrawi\Stemmer\Context\ContextInterface::getDictionary()
public string
# getOriginalWord( )

Returns

string

Implementation of

Sastrawi\Stemmer\Context\ContextInterface::getOriginalWord()
public
# setCurrentWord( mixed $word )

Implementation of

Sastrawi\Stemmer\Context\ContextInterface::setCurrentWord()
public string
# getCurrentWord( )

Returns

string

Implementation of

Sastrawi\Stemmer\Context\ContextInterface::getCurrentWord()
public
# stopProcess( )

Implementation of

Sastrawi\Stemmer\Context\ContextInterface::stopProcess()
public boolean
# processIsStopped( )

Returns

boolean

Implementation of

Sastrawi\Stemmer\Context\ContextInterface::processIsStopped()
public
# addRemoval( Sastrawi\Stemmer\Context\RemovalInterface $removal )

Implementation of

Sastrawi\Stemmer\Context\ContextInterface::addRemoval()
public Sastrawi\Stemmer\Context\RemovalInterface[]
# getRemovals( )

Returns

Sastrawi\Stemmer\Context\RemovalInterface[]

Implementation of

Sastrawi\Stemmer\Context\ContextInterface::getRemovals()
public
# getResult( )
public
# execute( )

Execute stemming process; the result can be retrieved with getResult()

Execute stemming process; the result can be retrieved with getResult()

protected
# startStemmingProcess( )
protected
# removePrefixes( )
protected
# removeSuffixes( )
public
# accept( Sastrawi\Stemmer\Context\Visitor\VisitorInterface $visitor )

Implementation of

Sastrawi\Stemmer\Context\Visitor\VisitableInterface::accept()
protected
# acceptVisitors( array $visitors )
protected
# acceptPrefixVisitors( array $visitors )
public
# loopPengembalianAkhiran( )

ECS Loop Pengembalian Akhiran

ECS Loop Pengembalian Akhiran

protected boolean
# isSuffixRemoval( Sastrawi\Stemmer\Context\RemovalInterface $removal )

Check wether the removed part is a suffix

Check wether the removed part is a suffix

Parameters

$removal
Sastrawi\Stemmer\Context\RemovalInterface
$removal

Returns

boolean
public
# restorePrefix( )

Restore prefix to proceed with ECS loop pengembalian akhiran

Restore prefix to proceed with ECS loop pengembalian akhiran

Properties summary
protected string $originalWord
#
protected string $currentWord
#
protected boolean $processIsStopped false
#
protected Sastrawi\Stemmer\Context\RemovalInterface[] $removals array()
#
protected Sastrawi\Dictionary\DictionaryInterface $dictionary
#
protected Sastrawi\Stemmer\Context\Visitor\VisitorProvider $visitorProvider
#
protected Sastrawi\Stemmer\Context\Visitor\VisitorInterface[] $visitors array()
#
protected Sastrawi\Stemmer\Context\Visitor\VisitorInterface[] $suffixVisitors array()
#
protected Sastrawi\Stemmer\Context\Visitor\VisitorInterface[] $prefixVisitors array()
#
protected string $result
#
API documentation generated by ApiGen 2.8.0