Load and execute a finite-state transducer (FST) based converter or bracketing machine from a compact string description.
More...
|
| split (string $input, ?int $start=null, ?int $end=null) |
|
| run (string $input, ?int $start=null, ?int $end=null, bool $unicode=false) |
|
|
static | compile (string $pfst, $justBrackets=false) |
| Load an FST description and return a function which runs the machine.
|
|
Load and execute a finite-state transducer (FST) based converter or bracketing machine from a compact string description.
◆ compile()
static Wikimedia\LangConv\FST::compile |
( |
string | $pfst, |
|
|
| $justBrackets = false ) |
|
static |
Load an FST description and return a function which runs the machine.
- Parameters
-
string | $pfst | The FST description as a filename (to be loaded synchronously) |
bool | $justBrackets | The machine will return an array of bracket locations, instead of the converted text. |
- Returns
- FST
◆ run()
Wikimedia\LangConv\FST::run |
( |
string | $input, |
|
|
?int | $start = null, |
|
|
?int | $end = null, |
|
|
bool | $unicode = false ) |
- Parameters
-
string | $input | |
int | null | $start | |
int | null | $end | |
bool | $unicode | |
- Returns
- string|array
◆ split()
Wikimedia\LangConv\FST::split |
( |
string | $input, |
|
|
?int | $start = null, |
|
|
?int | $end = null ) |
- Parameters
-
string | $input | |
int | null | $start | |
int | null | $end | |
- Returns
- array
The documentation for this class was generated from the following file: