Skip to main content

NlpRequest

NLP request for Media Assistant v2, based on General API's request.

See the semantic tagging guide for an example of using an NLP request to obtain tags.

The API is intended for analysis of typical newspapers articles, not books. The API will reject any request larger than 500 KB. However, even analysis of smaller documents might time-out if they contain many entities. Please, get in touch with us, if your use case requires analysis of large articles.

Fields

PropertyRequiredTypeDescription
idTruestringUnique identifier of the article
titleFalsestringThe title or subject of the article, when available; mutually exclusive with the paraSpecs parameter
leadFalsestringThe lead or abstract of the article, when available; mutually exclusive with the paraSpecs parameter
textFalsestringThe main text or body of the article; mutually exclusive with the paraSpecs parameter
paraSpecsFalseList[ParaSpec]The paragraphs; mutually exclusive with title, lead and text parameters
domicileFalsestringThe location part of the dateline indicating the origin location of the article, e.g., Paris, France
analysesFalseList[string][option] What analysis to return. Default: all
languageFalsestring

[option] The language of the article as an ISO 639-1 code; auto-detection will be used if omitted. See this guide for the list of supported languages.

langDetectPriorFalsestring

[option] The language detection prior; e.g., de,en. See the list of supported priors.

presentationLanguageFalsestring

[option] The presentation language of the results as an ISO 639-1 code; for example fr. See this guide for more details.

categoriesFalseList[Category][option] The categories (and entities) of the article
referenceDateFalsestring

[option] Date to be used for the analysis as a reference, optionally with time.

The accepted values:

  • NOW - the current date and time
  • date in the yyyy-mm-dd format; it is assumed to be in the GMT timezone; for example 2024-06-21.
  • datetime in the ISO format as accepted by the java.time.format.DateTimeFormatter.ISO_DATE_TIME's parse function; for example, 2024-06-21T10:15:30, 2024-06-21T10:15:30+01:00.
  • all other values, including illegal ones, are treated as NOW
returnMentionsFalseboolean

[option] Should entity/tag/relation mentions be returned? Default: false. See this guide for an example.

returnItemSentimentFalseboolean[option] Should entity/mention/tag/relation etc. sentiment be returned? Default: false
returnGkbPropertiesFalseboolean[option] Should entity/tag GKB properties be returned? Default: false
metadataFalseMap[string, string]Any additional metadata for the article, e.g., domicile or URL
recommendationFalseRecommendationRecommendation info for the article