uma-pi1 / minie Goto Github PK
View Code? Open in Web Editor NEWAn open information extraction system that provides compact extractions
Home Page: https://www.uni-mannheim.de/dws/research/resources/minie/
License: GNU General Public License v3.0
An open information extraction system that provides compact extractions
Home Page: https://www.uni-mannheim.de/dws/research/resources/minie/
License: GNU General Public License v3.0
I am evaluating Minie as OIE tool for my master thesis and encountered some issues, that I cannot trace back to them being implementation issues or being inherent in the model. To illustrate:
Input sentence: Emily thought: 'Nobody is perfect'
Triple: "Emily" "thought"
Factuality: (+,CT) Attribution: NONE
----------
Triple: "Nobody" "is" "perfect"
Factuality: (+,CT) Attribution: NONE
Sadly, Attribution seems to be working only for a limited set of verbs. Is this the correct behavior?
Hello,
Is it possible for you to make available the minie jar?
I downloaded the project from GitHub and tried to build it using Eclipse but the "target" director remains empty.
It would be helpful if the pre-built jar is made available on GitHub or Maven central or some other location.
Dear authors,
When I tried to run the java project I came across some errors.
Here are the steps I have taken:
mvn clean install
(Success)mvn compile
(Success)mvn exec:java
(Build Failure)WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< de.uni_mannheim:minie >------------------------
[INFO] Building minie 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ minie ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.704 s
[INFO] Finished at: 2019-10-28T14:33:12Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java (default-cli) on project minie: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java are missing or invalid -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException
I change to mvn exec:java -Dexec.mainClass="test.main.Demo"
and there is still the same error.
Could you please give some hints for solving this problem? Thanks a lot.
When trying to start the service as described in the docs, I'm getting this error:
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project minie: The parameters 'mainClass' for goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java are missing or invalid -> [Help 1]
Adding the following snippet fixed the problem for me.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>uk.ac.ucl.cs.mr.Main</mainClass>
</configuration>
</plugin>
Hi dear MinIE project developers.
I'm working on a project for semantic reasoning and I'd like to know if the Contextual factual correctness annotations are available. I'd like to train a Machine Learning model to repdict such crowdsourcing correctness labels.
Thank you very much.
Hello, thank you for writing this software. Could you please provide some detailed installation instructions, and some examples for how it should be run, in the README file? Thank you.
I cannot contact Pasquale Minervini directly (nor append the question to his fork), therefore:
Is it correct, that one has to change public class FactsResource
to account for Factuality and Attribution?
I modified the class in this way:
public FactsBean query(String sentence) {
MinIE minie = new MinIE(sentence, FactsResource.parser, MinIE.Mode.AGGRESSIVE);
List<Fact> facts = new ArrayList<>();
//System.out.println("Extractions:");
for (AnnotatedProposition ap: minie.getPropositions()) {
String att = "None";
List<AnnotatedPhrase> triple = ap.getTriple();
String s = triple.get(0).toString();
String p = triple.get(1).toString();
String o = triple.get(2).toString();
String f = ap.getFactualityAsString();
if (ap.getAttribution().getAttributionPhrase() != null) {
att = ap.getAttribution().toStringCompact(); }
Fact fact = new Fact(s, p, o, att, f);
facts.add(fact); }
I have also set getter and setter methods in line with the new constructor public Fact(String s, String p, String o, String at, String f)
.
The service is not working correctly all the time. Although the non-service (Demo.java) would yield empty sets for these instances, the service would return:
<body>
<div class="header">Request failed.</div>
<div class="body">Request failed.</div>
<div class="footer">Grizzly 2.4.0</div>
</body>
Without stating the reasons for the behavoir. Also the Logger.getLogger() output won't yield anything useful on the cmd where the service was started.
What would be the correct way to have the service yield the Factuality and Attribution without giving failed requests?
Ideally obtaining something like:
{
"facts": [
{
"subject": ["Obama", 0, 5],
"predicate": ["visited", 6, 13],
"object": ["white house", 18, 29]
}
]
}
Dont see how you could do this by searching the input string, as sentences with repeated words might give the incorrect index.
is there a way to do this within minie?
When trying to run the service with Java 11 or higher, the following error appears.
MinIE Service
Apr 30, 2021 8:20:25 AM org.glassfish.jersey.internal.Errors logErrors
WARNING: The following warnings have been detected: WARNING: HK2 service reification failed for [org.glassfish.jersey.message.internal.DataSourceProvider] with an exception:
MultiException stack 1 of 2
java.lang.NoClassDefFoundError: javax/activation/DataSource
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getDeclaredConstructors(Class.java:2357)
at org.jvnet.hk2.internal.Utilities$3.run(Utilities.java:1378)
at org.jvnet.hk2.internal.Utilities$3.run(Utilities.java:1374)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.jvnet.hk2.internal.Utilities.getAllConstructors(Utilities.java:1374)
at org.jvnet.hk2.internal.Utilities.findProducerConstructor(Utilities.java:1317)
at org.jvnet.hk2.internal.DefaultClassAnalyzer.getConstructor(DefaultClassAnalyzer.java:83)
at org.glassfish.jersey.inject.hk2.JerseyClassAnalyzer.getConstructor(JerseyClassAnalyzer.java:148)
at org.jvnet.hk2.internal.Utilities.getConstructor(Utilities.java:180)
at org.jvnet.hk2.internal.ClazzCreator.initialize(ClazzCreator.java:129)
at org.jvnet.hk2.internal.ClazzCreator.initialize(ClazzCreator.java:180)
at org.jvnet.hk2.internal.SystemDescriptor.internalReify(SystemDescriptor.java:740)
at org.jvnet.hk2.internal.SystemDescriptor.reify(SystemDescriptor.java:694)
at org.jvnet.hk2.internal.ServiceLocatorImpl.reifyDescriptor(ServiceLocatorImpl.java:464)
at org.jvnet.hk2.internal.ServiceLocatorImpl.narrow(ServiceLocatorImpl.java:2310)
at org.jvnet.hk2.internal.ServiceLocatorImpl.access$1200(ServiceLocatorImpl.java:128)
at org.jvnet.hk2.internal.ServiceLocatorImpl$9.compute(ServiceLocatorImpl.java:1395)
at org.jvnet.hk2.internal.ServiceLocatorImpl$9.compute(ServiceLocatorImpl.java:1390)
at org.glassfish.hk2.utilities.cache.internal.WeakCARCacheImpl.compute(WeakCARCacheImpl.java:128)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetAllServiceHandles(ServiceLocatorImpl.java:1452)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServiceHandles(ServiceLocatorImpl.java:1377)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getAllServiceHandles(ServiceLocatorImpl.java:1366)
at org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager.getAllServiceHolders(AbstractHk2InjectionManager.java:158)
at org.glassfish.jersey.inject.hk2.ImmediateHk2InjectionManager.getAllServiceHolders(ImmediateHk2InjectionManager.java:54)
at org.glassfish.jersey.internal.inject.Providers.getServiceHolders(Providers.java:337)
at org.glassfish.jersey.internal.inject.Providers.getCustomProviders(Providers.java:175)
at org.glassfish.jersey.message.internal.MessageBodyFactory.initialize(MessageBodyFactory.java:238)
at org.glassfish.jersey.message.internal.MessageBodyFactory$MessageBodyWorkersConfigurator.postInit(MessageBodyFactory.java:136)
at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$2(ApplicationHandler.java:372)
at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4390)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:372)
at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:316)
at org.glassfish.jersey.internal.Errors.process(Errors.java:298)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:256)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:315)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:282)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:269)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.<init>(GrizzlyHttpContainer.java:334)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory.createHttpServer(GrizzlyHttpServerFactory.java:138)
at uk.ac.ucl.cs.mr.Main.main(Main.java:26)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:254)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 45 more
I seem to remember that javax.activation
has been moved out of JDK / standard library, so you might need to explicitly include it as a dependency.
I was wondering if a prebuilt jar could be made available too.
Added the plugin to pom.xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<mainClass>de.uni_mannheim.minie.main.Main</mainClass>
</configuration>
</plugin>
And used mvn clean install
for the following errors:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.099 s
[INFO] Finished at: 2020-03-20T10:50:15-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project minie: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:surefire-booter:jar:2.12.4: Failed to read artifact descriptor for org.apache.maven.surefire:surefire-booter:jar:2.12.4: Could not transfer artifact org.apache.maven.surefire:surefire-booter:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
May I ask another question? I would like to use the MinIE-Dictionary mode, and want to download "Dictionary: Wikipedia: frequent relations and arguments". However, the hyperlink you provide for download (http://dws.informatik.uni-mannheim.de/fileadmin/lehrstuehle/pi1/pi1/minie/wiki-freq-args-rels.zip) is no longer accessible.
Could you please fix this problem? Thanks a lot for your help!
Hi,
I come across a problem when trying to compile and run the Demo in Linux.
Here are my steps:
Here are the information I received:
Exception in thread "main" java.lang.NoClassDefFoundError: edu/stanford/nlp/ling/Label
at tests.minie.Demo.main(Demo.java:15)
Caused by: java.lang.ClassNotFoundException: edu.stanford.nlp.ling.Label
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 1 more
May I know whether I have made any mistake? Thanks a lot for your time and help!
For versioning reasons, I've been experimenting with updating the Stanford CoreNLP library to the latest (v4.5.4). However, an error is thrown for the CoreNLPUtils.java file, specifically the setRelation function. According to issue e7a7657 setRelation has been replaced in favor of updateEdge from SemanticGraph class.
Therefore (from CoreNLPUtils)
edge.setRelation(EnglishGrammaticalRelations.shortNameToGRel.get(oldRel.getShortName()));
should be replace with
semanticGraph.updateEdge(edge, EnglishGrammaticalRelations.shortNameToGRel.get(oldRel.getShortName()));
if latest version of CoreNLP is used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.