Giter Club home page Giter Club logo

openie's People

Contributors

bhadramani avatar harrysethi avatar schmmd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openie's Issues

Hi!

Michael you rock!!

CLI running problem

Hi,
After starting the command line interface, I can input sentence to get the extraction result interactively.
But how to use the "openie [options] input-file ouput-file" command in the CLI?
I want to use the options and input file to do the extraction work.

I don't know where to input the 'openie' command? Anybody knew this, please tell me.

Thanks very much~~

Process large batch of files

What would be the best practice to process a large batch of files to avoid executing openie for each one of them?

Why preposition located in argument2?

I extracted from this sentence " He cited a new study that was released by UCLA in 2008"
[a new study] [was released] [by UCLA]
[a new study] [was released] [in 2008]

I am wondering why "by" and "in" were not located in relation phrase
Thanks

Compiled jar not compatible with scala 2.11.6

Hello friends,

I was able to create the standalone jar with the default settings but it did not work in a java project running on scala 2.11.6. I tried to create the jar by modifying the scala version but since the dependencies are not been compiled for scala 2.11.6, i could not proceed further.

Can someone suggest a good way to create scala 2.11.6 compatible jar?

Thanks

Running OpenIE 4: "input file does not exist"

I try to run OpenIE 4 by using the jar I have built, following the instructions on the README.

However, when I try to run with:

java -jar openie-assembly-4.2.2-SNAPSHOT.jar input-file file.txt

I get the following error:

Error: argument input-file failed when given 'input-file'. requirement failed: input file does not exist: input-file

although the file is there.

How can this be fixed?

Possible java example

Hi,

Beautiful tool. Do you have any examples that show how to use it a java
project?

Thanks,
Stelios

--format values

Hi,

Looks like that --format option does not take in "columnated" as a value - as mentioned in the README. The right value seems to be "column".

Need to run IE4.1 with multiple files

@schmmd -

I'm running the latest version of IE (V4.1) Java jar file from command line on Linux VM. Need to know the command to process multiple files in an input directory. Don't want to play with Scala for the time being. The --usage doesn't seem to provide too much information. It seems it is able to process one file at a time only.

wkgann

How to train model

Hello, maybe here isn't the best place to ask questions but the software has too few tutorials available. I have two questions. First, how should I perform the triplet search (who/what - relation who/what) featured in OpenIE home page using the downloaded software? Second, how can I add my own data to its knowledge base? Thank you

It seems the output needs some clarification

It appears that an explanation of the output should be part of the readme (the project's single test provides little insight here). Whereas it is feasible to understand that OpenIE would output triplets, or triplets through an abbreviated n-ary notation, a simple example as one provided, also includes a context element of unspecified semantics.

John ran down the road to fetch a pail of water.
[info] John ran down the road to fetch a pail of water.
[info] 0.86 (John; ran; down the road; to fetch a pail of water)
[info] 0.82 Context(John ran,List([0, 8))):(John; ran down the road to fetch; a pail of water)

Whether this follows in the output format of Ollie or Reverb or not, the output format should be described by text, code examples or tests, or alternatively a link to any article describing it should better imo be provided.

Can't compile

Nothing happens after tests.

...
[info] - should instantiate and extract correctly
[info] Run completed in 2 minutes, 53 seconds.
[info] Total number of tests run: 1
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.

The compilation was runned with sbt clean compile assembly

Getting score value for each relation

I am looking at getting score for each relation in query. I checked following code in runqa.py

def run_on_question(s, con):
    q = get_sent(s)
    scored_answers = defaultdict(lambda: float('-inf'))
    scored_queries = lex.parse.get_scored_queries(q, con.nl_vocab, con.lexicon, con.weights) # gives unreadable items

I am getting relation and entity from following code (in parse.py), considering rpat,ypat

def processed_result(rpat,ypat):
    rpat_list = rpat.split()
    ypat_list = ypat.split()
    if len(rpat_list)<3 and len(ypat_list)<2:
        print "Relation2 : ",rpat, ", Entity2 : ",ypat
    return

def generate_patterns_pair(sent, maxlen=5):
    lem = [x.lower() for x in sent['lemma']]
    n = len(lem)
    for a,b,c,d in generate_subs_pair(n, maxlen):
        qpat = ' '.join(lem[0:a] + ['$r'] + lem[b:c] + ['$y'] + lem[d:])
        rpat = ' '.join(lem[a:b])
        ypat = ' '.join(lem[c:d])
        if all(x in stops for x in lem[a:b]): continue
        if all(x in stops for x in lem[c:d]): continue
        if qpat and rpat and ypat and ypat not in stops and rpat not in stops:
            processed_result(rpat,ypat)
            yield Substring(qpat, trange(a) + trange(b, c) + trange(d, n)), Substring(rpat, trange(a,b)), Substring(ypat, trange(c,d))
        qpat = ' '.join(lem[0:a] + ['$y'] + lem[b:c] + ['$r'] + lem[d:])
        ypat = ' '.join(lem[a:b])
        rpat = ' '.join(lem[c:d])
        if qpat and rpat and ypat and ypat not in stops and rpat not in stops:
            yield Substring(qpat, trange(a) + trange(b, c) + trange(d, n)), Substring(rpat, trange(c,d)), Substring(ypat, trange(a,b))

Is there any way to see score value for all extracted relations?

Java heap space exception

Hi When i am trying to execute the simple application that uses openie to extract relations its throwing "java heap space exception" can some1 help fix this bug
screen shot 2017-07-15 at 6 47 34 pm

running without Sbt using maven

I am getting an error while running using maven

i have added all the jar in project. how to fix it please help?

Exception in thread "main" java.lang.NoSuchMethodError: edu.knowitall.tool.postag.Postagger: method ()V not found
at edu.knowitall.tool.postag.ClearPostagger.(ClearPostagger.scala:15)
at edu.knowitall.tool.parse.ClearParser$.$lessinit$greater$default$1(ClearParser.scala:26)
at edu.knowitall.openie.OpenIECli$Config.createParser(OpenIECli.scala:126)
at edu.knowitall.openie.OpenIECli$.run(OpenIECli.scala:200)
at edu.knowitall.openie.OpenIECli$delayedInit$body.apply(OpenIECli.scala:182)
at scala.Function0$class.apply$mcV$sp(Function0.scala:40)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.App$$anonfun$main$1.apply(App.scala:71)
at scala.collection.immutable.List.foreach(List.scala:318)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32)
at scala.App$class.main(App.scala:71)
at edu.knowitall.openie.OpenIECli$.main(OpenIECli.scala:29)
at edu.knowitall.openie.OpenIECli.main(OpenIECli.scala)

Out of Memory problem

Dear team, I'm facing with the problem of " out of memeory " continuously.....

Environment:

Ubuntu: 18.04
Scala: 2.10.2
Java: 1.7.0_80
sbt: 0.13.18

I managed to get the step of "running with sbt:"

sbt 'run-main edu.knowitall.openie.OpenIECli'

However, I kept facing with the problem of
"java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space"

when I step into create the stand-alone jar, when using:

sbt clean compile assembly

while trying
"sbt -J-Xmx2700M clean compile assembly" (or larger, say 10g, I have 64g on my computer)
The problem continues plus:

[error] Not a valid command: J-Xmx10g
[error] Not a valid project ID: J-Xmx10g
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: J-Xmx10g
[error] J-Xmx10g
[error]     

Any possible solution please?

Regards,
hz

Nullpointer error?

Tried to parse "The US president Barack Obama gave speech to thousands of people on Tuesday." using the command line interface and got the following error:

Exception in thread "main" java.lang.NullPointerException at com.googlecode.clearnlp.tokenization.EnglishTokenizer.protectEmoticon s(EnglishTokenizer.java:335) at com.googlecode.clearnlp.tokenization.EnglishTokenizer.getTokenList(En glishTokenizer.java:109) at com.googlecode.clearnlp.tokenization.AbstractTokenizer.getTokens(Abst ractTokenizer.java:58) at edu.knowitall.tool.tokenize.ClearTokenizer.tokenize(ClearTokenizer.sc ala:22)

What caused this problem?

Skip some relation

Hi,

OpenIE 4.0's results are very good then others, but i noticed a bug in it i.e it is skipping some phrase as given below:

Sentence:
World leaders should halt these visits and link any deal with Iran to its human rights record. ( to its human rights record)

SVO:
List(0.93 (World leaders; should halt; these visits),

0.94 (World leaders; link; any deal with Iran))

NullPointerException when running on Windows

When running on Windows 7 I got NullPointerException in com.googlecode.clearnlp.tokenization.EnglishTokenizer because T_EMOTICONS is null on line 335.

T_EMOTICONS was never initialized due to the if on line 229:

if (filename.equals(F_EMOTICONS))
    T_EMOTICONS = getSet(zin);

which always fails because of the different separators "" vs "/" depending on the platform. Dirty fix is to override separator using reflection:

val field = classOf[File].getField("separator")
val modifiersField = classOf[Field].getDeclaredField("modifiers")
modifiersField.setAccessible(true)
modifiersField.setInt(field, field.getModifiers & ~Modifier.FINAL)
field.set(null, "/")

Perhaps updated clearnlp doesn't have this problem.

Question about the results obtained

Thank you for share your IE tool!!

My name is Lorena and please, I would like to know what the numerical quantities presented for each result mean. (0,52 and 0,93 next)

Here an example:
If he wins five key states, Romney will be elected President.
[info] If he wins five key states, Romney will be elected President.
[info] 0,52 (he; wins; five key states)
[info] 0,93 (Romney; will be elected; President)

Thanks!!

Failing to create stand-alone jar.

I've run the commands described in the README document, i.e. the variations of:
'sbt clean compile assembly'
However my machine is just stuck on the following screen:
cap
Is there something I can do to compel this jar file into existence?

What I actually want to do is to input my own data to OpenIE and specify the output destination, is that possible if one runs the program with the command
sbt 'run-main edu.knowitall.openie.OpenIECli'

It seems like the specifications for particular data input parameters are set up to work with the .jar file, at least according to the README doc.

question for columnated format

Hello, I have a question for columnated format.

For the example: U.S. president Barack Obama gave his inaugural address on January 20, 2013.

we want to get information like:

(Barack Obama; is president of; U.S.)
(Barack Obama; gave; [his inaugural address, on January 20, 2013])

however, my output is:

U.S. president Barack Obama gave his inaugural address on January 20, 2013.
0.8926589187155131      SimpleArgument(U.S. president Barack Obama,List([0, 27)))   Relation(gave,List([28, 32)))   SimpleArgument(his inaugural address,List([33, 54)))    U.S. president Barack Obama gave his inaugural address on January 20, 2013.
0.9485479188231729      SimpleArgument(U.S. president Barack Obama,List([0, 27)))   Relation(gave his inaugural address on,List([28, 32), [33, 54), [55, 57)))  TemporalArgument(January 20,List([58, 68))) U.S. president Barack Obama gave his inaugural address on January 20, 2013.
0.8847999636040884      SimpleArgument(Barack Obama,List([15, 27))) Relation([is] president [of],List([5, 14))) SimpleArgument(United States,List([0, 4)))  U.S. president Barack Obama gave his inaugural address on January 20, 2013.

How can I remove the class name for further process?
Besides, it seems that --binary option does not work

Thank you, :)

Missing citation

The license states that one needs to cite the developers for using this in published results. Is there a publication that details the SRL part of openie?

Some(Context())

0.9986865874429394 || Some(Context(bacteria are classified,List([385, 412)))) || the production of cheese and yogurt through fermentation, and the recovery of gold, palladium, copper and other metals in the mining sector,[14] as well as in biotechnology, and the manufacture of antibiotics and other chemicals.[15 || regarded || as plants; Once;

I can't understand the sentense in Some(Context()). And what 'List([385,412))))' means?

Compilation failure

$ sbt compile
[info] Loading project definition from /Users/soboroff/openie/project
[info] Compiling 1 Scala source to /Users/soboroff/openie/project/target/scala-2.10/sbt-0.13/classes...
[error] /Users/soboroff/openie/project/Release.scala:10: object SbtPgp is not a member of package com.typesafe.sbt
[error] import com.typesafe.sbt.SbtPgp.PgpKeys._
[error] ^
[error] /Users/soboroff/openie/project/Release.scala:29: not found: value publishSigned
[error] extracted.runAggregated(publishSigned in Global in ref, st)
[error] ^
[error] two errors found
error Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

Can't compile/create jar

Hi,

I'd like to open a new issue.

I am trying to run openie over some data and decided to get started with getting the demo provided here running.

I recently downloaded the .zip of the knowitall/openie github (tonight) on a fresh install of ubuntu.

Here are the steps I took:

  1. Installed sbt from the commands given here
  2. Downloaded & extracted the latest knowitall/openie .zip
  3. cd'd to the extracted .zip
  4. ran sbt clean compile assembly

The following is my terminal output:

josh@josh:~/Desktop/openie-master$ java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)

josh@josh:~/Desktop/openie-master$ sbt clean compile assembly
error: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', required by /home/josh/.sbt/boot/scala-2.10.2/lib/scala-library.jar(scala/package.class)
error: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', required by /home/josh/.sbt/boot/scala-2.10.2/lib/scala-library.jar(scala/runtime/package.class)
[error] scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i
[warn] Ignoring load failure: no project loaded.
[error] Not a valid command: clean (similar: last, eval)
[error] clean
[error]      ^

josh@josh:~/Desktop/openie-master$

After trying this, I tried sbt compile, with the following results...

josh@josh:~/Desktop/openie-master$ java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
josh@josh:~/Desktop/openie-master$ ls
build.sbt  LICENSE  project  README.md  release  src  version.sbt
josh@josh:~/Desktop/openie-master$ sbt compile
error: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', required by /home/josh/.sbt/boot/scala-2.10.2/lib/scala-library.jar(scala/package.class)
error: error while loading package, Missing dependency 'object java.lang.Object in compiler mirror', required by /home/josh/.sbt/boot/scala-2.10.2/lib/scala-library.jar(scala/runtime/package.class)
[error] scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i
[warn] Ignoring load failure: no project loaded.
[error] Not a valid command: compile
[error] compile
[error]        ^
josh@josh:~/Desktop/openie-master$ 

Could anyone shed some light on what's going wrong?

Thanks,
Josh

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.