0

I'm new to openNLP. I want to know how to build our own model to train to pick our specific data in java with openNLP. Highly appreciate all your answers.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Anushka Ekanayake
  • 977
  • 2
  • 13
  • 33
  • Can you provide a bit more context about what specific programming aspect you are stuck with? Right now your question seems extremely broad: "how do I design and implement an entire system?"... – Andrzej Doyle Nov 26 '14 at 10:06
  • I want to identify names and dates in a given sentence by using NLP. So I'm using openNLP. and I want to train a model to identify names and dates. So can you guide me how to train a new model for that in java by using opneNLP – Anushka Ekanayake Nov 26 '14 at 10:20

1 Answers1

1

There are several trainable components in OpenNLP. DocumentCategorizer NameFinder Tokenizer POSTagger Chunker Parser

The ones I have particularly used the most are the NameFinder (for named entity extraction/recognition) and the documentCategorizer, which is used for text classification like sentiment analysis.

The namefinder has a training format that this post might help understand traning OPenNLP error and this Writing our own models in openNLP

the documentCategorizer has a differnt format but is quite simple. take a look at the docs here non the OpenNLP site http://opennlp.apache.org/documentation/1.5.3/manual/opennlp.htm

HTH

just saw you comment, so updating. You want to train a namefinder for your use case. So you create a file of sentences, and each sentence you annotate the entity in the sentence as in the link I provided, then build the model. You'll want about 15000 sentences to get really good results.

Community
  • 1
  • 1
Mark Giaconia
  • 3,844
  • 5
  • 20
  • 42