I'm trying to learn the Eclipse IDE and openNLP at the same time and
have what must an easy question.

I downloaded the source distribution placed in on Eclispse's workspace
directory and ran "mvm clean install" and it looks like all went well
(see quote below)

Next I write what I think should be an easy demo that starts like this:

public static void main(String[] args) throws IOException {
    POSModel model =  new POSModelLoader().load(new File("en-pos-maxent.bin"));
    POSTaggerME tagger = new POSTaggerME(model);

Of course both POSModelLoader and POSTaggerME can not be resolved so I
try adding this at the start of the file

import opennlp.tools.cmdline.postag.POSModelLoader;
import opennlp.tools.postag.POSModel;
import opennlp.tools.postag.POSSample;
import opennlp.tools.postag.POSTaggerME;

And now Eclipse tells me that opennlp.tools can not be resolved.  How
do I tell Eclipse where to look?  I figure Eclipse must have a search
path.

The openNLP distribution  is at
~/Documents/workspace/apache-opennlp-1.5.3/  If I cd to that location
and do "ls" here is what I get:

Chris Albertson's iMac:apache-opennlp-1.5.3 chris$ ls
LICENSE   docs   opennlp-docs
NOTICE    issuesFixed   opennlp-maxent
README   lib   opennlp-tools
RELEASE_NOTES.html opennlp  opennlp-uima
bin opennlp-distr



Here is the result I got that makes me think it all built OK:

[INFO] Reactor Summary:
[INFO] Apache OpenNLP Reactor ............................ SUCCESS [17.192s]
[INFO] Apache OpenNLP Maxent ............................. SUCCESS [26.876s]
[INFO] Apache OpenNLP Tools .............................. SUCCESS [58.494s]
[INFO] Apache OpenNLP UIMA Annotators .................... SUCCESS [8.633s]
[INFO] Apache OpenNLP Documentation ...................... SUCCESS [13.155s]
[INFO] Apache OpenNLP Distribution ....................... SUCCESS [13.131s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:22.351s


If it matters this is the machine/environment I'd running this on

mvn --version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a;
2013-09-17 08:22:22-0700)
Maven home: /usr/local/apache-maven/apache-maven-3.1.1
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.1", arch: "x86_64", family: "mac"











-- 

Chris Albertson
Redondo Beach, California

Reply via email to