Closed LinguList closed 4 months ago
I suggest anyway to please add a folder examples
and just include eval.py
there. Add a README as well, so I can see what it is doing and supposed to do.
Please check the following for accessing data in CLTS:
from pyclts import CLTS
clts = CLTS()
print(clts.repos / "?")
clts.repos
is a posix-path that leads to the CLTS folder, so you have access to the data in this folder, to the file that is copied as sounds.tsv
from the CLTS repo.
So copying data is not needed, just load it:
from csvw.dsv import UnicodeDictReader
from pyclts import CLTS
clts = CLTS() # assumes your repos is fixed with `cldf catconfig`
with UnicodeDictReader(clts.repos / "data" / "sounds.tsv", delimiter="\t") as reader:
data = [row for row in reader]
So copying data is not needed, just load it:
Thank you, I didn't know that was possible. Just for clarification, sounds.tsv
was only used for evaluation, though - the core package does not rely on it.
add a README
Will do.
Yes, in any case, loading data from copied files, when it is not needed, should be avoided ;-)
I do not understand why the folder
resources
copies all CLTS sounds, given that they are part of the CLTS repo anyway, and this repo is used by clts2vec?