saul icon indicating copy to clipboard operation
saul copied to clipboard

testing SRL on plain text

Open sarschu opened this issue 7 years ago • 3 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

sarschu avatar Apr 05 '18 07:04 sarschu

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?

kordjamshidi avatar Apr 07 '18 23:04 kordjamshidi

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?

sarschu avatar Apr 09 '18 09:04 sarschu

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

kordjamshidi avatar Apr 10 '18 04:04 kordjamshidi