jkkummerfeld / berkeley-coreference-analyser

A tool for classifying errors in coreference resolution
ISC License
29 stars 11 forks source link

Input file #2

Closed humehta closed 4 years ago

humehta commented 6 years ago

Can we give the input as a text file?

jkkummerfeld commented 6 years ago

The system is designed to handle a range of formats, see:

https://github.com/jkkummerfeld/berkeley-coreference-analyser/blob/master/nlp_util/coreference_reading.py

If you have your own format then looking in that file will also give you some idea about how to write your own reading code. At the top of each function there is a short example of the format. For example, see:

https://github.com/jkkummerfeld/berkeley-coreference-analyser/blob/master/nlp_util/coreference_reading.py#L244

Which has <COREF ID="8" REF="7">Giant</COREF> agreed last month to purchase the <COREF ID="3" REF="2">carrier</COREF> .

The input reading is called here - https://github.com/jkkummerfeld/berkeley-coreference-analyser/blob/master/classify_coreference_errors.py#L1016 and so once you have your reading code you just need to modify that line to have the system run.