I am finding it difficult to create my own model openNLP. Can any one tell me, how to own model. How the training shouls be done.
What should be the input and where
First you need to train the data with the required Entity.
Sentences should be separated with new line character (\n). Values should be separated from and tags with a space character.
Let's say you want to create medicine entity model, so data should be something like this:
Augmentin-Duo is a penicillin antibiotic that contains two medicines - amoxicillin trihydrate and
potassium clavulanate . They work together to kill certain types of bacteria and are used to treat certain types of bacterial infections.
You can refer a sample dataset for example. Training data should have at least 15000 sentences to get the better results.
Further you can use Opennlp TokenNameFinderTrainer. Output file will be in the .bin format.
Here is the example: Writing a custom NameFinder model in OpenNLP
For more details, refer the Opennlp documentation