Description Usage Arguments Value Examples
Determines whether a text input contains any entities of a pre-specified type, and reports those entities.
1 | contains_entities(input, entities, model.list)
|
input |
A character vector of text to be analysed. |
entities |
A character vector of named entities. |
model.list |
A model list, produced using load_nlp_models. |
A list containing: (a) a logical vector specifying whether each entity named in 'entities' was found in the text, and (b) a list of the identified entities.
1 2 3 4 | a <- load_nlp_models(entities=c("sentence","word","POS","person"))
input <- "This is a test."
entities <- c("POS/NNP","person")
contains_entities(input,entities,model.list=a)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.