Parsoid
A bidirectional parser between wikitext and HTML5
|
Use a {@Link ReplacementMachine} to predict the best "source language" for every node in a DOM. More...
Public Member Functions | ||||
__construct (FstReplacementMachine $machine, Node $root, $destCode) | ||||
MachineLanguageGuesser constructor. | ||||
guessLang (Element $node) | ||||
| ||||
Use a {@Link ReplacementMachine} to predict the best "source language" for every node in a DOM.
Appropriate for wikis which are written in a mix of variants.
Wikimedia\Parsoid\Language\MachineLanguageGuesser::__construct | ( | FstReplacementMachine | $machine, |
Node | $root, | ||
$destCode ) |
MachineLanguageGuesser constructor.
FstReplacementMachine | $machine | |
Node | $root | |
Bcp47Code | $destCode | a language code |
Wikimedia\Parsoid\Language\MachineLanguageGuesser::guessLang | ( | Element | $node | ) |
Element | $node |
Reimplemented from Wikimedia\Parsoid\Language\LanguageGuesser.