SigmoidFreud / clearnlp

Automatically exported from code.google.com/p/clearnlp
Other
0 stars 0 forks source link

error in tokenization #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I am using clearNLP for tokenization and I am using the clearNLP APIs for this. 
I am following the example code give by 
you(https://github.com/clearnlp/clearnlp-demo/blob/master/src/main/java/com/clea
rnlp/demo/DemoNLPDecode.java). But I am getting this error when I try to 
initialize "tokenizer". Here are the details :

================

String text ="here goes my text. Let's see how well does it perform"
String language = AbstractReader.LANG_EN;
AbstractTokenizer clearNLPTokenizer = NLPGetter.getTokenizer(language);
String modelType  = "general-en";
List<String> tokens = this.clearNLPTokenizer.getTokens(text);

But I get error in line 3:

Exception in thread "main" java.lang.UnsupportedClassVersionError: 
com/clearnlp/nlp/NLPGetter : Unsupported major.minor version 51.0

at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

==================

I have included all the jar files provided in 
here(http://clearnlp.wikispaces.com/file/detail/clearnlp-lib-2.0.2.tgz) and I 
have also included the dictionary jar.
I am making some mistake in using clearNLP. Please help me out.

Original issue reported on code.google.com by modiashu...@gmail.com on 18 Mar 2014 at 12:34