Using SemanticGraphCoreAnnotations in Stanford CoreNLP - stanford-nlp

I want to use the example code from http://nlp.stanford.edu/software/openie.html but the line
System.out.println(sentence.get(SemanticGraphCoreAnnotations.EnhancedDependenciesAnnotation.class).toString(SemanticGraph.OutputFormat.LIST));
gives the error
SemanticGraphCoreAnnotations.EnhancedDependenciesAnnotation cannot be
resolved to a type
even though I imported edu.stanford.nlp.semgraph.SemanticGraphCoreAnnotations.
Eclipse suggests following quick fixes:
Change to "AlternativeDependenciesAnnotation"
(edu.stanford.nlp.semgraph.SemanticGraphCoreAnnotations;)
Change to "BasicDependenciesAnnotation"
(edu.stanford.nlp.semgraph.SemanticGraphCoreAnnotations;)
Applying the first fix leads to an java.lang.NullPointerException while the second fix gives following, rather unsatisfying results for the first sentence:
Loading clause searcher from
edu/stanford/nlp/models/naturalli/clauseSearcherModel.ser.gz...1.0 Obama be
bear in Hawaii
The import edu.stanford.nlp.semgraph.SemanticGraphCoreAnnotations.EnhancedDependenciesAnnotation; cannot be resolved and the import import edu.stanford.nlp.semgraph.SemanticGraphCoreAnnotations; does not help either.
I imported the JARs
joda-time
stanford-corenlp-3.6.0
stanford-corenlp-3.6.0-models
ejml-0.23
jollyday
xom
slf4j
slf4j-simple
I use CoreNLP 3.6.0. . I checked the SemanticGraphCoreAnnotations.java in edu.stanford.nlp.semgraph and it contains the EnhancedDependenciesAnnotation.class . How can I fix this issue?

It seems like the example code was written for the latest version of OpenIE, which is so far only on GitHub. The easiest way of getting this to run would probably be to clone the repository and compile CoreNLP yourself.

Use the stanford-corenlp-3.9.2 jar. This worked for me.

Related

How to import androidx.activity.result

When I import androidx.activity.result.ActivityResult; my IDE says: can not resolve symbol 'result' as bellow:
.
In different similar situations, e.g., cannot access androidx activity result activityresultcaller and package androidx activity result does not exist, I see that the problem is solved by upgrading androidx.activity, androidx.appcompat, and androidx.fragment in the dependency part of the build.gradle.
I tried to upgrade different combination of the above packages in the module build.gradle, but non of them solved the problem.
Does anyone know how I can solve it? Thanks.

Can not find northconcepts.datapipeline.jar

I am junior java developer and I am trying to test a data pipeline project given in this link
> https://northconcepts.com/docs/examples/read-a-csv-file/
in my local machine.
I get many errors that are generated such as :
Description Resource Path Location Type The import
com.northconcepts.datapipeline.core.DataEndpoint cannot be
resolved ReadCsvFile.java /ReadCSVFile/src/PipelineCSV line 6 Java
Problem
So, I think that I need to import jar files which are related to the imported libraries given in the code.
The problem is that I can not find online any jar file related to the northconcepts.datapipeline libraries to download and work with!
Any help, please ?
The library is available here but you need to register to download it (and pay for it, if you want something other than the free express version).
You can test the code by following the getting started guide below to configure Maven/Gradle and get a license. It should be pretty quick.
https://northconcepts.com/docs/user-guide/#getting-started
The examples are also on GitHub.

IntelliJ IDEA - Maven Repository glitch?

OK, I should put everything in simple explanation:
When I try to add new Java library from Maven, I do everything as normal, but in the "Download Library from Maven Repository", after the spinning dotted circle finishes animating, I get no result. For example When I try to find HttpClient library in the group org.apache.httpcomponents, if I only search for HttpClient or httpcomponents:HttpClient, no result is found for that library. It's found if only I search the whole groupID, and narrow down the search with library name. Moreover, the version appears, they are not always the latest version.
On the other hand, it does get some library like NekoHTML.
Import manually by adding to pom.xml works well. But I'm actually not in good term with XML, my vision just cannot apprehend the XML view.
There is related issue on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-179857. As a workaround you could use "HttpClient" as a search string

maven-javadoc-plugin sourceFileExcludes not working

I'm not too sure what is the right way to use this tag, but I use it like this:
<sourceFileExcludes>
<exclude></exclude>
<exclude></exclude>
</sourceFileExcludes>
It doesn't work at all. It seems that there was a known bug in maven that this tag won't work as I found these threads:
https://stackoverflow.com/a/26223872/3209177
But that was a while ago. I didn't find much useful information on maven website as well.
So how can we exclude certain source files / classes while we build javadoc using maven?
Finally figured it out.
First, there was an known bug as tracked in this page: https://issues.apache.org/jira/browse/MJAVADOC-365
And the patch went into the plugin 2.10.2. So after that version, the bug is fixed. However, I was using some earlier version.
Second, use this schema:
<sourceFileExcludes>
<sourceFileExclude></sourceFileExclude>
<sourceFileExclude></sourceFileExclude>
</sourceFileExcludes>
To exclude file.
Third, in the sourceFileExclude, I used someClass.java, this is probably not right. Instead, I used someClass.* and this works for me.
You can use this pattern. It excludes the files irregardless of their package structure. More information here
<sourceFileExcludes>
<exclude>**/AppTest.java</exclude>
<exclude>**/Tester.java</exclude>
</sourceFileExcludes>

Resolving imports not found errors in Flex/Adobe Flash Builder

I am very new to Flex/Adobe FlashBuilder and I am running into an "import not found" error. Coming from a Java background, I understand this is more of a question of importing the equivalent of *.jar files in Flex/Flash. But how exactly I should go about resolving this, I am unaware.
Anybody want to help and get some points :) ?
If you're a beginner probably everything you import is included is Flex framework or is made by you. If you import your own classes remember to preserve package in their names (if the come from different package). Check classes names for spelling errors.
When using class in code you can use content assist (Ctrl+Space), then imports will be added automatically.
You can also check what quickfix lightbulb says (it's the same as in Eclipse as FBuilder is based on it).
You can make your question much better by including the code that causes the error.

Resources