Graphical Knowledge Representations for Natural Language Inference

This is the Graphical Knowledge Representation (GKR) parser. It transforms a given sentence into a layered semantic graph. The semantic graph (currently) consists of 6 subgraphs/layers: dependency graph, concept graph, context graph, lexical graph, properties graph and coreference graph. This separation in layers is analogous to the separation in levels in the LFG architecture (Kaplan, 1995): each layer encodes different kinds of information present in the sentence and this allows the formulation of modular linguistic generalizations which govern a given layer independently from the others. This allows for the combination of multiple logics and styles of representations, i.e. structural/linguistic and distributional representations, and contrasts with the latent representations used in end-to-end deep learning approaches. The representation is especially targeted towards Natural Language Inference (NLI) but is also suitable for other semantic processing tasks, e.g. semantic similarity tasks.
The current version of GKR makes uses of the Stanford CoreNLP 3.9.2 software to build the dependency graph. It also uses the Princeton WordNet 3.0 version to extract the senses of the lexical graph. For more details on how this software is used, please refer to our publications. This demo seeks to give interested researchers a taste of GKR. Currently, GKR can deal with various contextual phenomena, such as negation, modals, clausal contexts of propositional attitudes (e.g. belief, knowledge, obligation), implicatives, interrogative and imperative clauses, disjunction and conjunction. The treatment of conditionals, distributivity and ellipsis is not implemented yet, but planned for the future. GKR is constantly being improved and we are thankful for any comments or discussions.
We are currently also implementing a hybrid, symbolic and distributional, NLI system based on GKR. Its preliminary version will be made available soon.


The source code of GKR is publicly available on github.

Online Demo for GKR

Enter a sentence below to try our GKR parser online:

File Upload: Experimental - NOT optimized!
Upload a small file up to 5 KB.
The file should contain one sentence per line of the format: \id_number\ \tab\ \sentence\, e.g. 1\tA dog is walking. The filename should end at .csv. Lines starting with # are considered comments and ignored. Depending on the size of your file, this might take a while. The output will be a string representation of GKR which is not optimized for readability! The string representation does not contain the information of the lexical and coreference graph.

Select a file:


The boy faked the illness.
Negotiations prevented the strike.
The dog is not eating the food.
John or Mary won the competition.
No woman is walking.
Max forgot to close the door.
John might apply for the position.
Did Ann manage to close the window?
Fred believes that John doesn't love Mary.
The boy and the girl are walking.
Nicole Kidman, the actress, won the oscar.
Be patient!
The director, who edited the first movie, released the second part.



Copyright 2018 Aikaterini-Lida Kalouli and Richard Crouch