Usually used for sentence parsing, either grammatical, or Named Entity Recognition (NER) to understand keywords contained within text.
Usage
hf_ez_token_classification(
model_id = "dbmdz/bert-large-cased-finetuned-conll03-english",
use_api = FALSE
)Examples
if (FALSE) { # \dontrun{
# Load the default named entity recognition model
ez <- hf_ez_token_classification()
# Run NER. Note how the full name is aggregated into one named entity.
ez$infer(string = "My name is Sarah Jessica Parker but you can call me Jessica", aggregation_strategy = 'simple')
# Run NER without aggregation. Note how the full name is separated into distinct named entities.
ez$infer(string = "My name is Sarah Jessica Parker but you can call me Jessica", aggregation_strategy = 'none')
} # }