extractEntity: extractEntity

Description Usage Arguments Details Value Author(s) See Also Examples

Description

For a collection of entities this grabs the information

Usage

1
extractEntity(entities, tokens, tagNames)

Arguments

entities

Entities as found by MITIE

tokens

The tokens from text as found by MITIE

tagNames

The possible tags from this MITIE model

Details

For a collection of entities this grabs the information

Value

A tbl holding entity info, one row per each

Author(s)

Jared P. Lander

See Also

extractEntityInfo

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
ner_model_path <- "mitie/MITIE-models/english/ner_model.dat"
ner <- NamedEntityExtractor$new(ner_model_path)
tag_names <- ner$get_possible_ner_tags()
theFile <- file.path('data', 'NYTimes', dir(file.path('data', 'NYTimes'))[1])
tokens <- mitie_tokenize(samp[1])
extractEntity(entities, tokens, tag_names)

## End(Not run)

jaredlander/TextInfo documentation built on May 18, 2019, 3:46 p.m.