makeConcordance: Function to create a concordance from a filtered corpus...

Description Usage Arguments Value Examples

Description

This function will create a concordance for a string or regex pattern

Usage

1
2
makeConcordance(filtered_corpus, pattern = NULL, column = c("tagged",
  "text"))

Arguments

filtered_corpus

a data.frame generated by searchCorpus or by calling command-line grep on the corpus files

pattern

a regex pattern. If you want to match full-word strings, just pad your string with the word boundary symbol \b. E.g. \b(brother)\b

column

column to match the pattern against. The column 'text' contains the untagged text, the column 'text' contains the dependency-tagged text

Value

a data.frame with a conconcordance for your pattern added to the input data.frame

Examples

1
2
this function can be combined with searchCorpus in a corpus-processing pipeline. For example: \code{concordance<-searchCorpus() %>% 
makeConcordance() }

jeroenclaes/tweetCorp documentation built on May 27, 2019, 4:50 a.m.