Language Converter
Finite-State Transducer implementation of MediaWiki LanguageConverter
|
A mutable FST. More...
Public Member Functions | |
__construct (array $alphabet) | |
Create a new MutableFST with the given alphabet. | |
newState () | |
Add a new state to this FST. | |
getStartState () | |
Return the start state of this FST. | |
applyDown (array $input) | |
Apply the given FST to the array of input tokens. | |
applyUp (array $input) | |
Apply the given FST to the array of input tokens. | |
optimize () | |
Perform simple optimization on the FST, trimming unreachable states and attempting to combine edges containing epsilons. | |
writeATT ( $handle) | |
Write an AT&T format description of this FST to the given filehandle. | |
A mutable FST.
Wikimedia\LangConv\Construct\MutableFST::__construct | ( | array | $alphabet | ) |
Create a new MutableFST with the given alphabet.
string[] | $alphabet |
Wikimedia\LangConv\Construct\MutableFST::applyDown | ( | array | $input | ) |
Apply the given FST to the array of input tokens.
Symbols in 'upper' are matched and symbols in 'lower' are emitted.
string[] | $input |
Wikimedia\LangConv\Construct\MutableFST::applyUp | ( | array | $input | ) |
Apply the given FST to the array of input tokens.
Symbols in 'lower' are matched and symbols in 'upper' are emitted.
string[] | $input |
Wikimedia\LangConv\Construct\MutableFST::getStartState | ( | ) |
Return the start state of this FST.
Wikimedia\LangConv\Construct\MutableFST::newState | ( | ) |
Add a new state to this FST.
Wikimedia\LangConv\Construct\MutableFST::writeATT | ( | $handle | ) |
Write an AT&T format description of this FST to the given filehandle.
resource | $handle |