File: annotate.R

package info (click to toggle)
r-cran-nlp 0.3-2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 456 kB
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 350 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
## annotate() can use a single annotator or an annotator pipeline or
## something coercible to this, such as a list of annotators, and
## recursively calls the given annotators and merges annotations.

annotate <-
function(s, f, a = Annotation())
{
    s <- as.String(s)
    for(e in as.Annotator_Pipeline(f))
        a <- merge(a, e(s, a))

    a
}