You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by ku...@accenture.com on 2013/12/16 08:33:16 UTC
Not Able to Extract Person Entities by Creating Custom Model
Dear OPENNLP Experts
I am trying to build the Person Statistical model using OPEN NLP API's , refer to java class "OpenNLPPersonTrainer" .
Training data is as in "train.txt"
However , I am getting the following message.
Indexing events using cutoff of 5
Computing event counts... java.io.IOException: Found unexpected annotation: ?<START:person> Kunal ###<END>### .
Incorporating indexed data for training...
Exception in thread "main" java.lang.NullPointerException
at opennlp.maxent.GISTrainer.trainModel(GISTrainer.java:263)
at opennlp.maxent.GIS.trainModel(GIS.java:256)
at opennlp.model.TrainUtil.train(TrainUtil.java:184)
at opennlp.tools.namefind.NameFinderME.train(NameFinderME.java:366)
at opennlp.tools.namefind.NameFinderME.train(NameFinderME.java:432)
at opennlp.tools.namefind.NameFinderME.train(NameFinderME.java:443)
at opennlp.tools.namefind.NameFinderME.train(NameFinderME.java:448)
at com.test.OpenNLPPersonTrainer.main(OpenNLPPersonTrainer.java:73)
I have tried out almost everything but not able to move forward, please let me know, what I am doing wrong.
Thanks & Regards,
Kunal Kishore Sinha
Information Management Capability, India Delivery Center, Bangalore-7|Desk: +91 8067051455
Mobile No:9035749331
mailto:kunal.kishore.sinha@accenture.com
[Untitled]
________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. .
______________________________________________________________________________________
www.accenture.com
Re: Not Able to Extract Person Entities by Creating Custom Model
Posted by Jörn Kottmann <ko...@gmail.com>.
Hello,
please don't double post.
The training format requires that there are spaces between words and the
annotation tags.
You are missing the spaces, as far as I can see.
You have:
?<START:person> Kunal ###<END>### .
but it should be (added spaces):
? <START:person> Kunal ### <END> ### .
Anyway if you need to annotate a bigger amount of data I strongly
suggest to use an annotation tool.
HTH,
Jörn
On 12/16/2013 08:33 AM, kunal.kishore.sinha@accenture.com wrote:
>
> Dear OPENNLP Experts
>
> I am trying to build the Person Statistical model using OPEN NLP API's
> , refer to java class "*OpenNLPPersonTrainer*" .
>
> Training data is as in "*train.txt*"
>
> However , I am getting the following message.
>
> Indexing events using cutoff of 5
>
> Computing event counts... _java.io.IOException_: Found unexpected
> annotation: ?<START:person> Kunal ###<END>### .
>
> Incorporating indexed data for training...
>
> Exception in thread "main" _java.lang.NullPointerException_
>
> at opennlp.maxent.GISTrainer.trainModel(_GISTrainer.java:263_)
>
> at opennlp.maxent.GIS.trainModel(_GIS.java:256_)
>
> at opennlp.model.TrainUtil.train(_TrainUtil.java:184_)
>
> at opennlp.tools.namefind.NameFinderME.train(_NameFinderME.java:366_)
>
> at opennlp.tools.namefind.NameFinderME.train(_NameFinderME.java:432_)
>
> at opennlp.tools.namefind.NameFinderME.train(_NameFinderME.java:443_)
>
> at opennlp.tools.namefind.NameFinderME.train(_NameFinderME.java:448_)
>
> at
> com.test.OpenNLPPersonTrainer.main(_OpenNLPPersonTrainer.java:73_)
>
> I have tried out almost everything but not able to move forward,
> please let me know, what I am doing wrong.
>
> Thanks & Regards,
>
> Kunal Kishore Sinha
>
> Information Management Capability, India Delivery Center,
> Bangalore-7|Desk: +91 8067051455
>
> Mobile No:9035749331
>
> mailto:kunal.kishore.sinha@accenture.com
>
> Untitled
>
>
> ------------------------------------------------------------------------
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise confidential information. If you
> have received it in error, please notify the sender immediately and
> delete the original. Any other use of the e-mail by you is prohibited.
> Where allowed by local law, electronic communications with Accenture
> and its affiliates, including e-mail and instant messaging (including
> content), may be scanned by our systems for the purposes of
> information security and assessment of internal compliance with
> Accenture policy. .
> ______________________________________________________________________________________
>
> www.accenture.com