Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

      mask value (String) The value to mask the facet name.

Question Detector

Detects if a query is a question. If not, terminates the execution of the endpoint.

Configuration:
{
    "component": "questionDetector",
    "description": "question detector",
    <configuration>
}
Configuration parameters:

queryParameter

(Optional, String) The name of the query parameter that holds the query. Defaults to q.

Template

The template component allows for the loading of Json objects into the request body, optionally based on the values of query parameters. This allows for loading of (say) a complex structure used for querying, filtering or sorting that can then have minor modifications made to it by a scripting component.

Configuration:
{
    "component": "template",
    "description": "template processor",
    <configuration>
}
Configuration parameters:

templates

(Optional, Json) Used in conjunction with the parameter option below, this holds a Json object containing a set of named templates. The top level field name is the template name. Its (object) value is the template. When selected the (object) value will replace or be merged into the request body.

...

This component detects the language from the input query. It expects a list of possible language to detect. The output language is added as part as a header.

Configuration:
{
   "component": "languageDetector",
   "description": "Language detector description",
    <configuration>
}
Configuration parameters:

languagesDetector

(Optional, Json) Languages to detect. The detection process will narrow down to only detect these languages. Full language names are expected in lower case, for example: ['spanish', 'english'] The default value is an empty list.

...

(Optional, String) Which query parameter to analyze. Defaults to q

Question Detector

This component detects whether a query is in question format or not. It analyzes a query to detect if it starts with a word that denotates a question or if it ends with a question mark (?). If any of those are met. Then a question is detected. If a question is not detected, then the flow terminates.

If a language has been previously detected (i.e. a custom response header exists), then the questions prefixes associated to that language will be used. If not, a default language will be selected.

Configuration:
{
  "component": "questionDetector",
  "description": "Question detector description",
  <configuration>
}
Configuration parameters:

questionPrefixes

(Optional, Json) Map of lists that contains the words that help to detect questions. For example:

...

This component takes a query as input and send it to the spacy NLP service for analysis. Both entities and dependency responses from Spacy are added to the API request so they can be used by a downstream component.

Configuration:
{
  "component" : "NLPClient",
  "description" : "Performs NLP analysis using Spacy service.",
  <configuration>
}
Configuration parameters:

model

(Optional, String) Name of the spacy model to use. Can be overridden with the discovery-api-nlp-model response header.

...

This component detects in an array of cypher queries the entity to be changed.

Configuration:
{
  "component": "replaceEntities",
  "description": "Replace Entity description",
  <configuration>
}
Configuration parameters:

numberOfQueriesToUse

(Optional, Integer) Number of queries which are going to be used in this component. Defaults to 1.

...

{
  "entity": "x",
  "attribute": "y",
  "value": ["a","b","c","d","f"]
}
Configuration:
{
  "component": "neo4j",
  "description": "neo4j description",
  <configuration>
}
Configuration parameters:

emptyResponseMap (Optional, Json) This text will be used in cases where an empty value comes from neo4j. Defaults to:

...

This component detects in an array of cypher queries the entity to be changed.

Configuration:
{
  "component": "replaceEntities",
  "description": "Replace Entity description",
  <configuration>
}
Configuration parameters:

merge

(Optional, boolean) Replace or merge the query into the body. Defaults to false.

...

This component calls the DistilBERT service with a question and a list of text chunks.

Configuration:
{
    "component": "featuredSnippet",
    "description": "Replace featured snippets description",
    <configuration>
}
Configuration parameters:

queryParameter

(Optional, String) The (query) parameter. Defaults to 'q'.

...

This component saves various values as a feedback entity in storage

Configuration:
{
    "component": "feedback",
    "description": "This processor saves feedback data in storage",
    <configuration>
}
Configuration parameters:

feedbackField

(String) The path for fetching the numeric value that measures the subjective opinion of a feedback. Example: -1:Bad, 1:Good.

...

This component identifies an entity based on configuration parameters.

Configuration:
{
    "component": "findEntity",
    "description": "This processor finds an entity",
    <configuration>
}
Configuration parameters:

acceptedPOS

(String array) The array list of POS to identify the entity, valid POS: NOUN, ADJ, JJ, JJR, JJS, AFX, NN, PROPN, NNP, NNPS, NNS.

...