In the documentation, there is an example that utilizes the class: StanfordCoreNLP. But when you download the latest version, the class is nowhere to be found. It's found easily in earlier versions and the example works great. I've been looking all over but can't seem to figure out what happened to StanfordCoreNLP.
Has anyone used recent versions of the library who can tell me what happened to StanfordCoreNLP?
The class is still in CoreNLP 3.2.0:
edu.stanford.nlp.pipeline.StanfordCoreNLP
Just found it in the CoreNLP 3.2.0 Maven artifact using the Eclipse "open type" feature.
Related
I hope this question does not seem to basic but I could not find any good documentation despite researching for hours.
I use Maven (Version 3.3.9) for my JavaFX (Version 11.0.2) with JDK 13.0.1 project and want to build an EXE.
What is the easiest way to do this?
All my researchs stucked somewhere.
Following this documentation, I tried to integrate ant-tasks. But the documentation required ant-javafx.jar to be in the jdk_home/lib directory which doesn't make sense for JDK 13 since it doesn't come with JavaFX.
But this was the latest official documentation where I could find something about Ant Task. So I guessed Ant Task does not work for JDK13 anymore, am I wrong? I hope this does not seem like a dumb assumption but I could not find a newer documentation.
I have also tried the zenjava plugin but the latest commit is 2 years ago, and when I try to use it I get an error
Could not find artifact javafx-packager:javafx-packager:jar:1.8.0_20 at specified path C:\Program Files\Java\jdk-13.0.1/../lib/ant-javafx.jar
Since I've read that javafx-packager was renamed to java-packager a longer time ago (sorry, don't remember, where I've read this) I assumed that zenjava is not up to date for JDK 13.
I couldn't find anything else.
Thank you :)
The first thing to do is to upgrade your Java and JavaFX versions to 14. Then you can use the new jpackage tool, which does exactly what you need. How to do all this with Maven is described in this tutorial, which I did together with Dirk Lemmermann. Maybe that helps.
JPackageScriptFX
Error: A JNI error has occurred, please check your installation and try again.
Eclipse states: test has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 52.0.
I had the problem referenced at this question: "Could not find or load main class" while trying to use JavaFX in Eclipse When using JDK13 and JavaFX13. All solutions pointed to downgrading to Java 8.
I installed Java 8, updated the build path, and it built fine. But now I get the error I am using Eclipse 2019-06 (4.12.0), JavaFX13, and JDK 1.8.0_231.
I researched the answer but the two questions that come didn't help. One was for an IntellJ solution and the other had a package I am unfamiliar with, and the error had to do with that package.
I simply don't know how to correct the build path or dependencies to fix this issue. It appears I need a lower version of the JVM, but cannot seem to locate it. Am I right, or can you please help?
Well, I have dropped back to JDK 8 and the built in JavaFX. Despite my best efforts, I cannot get JDK13 and JavaFX 13 to work without receiving the error "Could not find or load main class" (see link in post). Since there is no solution to that problem yet that works for me, I can bypass my error on this request all together and just use much older packages.
I am currently trying to use a custom-trained OpenNLP Name Finder model in code. My project uses OpenNLP 1.6.0 and is developed using Eclipse IDE. The model was also trained using OpenNLP 1.6.0.
However, I'm getting this annoying error:
java.lang.IllegalArgumentException : opennlp.tools.util.InvalidFormatException: Model version 1.6.0 is not supported by this (1.5.3) version of OpenNLP!
A similar question was asked here and the answer stated that the problem was due to the OpenNLP model being trained using the same version as the one in use (i.e. training a model using 1.6.0 and using it in a project that also uses 1.6.0). However I also have other Java projects using OpenNLP 1.6.0, and they were able to load the model successfully, so I don't think this applies to me.
The .classpath of my project also shows that the project is referencing the OpenNLP 1.6.0 libraries.
I know the question is rather vague, but if anyone has any insight into why this could be happening, please let me know!
To sum up: Unable to load custom trained OpenNLP Name Finder model in code due to apparent OpenNLP version incompatibility. Model was trained in OpenNLP 1.6.0, which my project also uses. Other projects also using 1.6.0 were able to load the model successfully.
I've pinpointed the source of my error - my project was making use of the Apache Tika 1.13 library as well, which contains its own implementation of OpenNLP 1.5.3.
As a result the classpath contained multiple JARs that contain their own versions of the OpenNLP classes.
EDIT 16/1/2017: From my findings, the order in which the libraries are loaded matters.
Please correct me if I am wrong here: in Java (and other languages as well), once a dependency component has been loaded in memory, then by default, it will not be loaded again even if another version is required later.
Because of this, if the Tika library is loaded before the OpenNLP 1.6.0 libraries, OpenNLP 1.5.3 will be loaded first, and the program will "stick" to 1.5.3 in spite of the subsequent loading of 1.6.0. Similarly, if the reverse happens (1.6.0 is loaded before Tika), the program will "stick" to 1.6.0 instead.
I'm using a java project with the jpl library, but i'm getting the compile error "the package org.jpl7 does not exist". I've tried to download the latest version, but I've probably get the jpl3 version.
How to get the latest version of jpl7? I've searched extensively, and even found the http://jpl7.org, but there is no hint about how to download that version.
Thanks
You will find it on Maven, look for it on Maven Central!
In the documentation for batik, it shows how to get an instance of the DOM implementation from the class org.apache.batik.dom.svg.SVGDOMImplementation.
However, after downloading Batik 1.8 from the same site, I cannot find this class anywhere.
I downloaded the 1.7 version and found it in batik-svg-dom.jar but it does not exist in the same jar within 1.8 (or as far as I can tell in any of the jars in that package).
Has this class been renamed / refactored / replaced? If so how do you get an instance of the DOM implementation in batik 1.8?
I found the answer, embedded in the maillist thread posted in #Ajay's answer.
It seems that in order to solve this bug, they have moved SVGDOMImplementation into package org.apache.batik.anim.dom, which lives in the jar file batik-anim-1.8.jar.
As at the time of writing, the batik web site had not yet been updated, and for some reason this change was also not highlighted in the release notes.
I'm having same issue, looks like we need to drop back to 1.7.. 1.8 is unstable as suggested in of the thread
http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/201503.mbox/%3C5515BC93.90402#ptc.com%3E
I had the same issue with Apache Batik 1.8. The official binaries of that version are not compatible. To get the version 1.8 work I had to replace fop-transcoder-allinone-1.1.jar by fop-transcoder-allinone-2.2.jar which I took from Apache Batik 1.9.
Download binary of Apache Batik1.8 it makes life easier with above problem. Include only that in your project. That's enough. Here is the link.
Note that binaries are nothing but source code compiled into Java Archive files (JARs) they are the one's that execute on JVM.