vislcg3 alongside HFST's python module

7 views
Skip to first unread message

Robert Reynolds

unread,
Mar 6, 2019, 11:59:16 AM3/6/19
to Constraint Grammar
Hey, all!

I'm looking to publish a number of Russian NLP tools in a single python module, using HFST/VISLCG3. The hfst python module works well, but I can't find a straightforward way to use vislcg3 from python.

I can, of course, convert the hfst output (tuples) into one of the accepted stream formats and send it to a subprocess (as is done here), but accessing cg3 as a library would be more efficient.

I found this github repo that seems promising, but it's not well documented, and I haven't had time to dig in to it. Does anyone know of example code using this module?

Rob

unha...@gmail.com

unread,
Mar 6, 2019, 3:48:56 PM3/6/19
to Constraint Grammar
Robert Reynolds čálii:

[...]

> I found this github repo <https://github.com/ljos/pyvislcg3> that seems
> promising, but it's not well documented, and I haven't had time to dig in
> to it. Does anyone know of example code using this module?

That looks promising.

https://github.com/ljos/pyvislcg3/blob/master/cg3/ccore.pxd
is missing a very convenient function

        void cg3_run_grammar_on_text(cg3_applicator*, std_istream*, std_ostream*);

which was only recently added to the API; it should be simple to add it
to the pxd.

Reply all
Reply to author
Forward
0 new messages