Giter Site home page Giter Site logo

asaparov / pwl Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 0.0 8.89 MB

Natural language understanding by probabilistic abduction of a symbolic theory from sentences and logical forms.

Makefile 0.08% C++ 99.92%
generative-model natural-language-processing natural-language-understanding question-answering

pwl's People

Contributors

asaparov avatar

Stargazers

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

Watchers

 avatar

pwl's Issues

How are tense predicates handled in the Theory?

For example, if the context info was

Clifford was blue. Clifford is red.

then you have 2 event variables (1 for each sentence) with past(e_1) and present(e_2) ANDed to them respectively...and deducing them also gives you the two simple axioms Blue(Clifford), Red(Clifford). But how does the theory update in this case?
Are both axioms taken? Do the past() and present() predicates play a part in how the theory is updated?

Compilation issues

Hi!

On Linux features.h inside the math repo confilcts with some system library with the same name (this may be an issue on its own).
I tried resolving it by renaming features.h and all the relative includes.

Then I get many errors such as:
higher_order_logic.h:1812:36: error: the value of ‘empty_string’ is not usable in a constant expression
higher_order_logic.h:1643:12: note: ‘empty_string’ was not declared ‘constexpr’
article.h:465:22: error: ‘struct core::memory_stream’ has no member named ‘shift’
executive.h:552:11: error: ‘template<unsigned int BufferSize, class Stream> int fgetc’ redeclared as different kind of symbol
/usr/include/stdio.h:533:12: note: previous declaration ‘int fgetc(FILE*)’
executive.h:839:7: error: ‘SSL_ERROR_WANT_CLIENT_HELLO_CB’ was not declared in this scope

I am trying to compile the code as follows:
$ make executive_test CPPFLAGS+='-I/usr/include/openssl -Icore -Imath -Ihdp -Igrammar'
I believe I may be setting the wrong flags since I do not have much experience with makefiles.
I installed OpenSSL via # apt install libssl-dev and put core, math, hdp and grammar inside the PWL directory via $ git clone <link>.

Do you have any idea what I may be doing wrong? Thank you.

Why is "yesterday" a new event with the parser?

In the sentence "Alex wrote a book yesterday."
The output is supposedly
"∃a(name(a)=“Alex” ∧ ∃b(book(b)
∧ ∃w(arg1(w)=a ∧ write(w) ∧ past(w) ∧ arg2(w)=b
∧ ∃y(yesterday(y) ∧ arg1(y)=w))))"

Why is there another event variable y in this parsing? Shouldn't it just be

"∃a(name(a)=“Alex” ∧ ∃b(book(b)
∧ ∃w(arg1(w)=a ∧ write(w) ∧ past(w) ∧ arg2(w)=b
∧ yesterday(w))))"
?

Thanks for the great work! I'm really enjoying reading it!

Semantic representations question

👋Hi there, I have another question about how the predicates work in your system.
I noticed for this sentence:

λx(cat(x) ∧ ¬∃y(like(x, y) ∧ dog(y))) is the set of all cats that do not like a dog, etc.

That the like() predicate takes in 2 args that are not events...just straight up boolean variables. I'm wondering how you reconcile a parse like this with a parse for a sentence like "I like cats." which I think would produce the event based parse of:

∃e(like(e) ∧ arg1(e)="I" ∧ arg2(e)=λxcat(x))

In this case are you storing 2 different "like" predicates for downstream axiom resolution, or are you somehow resolving the event parameterized representation with the strongly parameterized representation?

I saw this example in your thesis actually, so sorry if the answer was in there and I missed it!

unable to parse question

I'm trying to add simple facts then query the system, and it says "unable to parse question". Can you please provide a simple example how to work with it?
My simple example:

./executive_test console
read all humans are mortal.
rerank
read Socrates is a human.
rerank
research is Socrates mortal?

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.