conll_get_regions {cwbtools} | R Documentation |
Extract regions from NER annotations (CoNNL format).
Description
Extract regions from NER annotations (CoNNL format).
Usage
conll_get_regions(x)
Arguments
x |
A |
Examples
x <- data.frame(
token = c(
"Die",
"Bundeskanzlerin",
"Angela",
"Merkel",
"spricht",
"im",
"Bundestag",
"zur",
"Lage",
"der",
"Nation",
"."
),
ne = c("O", "O", "B-PERS", "I-PERS", "O", "O", "B-ORG", "O", "O", "O", "O", "O"),
stringsAsFactors = FALSE
)
x[["cpos"]] <- 100L:(100L + nrow(x) - 1L)
tab <- conll_get_regions(x)
[Package cwbtools version 0.4.2 Index]