as_tuple: Combine Words + Tags Tuple

Description Usage Arguments Value Note Examples

Description

A traditional Python tuple style of displaying words and tags in the same vector.

Usage

1
as_tuple(x, word.first = TRUE, ...)

Arguments

x

A tag_pos object or a named list of vectors.

word.first

logical. If TRUE the word comes before the tag.

...

ignored.

Value

Returns a list of lists of tuples vectors..

Note

In order to generate a Python equivalent output use:
print(as_tuple(x), truncate=Inf, file="out.txt")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
(x <- tag_pos("I need $54 to go to the movies."))
c(x) ## The true structure of a `tag_pos` object
as_tuple(c(x))

## Don't truncate the printing
print(as_tuple(x), truncate=FALSE)

## Export tuple printing to file
## Not run: 
print(as_tuple(x), truncate=Inf, file="out.txt")

## End(Not run)
as_tuple(x, word.first=FALSE)

(out1 <- tag_pos(sam_i_am))
as_tuple(c(out1))

trinker/tagger documentation built on May 31, 2019, 10:42 p.m.