SPARQL-Anything / sparql.anything

SPARQL Anything is a system for Semantic Web re-engineering that allows users to ... query anything with SPARQL.
https://sparql-anything.cc/
Apache License 2.0
213 stars 11 forks source link

Supporting querying of AMR structures #209

Open luigi-asprino opened 2 years ago

luigi-asprino commented 2 years ago

Abstract representation meaning (AMR) is a semantic representation of the meaning of a sentence

(w / want-01
  :arg0 (b / boy)
  :arg1 (g / go-01
    :arg0 b))

It would be useful having a triplifier for that.

enridaga commented 2 years ago

Yes yes yes!

justin2004 commented 2 years ago

AMR reminds of nltk's parse output:

>>> sentence1 = 'the cat chased the dog'.split()
>>> for t in rd.parse(sentence1):
...     print(t)
(S (NP the (N cat)) (VP (V chased) (NP the (N dog))))

also, clojure (a JVM language) has good python interop so it is really easy to invoke nltk (python) functions from the JVM. we could even allow a user to present natural language sentences and then we could parse it with nltk and return a triplified parse tree.

aldogangemi commented 2 years ago

Differently from the hierarchical parsing from NLTK, Abstract Meaning Representation produces a graph, although not a formal knowledge graph. It'd be beneficial to sparql-anything an AMR graph, and later refactor it to a real knowledge graph.

There are two existing approaches to do it, one converts it into plain RDF, but I have not checked it out. The second is amr2fred, which does the full monty with a java library and a set of conversion rules. We are currently using it to generate FRED-like graphs from AMR parsers. It looks fine, but a sparql-anything pre-processing might be an interesting contribution :)

On Sat, 19 Feb 2022 at 01:50, Justin @.***> wrote:

AMR reminds of nltk's https://www.nltk.org/howto/parse.html parse output:

sentence1 = 'the cat chased the dog'.split() for t in rd.parse(sentence1): ... print(t) (S (NP the (N cat)) (VP (V chased) (NP the (N dog))))

also, clojure (a JVM language) has good python interop so it is really easy to invoke nltk (python) functions from the JVM. we could even allow a user to present natural language sentences and then we could parse it with nltk and return a triplified parse tree.

— Reply to this email directly, view it on GitHub https://github.com/SPARQL-Anything/sparql.anything/issues/209#issuecomment-1045455460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB52ONCP6FCQ45YFJHALR53U33SNJANCNFSM5OUAU57Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>