CogComp / saul

Saul : Declarative Learning-Based Programming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

testing SRL on plain text

sarschu opened this issue · comments

Hi,
I wondered how I can use the pretrained SRL model on unlabeled text. Is there a specific format I have to convert my test files to?

Cheers
Sarah

Hi Sarah, though this should be easily doable currently this is not supported. However, why don't you use the cogcomp demo http://cogcomp.org/page/demo_view/srl if you want to test a small piece of text?

Hi,
thanks for the link to the demo page. I didn't find a way to export the results from there. Also, in case the SRL works reasonably well for my data, I would like to integrate it into a workflow.
Do you have any pointer on how to implement a data reader for plain text files?

Sarah, below link is the code that is used to read the data. you can read your plain text into List<TextAnnotation>. Each sentence which is simply a string is read into a TextAnnotation object and then this list is formed and passed to the learning models. https://github.com/CogComp/saul/blob/master/saul-examples/src/main/java/edu/illinois/cs/cogcomp/saulexamples/data/SRLDataReader.java