rdr_pos: Part-Of-Speech Tagging for tagging sentences based on Ripple...

Description Usage Arguments Value See Also Examples

Description

Part-Of-Speech Tagging for tagging sentences based on Ripple Down Rules

Usage

1
2
rdr_pos(object, x, doc_id = paste("d", seq_along(x), sep = ""),
  add_space_around_punctuations = TRUE)

Arguments

object

And object of class RDRPOSTagger as returned by rdr_model

x

a character vector in UTF-8 encoding where each element of the character vector contains text which you like to tag.

doc_id

an identifier of a document with the same length as x.

add_space_around_punctuations

logical indicating to add a space around punctuations before doing the RDR tagging. Defaults to TRUE as the RDRPOStagger requires this.

Value

a data frame with fields doc_id, token_id, token, pos where the pos field is the Parts of Speech tag. If you want to find out the meaning of the different POS tags, visit http://universaldependencies.org.

See Also

rdr_model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
x <- c("Dus godvermehoeren met pus in alle puisten, zei die schele van Van Bukburg.", 
  "Er was toen dat liedje van tietenkonttieten kont tieten kontkontkont",
  "  ", "", NA)
tagger <- rdr_model(language = "Dutch", annotation = "MORPH")
rdr_pos(tagger, x = x)

tagger <- rdr_model(language = "Dutch", annotation = "UniversalPOS")
rdr_pos(tagger, x = x)

## Not run: 
x <- c("Oleg Borisovich Kulik is a Ukrainian-born Russian performance artist, 
  sculptor, photographer and curator.")
tagger <- rdr_model(language = "English", annotation = "POS")
rdr_pos(tagger, x = x)

## End(Not run)

bnosac/RDRPOSTagger documentation built on May 8, 2019, 3:43 p.m.