Expand description
morph: — pymorphy3, the Russian morphological analyser, as a
Quarb command library: the pilot of a library that wraps another
language’s library through an embedded interpreter (spec: Command
Libraries). The commands are declared here, in Rust, with the
synopsis the engine checks before the run; a page of Python glue
(compiled once, the analyser built once) adapts pymorphy3’s
objects to the call shape, and the values cross through
quarb-pyvalue, the same mapping quarb-py uses the other way.
What the pilot proves of the contract: the synopsis per command
(operands, options with short and long names, pipe, input slot,
return); the required prefix; no mount (the library is pure and
linked); the input slot (first positional unless $_ places it;
after @| the stream is the value and the call runs once over
it); options as keyword arguments; value conversion both ways;
failure as null after | and a refusal after @|, the module’s
stdout redirected to stderr during a call; a run-time requirement
(the pymorphy3 package and pymorphy3-dicts-ru) refused by name
before the run where it is not importable.
What a node becomes: the engine hands a node to a library as the
record of its name, its text (::) and its properties, a
snapshot; this library reads a word from the text field.
Structs§
- Morph
- The library.