exc_token: exc_token Function

Description Usage Arguments Examples

View source: R/exc_token.R

Description

This function is equivalent to 'filter(! grepl("regex", Token))', but demands less typing. It is convenient to use this function in a dplyr pipe after the data frame output of read_eaf() function. It is very common that in order to exclude some tokens we can just define some regular expression patterns which do the job, after which we pass the results onward.

Usage

1
exc_token(corpus = corpus, regex = "test")

Arguments

corpus

This is a data frame which contains column 'Token'.

regex

This is a regex one searches wants to exclude

Examples

1
corpus %>% find_token(".+ter$") %>% exc_token("^a.+")

langdoc/FRelan documentation built on May 20, 2019, 7:55 p.m.