Combined Content Recognition Results

Overview

For each answer query, Solve for All runs multiple Content Recognizers and Semantic Data Collections each of which output their own recognition results. Additionally, Solve for All always searches the Knowledge Base for recognition results from DBpedia. Solve for All then combines all recognition results into a single data structure, called Combined Content Recognition Results and sends it to all Triggers and Answer Generators. This page describes how Solve for All combines the recognition results, which is similar to collecting keys and values in a map-reduce framework.

Combination Process

Recall that each Content Recognizer and Semantic Data Collection outputs a dictionary mapping recognition keys to a list of recognition results. To combine these dictionaries, Solve for All combines the list of recognition results for each unique recognition key into a single list.

Example

Suppose the user searches for San Diego, CA 92126, and that his profile has 3 Content Recognizers which produce the output:

{
  "com.solveforall.recognition.USAddress" : [
    {
      "matchedText" : "92126",
      "recognitionLevel" : 1.0,
      "zipCode" : "92126"
    }
  ]
}
and
{
  "com.solveforall.recognition.Number" : [
    {
      "matchedText" : "92126",
      "recognitionLevel" : 1.0,
      "number" : "92126"
    }
  ]
}
and
{
  "com.solveforall.recognition.USAddress" : [
    {
      "matchedText" : "San Diego",
      "recognitionLevel" : 1.0,
      "city" : "San Diego"
    }
  ]
}

All Triggers and Answer Generators would see the following combined recognition result:

{
  "com.solveforall.recognition.Number" : [
    {
      "matchedText" : "92126",
      "recognitionLevel" : 1.0,
      "number" : "92126"
    }
  ],
  "com.solveforall.recognition.USAddress" : [
    {
      "matchedText" : "San Diego",
      "recognitionLevel" : 1.0,
      "city" : "San Diego"
    },
    {
      "matchedText" : "92126",
      "recognitionLevel" : 1.0,
      "zipCode" : "92126"
    }
  ]
}