Disambiguation Module

  • Version 1

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": [
    {
      "o": "<http://lodqa.org/vocabulary/sort_of>",
      "p": "is",
      "s": "v7"
    },
    {
      "o": "rdf:Class",
      "p": "is",
      "s": "v3"
    },
    {
      "o": "river",
      "p": "verbalization",
      "s": "v3"
    },
    {
      "o": "rdf:Property",
      "p": "is",
      "s": "v2"
    },
    {
      "o": "flows",
      "p": "verbalization",
      "s": "v2"
    },
    {
      "o": "rdf:Resource|rdfs:Literal",
      "p": "is",
      "s": "v6"
    },
    {
      "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:

{
  "ned": [
    {
      "classes": [
        {
          "score": 0.6666666666666666,
          "value": "http://dbpedia.org/ontology/River",
          "var": "v3"
        }
      ],
      "entities": [
        {
          "score": 1,
          "value": "http://dbpedia.org/resource/Seoul",
          "var": "v6"
        }
      ],
      "literals": [
        {
          "score": 1,
          "value": "Seoul",
          "var": "v6"
        }
      ],
      "properties": [
        {
          "score": 0.5,
          "value": "http://dbpedia.org/ontology/city",
          "var": "v2"
        }
      ],
      "score": 1
    }
  ],
  "question": "Which rivers flow through Seoul?"
}

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.