You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Joern Kottmann (JIRA)" <ji...@apache.org> on 2013/11/13 14:03:24 UTC

[jira] [Closed] (OPENNLP-616) TokenNameFinderTrianer is running in command prompt but while executing program no result found in console

     [ https://issues.apache.org/jira/browse/OPENNLP-616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joern Kottmann closed OPENNLP-616.
----------------------------------

    Resolution: Won't Fix

Similar to OPENNLP-617. This is very likely not a bug in OpenNLP itself, please ask for help on the user list.

> TokenNameFinderTrianer is running in command prompt but while executing program no result found in console
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-616
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-616
>             Project: OpenNLP
>          Issue Type: Test
>          Components: Name Finder
>    Affects Versions: tools-1.5.3
>         Environment: Windows xp sp3 
>            Reporter: Chetan M
>
> my ner-person-train file contents are
> Mr . <START:person> Vinken <END> is chairman of Elsevier N.V. , the Dutch publishing group . <START:person> Rudolph Agnew <END> , 55 years old and former chairman of Consolidated Gold Fields PLC , was named a director of this British industrial conglomerate .
> after that i'm running following cmd in commandprompt
> F:\apache-opennlp-1.5.3\bin>opennlp TokenNameFinderTrainer -encoding UTF-8 -model en-ner-person.bin -lang en -data en-ner-person.train
> the above command is successfully running After that i'm executing following program in eclipse
> public static void findName() throws IOException {
> InputStream is = new FileInputStream("F:/apache-opennlp-1.5.3/bin/en-ner-person.bin");
>  
>           TokenNameFinderModel model = new TokenNameFinderModel(is);
> 	  is.close();
>  
> 	NameFinderME nameFinder = new NameFinderME(model);
>  
> 		String []sentence = new String[]{
> 			    "Mike",
> 			    "Sagar",
> 			    "Jack",
> 			    "Smith",
> 			    "is",
> 			    "a",
> 			    "good",
> 			    "Sachin",
> 			    "person"
> 			    };
>  
> 			Span nameSpans[] = nameFinder.find(sentence);
>  
> 			for(Span s: nameSpans)
> 				System.out.println(s.toString());
>  
> 	}
> But I'm not getting any result. Can any one suggest me to resolve this problem



--
This message was sent by Atlassian JIRA
(v6.1#6144)