juntaoy / aracoref

Code for Neural Coreference Resolution for Arabic
Apache License 2.0
10 stars 1 forks source link

How to make predictions on new data? #1

Open yotamnahum opened 3 years ago

yotamnahum commented 3 years ago

HI,

First of all thanks for sharing this important work! Arabic coreference resolution it's somthing that could make a big influance to the Arabic NLP community!

Two questions:

1.How to make predictions on new data? In your examples I saw only tarin and evaluation instructions. It will be wonderful if you add prediction (without evaluation) instructions.

  1. It seems that your pre-traind model is missing some files (mainly vocab and config files). Am I missing somthing? :)

Thanks!

juntaoy commented 3 years ago

Hi, Thanks for the kind words:)

So the system does output the CoNLL file when you run the evaluation.py but the output is stored in a temporary file. If you want to redirect the output you can change line 95 of the conll.py

with tempfile.NamedTemporaryFile(delete=False, mode="w") as prediction_file:

You will need to convert your data into both CoNLL format and json format and replace the conll_test_path and test_path with your files respectively.

For the second question, the pre-trained model is in the logs folder, and the files in the data folder are the mention predicted by Yu et al 2020's mention detector (you don't need them if you use the joint system).

Best,

Juntao