Giter Club home page Giter Club logo

miniepy's People

Contributors

gkiril avatar mmxgn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tmacmilan ericvui

miniepy's Issues

Error while compiling MinIE

As written in the readme, I was compiling MinIE using maven 3.8.5 . However, I was getting the following error:

[ERROR] Failed to execute goal on project minie: Could not resolve dependencies for project de.uni_mannheim:minie:jar:0.0.1-SNAPSHOT: Could not transfer artifact edu.stanford.nlp:stanford-corenlp:jar:models:3.8.0 from/to central (https://repo.maven.apache.org/maven2): GET request of: edu/stanford/nlp/stanford-corenlp/3.8.0/stanford-corenlp-3.8.0-models.jar from central failed: Premature end of Content-Length delimited message body (expected: 362,452,284; received: 18,865,505) -> [Help 1]

Could you please help me resolve this issue?

MinIE Construction Error

Hello, this is the error I am getting, it seems that it is able to get the references with the autoclass but cannot create the object after getting the reference. I might be totally wrong too but do you know what might be the reason here?

I built the minIE jar and have my CLASSPATH set before importing the autoclass too

triples = [p.triple for p in minie.get_propositions(sentence)] -> Line that causes the error in the miniepy.py
self.minie_obj = MinIE(String(sentence), self.parser, nmode) -> Constructor for the java object
File "jnius/jnius_export_class.pxi", line 270, in jnius.JavaClass.__init__
File "jnius/jnius_export_class.pxi", line 340, in jnius.JavaClass.call_constructor
jnius.JavaException: No constructor matching your arguments, available:
['(Ljava/lang/String;Ledu/stanford/nlp/pipeline/StanfordCoreNLP;Lde/uni_mannheim/minie/MinIE$Mode;)V', '(Ljava/lang/String;Ledu/stanford/nlp/pipeline/StanfordCoreNLP;Lde/uni_mannheim/minie/MinIE$Mode;Lde/uni_mannheim/utils/Dictionary;)V', '()V', '(Lit/unimi/dsi/fastutil/objects/ObjectArrayList;)V', '(Ljava/lang/String;Ledu/stanford/nlp/semgraph/SemanticGraph;Lde/uni_mannheim/minie/MinIE$Mode;)V', '(Ljava/lang/String;Ledu/stanford/nlp/semgraph/SemanticGraph;Lde/uni_mannheim/minie/MinIE$Mode;Lde/uni_mannheim/utils/Dictionary;)V']

Also thank you for the work of creating this.

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

Hi, thank you for sharing your code!
I implemented Miniepy as it was recommended in the README, but when I run "python3 demo.py" I get the following error message:

> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

I tried different methods that were suggested on the internet to resolve the issue, but the error message is still there. It does make the extractions tho.
Are the extractions affected by this? Is there a way to resolve this?
Thank you very much in advance!

Issue with run python demo.py and bindings

Hey @mmxgn,

first of all, thanks for sharing this!
I followed the setup you described., then, when I want to run the bindings as well as the demo.py.
Unfortunately when i try to run demo.py I get:

Traceback (most recent call last):
  File "demo.py", line 31, in <module>
    parser = CoreNLPUtils.StanfordDepNNParser()
  File "jnius/jnius_export_class.pxi", line 856, in jnius.JavaMethod.__call__
  File "jnius/jnius_export_class.pxi", line 1028, in jnius.JavaMethod.call_staticmethod
  File "jnius/jnius_jvm_dlopen.pxi", line 91, in jnius.create_jnienv
jnius.JavaException: JVM exception occurred: Error creating edu.stanford.nlp.time.TimeExpressionExtractorImpl edu.stanford.nlp.util.ReflectionLoading$ReflectionLoadingException

In the case of using the bindings:

jar_file = "absolute/path/to/.jar"
minie = MinIE(jar_file)
# Sentence to extract triples from
sentence = "The Joker believes that the hero Batman was not actually born in foggy Gotham City."
triples = [p.triple for p in minie.get_propositions(sentence)]

TypeError: init() takes 1 positional argument but 2 were given
If i remove the jar_file from the constructor:

---> 46         CoreNLPUtils = autoclass('de.uni_mannheim.utils.coreNLP.CoreNLPUtils')
     47 
     48         # Dependency parsing pipeline initialization

~/opt/anaconda3/lib/python3.8/site-packages/jnius/reflect.py in autoclass(clsname, include_protected, include_private)
    227 
    228     # c = Class.forName(clsname)
--> 229     c = find_javaclass(clsname)
    230     if c is None:
    231         raise Exception('Java class {0} not found'.format(c))

jnius/jnius_export_func.pxi in jnius.find_javaclass()

jnius/jnius_jvm_dlopen.pxi in jnius.create_jnienv()

JavaException: JVM exception occurred: de/uni_mannheim/utils/coreNLP/CoreNLPUtils java.lang.NoClassDefFoundError

Do you know what goes wrong or how to fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.