iscoe / dragonfly

NER annotation tool
Apache License 2.0
9 stars 3 forks source link

Export dictionary from other than ~/.dragonfly #9

Closed jamesmayfield closed 5 years ago

jamesmayfield commented 6 years ago

It would be helpful to be able to export a dictionary that is not located in ~/.dragonfly, but rather is specified as a switch or argument to export.py. This would allow easy conversion when you have access to a json dictionary, but not an exported version of it.

cash commented 6 years ago

You could do this like so right now:

cp my_new_dict.json ~/.dragonfly/foo.json
python3 ./scripts/export foo
jamesmayfield commented 6 years ago

Yes, that's how I did it (so it's not particularly urgent). However, if you already have a dictionary for that language there's a bunch of annoying bookkeeping you need to do to implement this solution.

cash commented 6 years ago

You can make up whatever language codes you want (like 'foo') in my example so you don't need to rename files. If you wanted, you could have multiple dictionaries (sin1.json, sin2.json) and switch between them when running dragonfly.

But yes, I can add this.