extract_entities
Parse texts and extract the entities mentioned (persons, organizations etc.).
Generates one column per type of entity (see below), each containing lists of entities detected in the corresponding text.
A text column to extract entities from.
An (optional) column identifying the languages of the corresponding texts. It is used to identify the correct model (spaCy)
to use for each text. If the dataset doesn’t contain such a column yet, it can be created using the infer_language
step.
Ideally, languages should be expressed as two-letter
ISO 639-1 language codes, such as “en”, “es” or “de” for
English, Spanish or German respectively. We also detect fully spelled out names such as “english”, “German”, “allemande”
etc., but it is not guaranteed that we will recognize all possible spellings correctly always, so ISO codes should be
preferred.
Alternatively, if all texts are in the same language, it can be identified with the language
parameter instead.
Lists of people detected in the texts (including fictional).
Lists of nationalities and religious or political groups detected in the texts.
Lists of organizations detected in the texts (companies, agencies, institutions, etc.).
Lists of geo-political entities detected in the texts, i.e. countries, cities, states etc.
Lists of locations detected in the texts, other than GPEs, such as mountain ranges, bodies of water etc.
Lists of products detected in the texts (objects, vehicles, foods, etc., not services).
Lists of events detected in the texts (e.g. named hurricanes, battles, wars, sports events, etc.).
List of monetary values detected in the texts, including unit.
Whether to enable support for additional languages. By default, Arabic (“ar”), Catalan (“ca”), Basque (“eu”), and Turkish (“tu”) are not enabled, since they’re supported only by a different class of language models (stanfordNLP’s Stanza) that is much slower than the rest. This parameter can be used to enable them.
Minimum number (or proportion) of texts to include a language in processing. Any texts in a language with fewer documents than these will be ignored. Can be useful to speed up processing when there is noise in the input languages, and when ignoring languages with a small number of documents only is acceptable. Values smaller than 1 will be interpreted as a proportion of all texts, and values greater than or equal to 1 as an absolute number of documents.
The language of inputs texts.
If all texts are in the same language, it can be specified here instead of passing it as an input column. The language will be used to identify the correct spaCy model to parse and analyze the texts. For allowed values, see the comment regarding the lang
column above.
Was this page helpful?