knowitall / openie Goto Github PK
View Code? Open in Web Editor NEWQuality information extraction at web scale.
License: Other
Quality information extraction at web scale.
License: Other
Michael you rock!!
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~~
What would be the best practice to process a large batch of files to avoid executing openie for each one of them?
hi! you may consider archiving this repo if its deprecated: https://help.github.com/articles/archiving-repositories/
thanks!
Hi All,
What is the meaning of a spatial and of a temporal argument?
Thanks
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
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
how to run from java application? Not using scala in applications, or without sbt
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?
Hi,
Beautiful tool. Do you have any examples that show how to use it a java
project?
Thanks,
Stelios
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".
@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
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 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.
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
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?
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)
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
In Ollie it was possible to train the confidence function.
Is the same feature available here?
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?
I've received a couple of requests to get this on Scala 2.11. I created a more standalone project at https://github.com/schmmd/openie-standalone. It contains a number of the dependencies I originally authored, which made the migration easier. This setup might also work for maintenance and the first commit runs on Scala 2.10.
Just an FYI!
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))
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.
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!!
I'd like to know if there is any jar file available from OpenIE that automatically (or semi-automarically) categorizes the tripelets extracted from the free text, as dmonstrated in http://openie.cs.washington.edu/ and Freebase http://www.freebase.com/ -
Thank you -
wkgann
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:
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.
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, :)
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?
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?
$ 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?
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:
.zip
cd
'd to the extracted .zip
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
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.