Open LinguList opened 4 years ago
I have added the code, but I am not sure how to execute it to examine datasets. Can you @LinguList show me how to execute it?
@MacyL if you command works with a single dataset, you can add a
# Require a dataset as argument for the command:
add_dataset_spec(parser)
to your register()
function. Later, in main()
or wherever you prefer, you can do a ds = get_dataset(args)
and you'll have the dataset in ds
, so you do stuff like for row in ds.cldf_dir.read_csv("forms.csv", dicts=True)
or read directly with the methods offered in ds
(i.e., accessing tables and so on).
Remember to import from cldfbench.cli_util import add_catalog_spec, get_dataset
and from pylexibank.cli_util import add_dataset_spec
@macyl, can I ask you to remind me next week, on Thursday, when I'll be mentally back, to look into this, I could then try to do it on the Friday?
For the time being, you can also write a custom script that just takes a dataset in lexibank as input, filters the wordlist, also with lingpy, and then looks into the segments. If you place this script in lexitools/examples/, you can already use it and we show later, how to integrate it into lexitools?
We have enough examples for this command in our datasets, but we should now make it usable for all datasets.