Architecture‎ > ‎

Disambiguation

A disambiguation module takes in a set of pseudo queries with slot descriptions which are supposed to be generated by a template generation module. Then, the goal of a disambiguation is to map slots to resources (individuals, classes and properties). In the following, we detail the input and output of the disambiguation. Then we link to existing implementations, especially the implementation based on the AGDISTIS framework.

Input

JSON object that abides by the following syntax:

  • {
    • "query": "SELECT ?v4 WHERE { ?v4 ?v2 ?v6 ; ?v7 ?v3 . } ",
    • "question": "which river flows through Seoul?",
    • "score": "1.0",
    • "slots": [
      1. {
        • "o": "<http://lodqa.org/vocabulary/sort_of>",
        • "p": "is",
        • "s": "v7"
        },
      2. {
        • "o": "rdf:Class",
        • "p": "is",
        • "s": "v3"
        },
      3. {
        • "o": "river",
        • "p": "verbalization",
        • "s": "v3"
        },
      4. {
        • "o": "rdf:Property",
        • "p": "is",
        • "s": "v2"
        },
      5. {
        • "o": "flows",
        • "p": "verbalization",
        • "s": "v2"
        },
      6. {
        • "o": "rdf:Resource|rdfs:Literal",
        • "p": "is",
        • "s": "v6"
        },
      7. {
        • "o": "Seoul",
        • "p": "verbalization",
        • "s": "v6"
        }
      ]
    }
}
The slots are RDF triples which describe how variables were bound to strings and types by the template generation module. Three types are possibles: rdf:Property, rdf:Class and rdf:Resource. All untyped variables are assumed to belong to the resource category.

Output

The output of the module looks as follows:
{
}
The output is subdivided into disambiguations for entities, classes and properties. Each solution and each disambiguation is assigned a score. Details on the default implementation of disambiguation for OKBQA can be found at the GitHub site. We rely on AGDISTIS for resources and on dictionary lookups based on the trigram similarity for properties and classes.