OnlpLab/NEMO

"md_lattice" output format

Closed this issue · 1 comments

Hi,

I'd appreciate your help finding a simple way to extract the lemmas from NEMO's output.

So far I tried extracting them from "md_lattice" output, but I'm having with the format.

I tried reading the output with pd:

import pandas as pd
import io
pd.read_csv(io.StringIO(res[0]["md_lattice"]), sep="\t", header=None)[3]

This doesn't always work.

Thanks!

cjer commented

There is a read_lattice function in nemo.py that you can use.
(This will probably move to the bclm package soon which has a similar function. The only reason for this code duplication is that current version there only accepts file inputs).

Closing for now. Feel free to reopen if you have issues with using the function.