Closed feralvam closed 5 years ago
Hi @feralvam. The vocab file path is specified in <MODEL_FILE>.nlp.json
. In your case, in resources/ucca/models/ucca-bilstm.nlp.json
.
You're right, though, it is a path relative to your current working directory. It would definitely be better if it was relative to the model, but I haven't fixed that yet.
Hi Daniel, thanks for the quick reply. Unfortunately, changing the path in <MODEL_FILE>.nlp.json
didn't solve the problem.
I think that model.load()
causes this. Lines 287-290 do the job and read the correct path (resources/ucca/vocab/en_core_web_lg.csv
) and set self.config.args.vocab
accordingly. However, the loop in lines 293-295 changes the value to vocab/en_core_web_lg.csv
. Any idea why this could happen?
Oh right! That's just because the saved feature param also includes the vocab path as an attribute. Switching the order should fix it. Thanks.
It seems to be working now. Thanks for the quick fix :)
Hi, I want to parse some text using TUPA within some code. After reading some examples around, I am using this:
However, I get the following error when testing this code:
Now, that file does exist. My folder structure is:
Maybe it cannot find it because it's a relative path? What would be the best way to fix this? I imagine that one way would be to pass the vocabulary path directly, but how can one do this? should it be inside the config parameter of Parser?
Thanks for the help.