Description Usage Arguments Details Value Author(s) See Also Examples
For a single entity this grabs the information
1 | extractEntityInfo(entity, tokens, tagNames)
|
entity |
A single entity as found by MITIE |
tokens |
The tokens from text as found by MITIE |
tagNames |
The possible tags from this MITIE model |
For a single entity this grabs the information
A one-row tbl holding the Entity, Type, Start and Stop point at the tokens
Jared P. Lander
extractEntity
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
ner_model_path <- "tests/data/ner_model.dat"
ner <- NamedEntityExtractor$new(ner_model_path)
tag_names <- ner$get_possible_ner_tags()
theText <- "A network of new super PACs said Wednesday that it had raised $31 million to support Senator Ted Cruz's presidential campaign, a sum that could upend expectations in the race for the Republican nomination and rewrite the political rule book for outside spending"
tokens <- mitie_tokenize(theText)
entities <- ner$extract_entities(tokens)
extractEntityInfo(entities[[1]], tokens, tag_names)
extractEntityInfo(entities[[2]], tokens, tag_names)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.