3

I'm using GATE NLP to process my document, and I want to Use entity names to use as tag candidates In Gate there are OpenNLP and LingPipe as I read an answer form here @Shashikant Kore answer he said

if you have the sentence "My friend Joe Smith went to the Walmart store", OpenNLP identifies two named entities - "Joe Smith" and "Walmart". I couldn't get it tag "Joe Smith" as Person and "Walmart" as Organization.

and suggests to use LingPipe so I used LingPipe that provided in Gate NLP like here

SerialAnalyserController pipeline = (SerialAnalyserController) Factory.createResource("gate.creole.SerialAnalyserController");
        pipeline.add((ProcessingResource) Factory.createResource("gate.lingpipe.TokenizerPR"));
        pipeline.add((ProcessingResource) Factory.createResource("gate.lingpipe.NamedEntityRecognizerPR"));
        pipeline.add((ProcessingResource) Factory.createResource("gate.lingpipe.POSTaggerPR"));
        pipeline.add((ProcessingResource) Factory.createResource("gate.lingpipe.SentenceSplitterPR"));
        Corpus corpus = Factory.newCorpus("SegmenterCorpus");
        Document document = Factory.newDocument(handler.toString());
        corpus.add(document); 
        pipeline.setCorpus(corpus); 
        pipeline.execute();

However, when I run my program I have this Exception

Exception in thread "main" gate.creole.ResourceInstantiationException: No model file provided! at gate.lingpipe.NamedEntityRecognizerPR.init(NamedEntityRecognizerPR.java:55) at gate.lingpipe.NamedEntityRecognizerPR.init(NamedEntityRecognizerPR.java:55)

whats the meaning by No model file provided ?? sorry because I'm asking this question but I'm totally new to this field and I just learn about ANNIE and it didn't need any file when I used it to extract the POS tagging any help??

Community
  • 1
  • 1
Abeer zaroor
  • 320
  • 2
  • 17
  • `NamedEntityRecognizer` requires a parameter `model`. Try to test your pipeline in GATE Developer (GUI) first... But I didn't succeed to make LingPipe NamedEntityRecognizer run. Seems that the plugin is broken in GATE 8.1. Maybe try the mailing list as well. – dedek Feb 29 '16 at 07:49
  • yes its seems that the LingPipe plugin is broken it's give me an error that there is no LingPipe exist although its in the gate file *_* ....I'm reading about Gazetteer to use it I hope to find a java code .....thanx @dedek – Abeer zaroor Feb 29 '16 at 10:43
  • I'm not sure where the gate plugin came from. It may need a LingPipe model (compiled named entity recognizer trained on a corpus with a given tag set) on the classpath. If you can look into the gate.lingpipeNamedEntityRecognizerPR code, it may indicate what path it's looking for. Then you just need to put it on the classpath. – Bob Carpenter Feb 29 '16 at 17:44

1 Answers1

2

Finally it works for me.

I tried File -> Ready Made Applications -> LingPipe -> LingPipe IE System in the GATE GUI. And it has been loaded OK.

The working Model was: $gatehome$plugins/LingPipe/resources/models/ne-en-news-muc6.AbstractCharLmRescoringChunker

The full relevant config for gate.lingpipe.NamedEntityRecognizerPR was:

...    
<string>modelFileUrl</string>
<gate.util.persistence.PersistenceManager-URLHolder>
  <urlString>$gatehome$plugins/LingPipe/resources/models/ne-en-news-muc6.AbstractCharLmRescoringChunker</urlString>
</gate.util.persistence.PersistenceManager-URLHolder>
...

GATE screen clip

dedek
  • 7,981
  • 3
  • 38
  • 68