Login

en | de

API Documentation - Response

The response is always in json format. It contains the analyzed text and the language of the text, and for every requested service the response contains a block. The content of the response block is service-specific and contains the actual analysis result for this service. For clear documentation, the response block will be omitted here, but will be described later in detail for each service.

For an example of a complete response, see section Overview.

Response Format

  • {
    • text: "Angela Merkel wurde am 17. Juli 1954 in Hamburg als Angela Dorothea Kasner geboren.",
    • timestamp: 1400247994051,
    • language: "de",
    • entities: [
    • ]
    • lexiconEntities: [
    • ]
    • tags: [
    • ]
    • dates: [
    • ]
    • categories: [
    • ]
    • measures: [
    • ]
  • }

An empty result list will be returned if a service has successfully analyzed the text, but found no results. In case of an error of a single service, the returned HTTP status will be 200 and the response content will contain the results of all the services, except for the failed service block.

Description of each field:

text The analyzed text. If you passed an URL, the extracted plain text (with boiler plate removal) will be displayed. If you passed an plain text within the parameter 'text', the unchanged text will be shown.
language The language for the text, eg "de" , "en", or "ru" or others.
timestamp The timestamp of the response (in milliseconds since January 1, 1970).

Response Format: Entities

  • {
    • entities: [
      • {
        • confidence: 47.72833251953125,
        • relevance: 15.534404754638672,
        • surface: "Angela Merkel",
        • label: "Angela Merkel",
        • uri: "https://www.wikidata.org/wiki/Q567",
        • type: "PERSON",
        • start: 0,
        • end: 13
      • },
      • {
        • confidence: 39.60715866088867,
        • relevance: 14.97057819366455,
        • surface: "Hamburg",
        • label: "Hamburg",
        • uri: "https://www.wikidata.org/wiki/Q1055",
        • type: "PLACE",
        • start: 40,
        • end: 47
      • },
      • {
        • confidence: 100.0,
        • relevance: 17.836894989013672,
        • surface: "Angela Dorothea Kasner",
        • label: null,
        • uri: null,
        • type: "PERSON",
        • start: 52,
        • end: 74
      • }
    • ]
  • }

Description of each field:

label The unique label of the entity.
surface The surface form of the entity in the text.
type Type of entity. Possible values ​​are "PERSON", "PLACE", "ORGANISATION", "JOB TITLE", "WORK", "EVENT", "CONCEPT". This is determined heuristically and may vary in some cases from the expected value. Example: A city can act as an employer and can be therefore classified as an organization.
uri The Wikidata URI of the named entity. Set to 'null' if there is no entity URI in the Wikidata knowledge base.
confidence Confidence value about the discovered entity. A higher value represents a more secure detection. The upper value of the confidence is unlimited.
relevance Relevance value for the discovered entity. A higher value represents a more important entity. The upper value of the relevance is unlimited.
start The start position of the entity in the text.
end The end position of the entity in the text.

Response Format: Top Entities

  • {
    • topEntities: [
      • {
        • confidence: 717.3840942382812,
        • relevance: 40.1431999206543,
        • label: "Angela Merkel",
        • uri: "https://www.wikidata.org/wiki/Q567",
        • type: "PERSON",
        • matches: [
          • {
            • surface: "Angela Merkel",
            • start: 0,
            • end: 13
          • },
          • {
            • surface: "Merkel",
            • start: 89,
            • end: 95
          • },
          • {
            • surface: "Bundeskanzlerin",
            • start: 104,
            • end: 119
          • }
        • ]
      • },
      • {
        • confidence: 100.0,
        • relevance: 17.836894989013672,
        • label: "Angela Dorothea Kasner",
        • uri: null,
        • type: "PERSON",
        • matches: [
          • {
            • surface: "Angela Dorothea Kasner",
            • start: 52,
            • end: 74
          • }
        • ]
      • },
      • {
        • confidence: 39.51301193237305,
        • relevance: 14.95887279510498,
        • label: "Hamburg",
        • uri: "https://www.wikidata.org/wiki/Q1055",
        • type: "PLACE",
        • matches: [
          • {
            • surface: "Hamburg",
            • start: 40,
            • end: 47
          • }
        • ]
      • }
    • ]
  • }

Description of each field:

label The unique label of the entity.
type Type of entity. Possible values ​​are "PERSON", "PLACE", "ORGANISATION", "JOB TITLE", "WORK", "EVENT", "CONCEPT". This is determined heuristically and may vary in some cases from the expected value. Example: A city can act as an employer and can be therefore classified as an organization.
uri The Wikidata URI of the named entity. Set to 'null' if there is no entity URI in the Wikidata knowledge base.
confidence Confidence value about the discovered entity. A higher value represents a more secure detection. The upper value of the confidence is unlimited.
relevance Relevance value for the discovered entity. A higher value represents a more important entity. The upper value of the relevance is unlimited.
matches The matches of the entity in the text.
matches.surface The surface form of the entity in the text.
matches.start The start position of the entity in the text.
matches.end Die Endposition der Fundstelle im Text.

Response Format: Lexicon Entities

These Named Entities are based on a lexicon managed in TXT Werk. Different to the Wikidata entities, they are determined without any disambiguation. The response format is the same as for 'entities', except the different response block name 'lexiconEntities'.

Description of each field:

label See entities.
surface See entities.
type Type of entity. Possible values ​​are managed in the lexicon and depend on its state.
uri A URI associated with this named entity, typically an identifier in an external system.
confidence See entities. Although in this case the return value is always 1 - it means, it's found.
start See entities.
end See entities.

Response Format: Tags

  • {
    • tags: [
      • {
        • confidence: 0.9967904107197822,
        • term: "Angela Merkel"
      • },
      • {
        • confidence: 0.9927268430144784,
        • term: "Juli"
      • },
      • {
        • confidence: 0.9751561498425574,
        • term: "Hamburg"
      • },
      • {
        • confidence: 0.7406453816287002,
        • term: "Angela Dorothea Kasner"
      • }
    • ]
  • }

Description of each field:

term The found Keyword.
confidence The confidence value of the phrase. The value is always between 0 to 1.

Response Format: Dates

  • {
    • dates: [
      • {
        • dateEnd:
          • {
            • bc: false,
            • day: 17,
            • month: 7,
            • year: 1954
          • }
        • dateStart:
          • {
            • bc: false,
            • day: 17,
            • month: 7,
            • year: 1954
          • }
        • end: 36,
        • start: 23,
        • surface: "17. Juli 1954"
      • }
    • ]
  • }

Description of each field:

surface The surface form of the date in the text.
start The start position of the date in the text.
end The final position of the date in the text.
dateStart The start date. A date is always represented as time periods, e.g. start and end date may have the same value.
dateEnd The end date.
day The day of the start or end date. Possible values ​​are 1-31.
month The month of the start or end date. Possible values ​​are 1-12.
year The year of the start or end date.
bc Describes whether the date refers to the time before Christ. Possible values ​​are true and false.

Response Format: Categories

  • {
    • categories: [
      • {
        • confidence: 0.9840945695370302,
        • label: "politik"
      • },
      • {
        • confidence: 0.010815793425103136,
        • label: "wirtschaft"
      • },
      • {
        • confidence: 0.005075348628913112,
        • label: "kultur"
      • },
      • {
        • confidence: 1.09702999767795e-05,
        • label: "sport"
      • },
      • {
        • confidence: 1.8793566199359706e-06,
        • label: "reisen"
      • },
      • {
        • confidence: 8.05313821392574e-07,
        • label: "wissenschaft"
      • },
      • {
        • confidence: 6.26958551045314e-07,
        • label: "internet"
      • },
      • {
        • confidence: 6.479984358403916e-09,
        • label: "auto+technik"
      • }
    • ]
  • }

Description of each field:

label The name of the category. Possible values ​​are "politik", "wirtschaft", "auto+technik", "internet", "kultur", "reisen", "sport", "vermischtes", "wissenschaft" (e.g. "politics", "economics", "auto + technology", "internet", "culture", "travel", "sport", "mixed", "economy", "science")
confidence The confidence value for the category is always between 0 to 1.

Response Format: Measures

  • {
    • measures: [
      • {
        • start: 8,
        • end: 15,
        • text: "2 Meter",
        • valueString: "2",
        • unitString: "Meter",
        • type: "LENGTH"
      • }
    • ]
  • }

Description of each field:

start The start position of the measurement in the text.
end The end position of the measurement in the text.
text The measurement string, exactly as it occurs in the text.
valueString The value as a string, exactly as it occurs in the text.
unitString The unit as a string, exactly as it occurs in the text.
type The type of the measurement. Possible values are "LENGTH", "AREA", "MASS", "TEMPERATURE", "VOLTAGE", "AMPERAGE", "RESISTANCE", "CHARGE", "CAPACITY", "CONDUCTANCE", "INDUCTANCE", "MAGNETIC_STRENGTH", "POWER", "ENERGY", "FORCE", "PRESSURE", "FREQUENCY", "VOLUME", "LUMINOSITY", "ILLUMINANCE", "SPIN", "SUBSTANCE", "RADIOACTIVITY", "CURRENCY", "TIME", "UNKNOWN"