cldf / cookbook

Recipes for cooking with CLDF data
https://cldf.clld.org
Apache License 2.0
17 stars 7 forks source link

add script to convert LingPy's QLC format to CLDF Wordlist #2

Open xrotwang opened 6 years ago

Anaphory commented 5 years ago

I have just written a blogpost for @LinguList's http://calc.hypotheses.org which shows how to do this. The blog post (second one in a series of three, the first one is https://calc.hypotheses.org/803 and is a different take on a recipe we already have) will probably go online in a few days.

That blogpost addresses this issue, though not yet as formal part of this cookbook. The way I do it is by providing a generic metadata file https://github.com/Anaphory/matrix_to_beastling/blob/master/Generic-LingPy-Wordlist-metadata.json which turns a LingPy QLC file into a valid CLDF wordlist. (Given that LingPy QLC is more restrictive than CLDF TSV, allowing no line breaks, quoted values etc., I expect that this should be the best way to do it in general.)