Skip to content

A helper function to load the appropriate tagger based on the provided language. This function supports a variety of languages/models.

Usage

load_tagger_ner(language = NULL)

Arguments

language

A character string indicating the desired language for the NER tagger. If NULL, the function will default to the 'pos-fast' model. Supported languages and their models include:

  • "en" - English NER tagging (ner)

  • "de" - German NER tagging (de-ner)

  • "fr" - French NER tagging (fr-ner)

  • "nl" - Dutch NER tagging (nl-ner)

  • "da" - Danish NER tagging (da-ner)

  • "ar" - Arabic NER tagging (ar-ner)

  • "ner-fast" - English NER fast model (ner-fast)

  • "ner-large" - English NER large mode (ner-large)

  • "de-ner-legal" - NER (legal text) (de-ner-legal)

  • "nl" - Dutch NER tagging (nl-ner)

  • "da" - Danish NER tagging (da-ner)

  • "ar" - Arabic NER tagging (ar-ner)

Value

An instance of the Flair SequenceTagger for the specified language.

Examples

# Load the English NER tagger
tagger_en <- load_tagger_ner("en")