snippets_make: create text segments for comparisons

Description Usage Arguments Value

View source: R/snippets_make.R

Description

Create text segments of a defined length, for comparisons.

Usage

1
2
3
4
5
6
7
snippets_make(x, ...)

## S3 method for class 'character'
snippets_make(x, ...)

## S3 method for class 'corpus'
snippets_make(x, nsentences = 1, minchar = 100, maxchar = 350, ...)

Arguments

x

input objects, texts or a quanteda corpus

...

not used

nsentences

length in sentences of each snippet

minchar

minimum length in characters of a snippet

maxchar

maximum length in characters of a snippet

Value

a data.frame of snippets, with a unique indentifier


kbenoit/sophistication documentation built on May 12, 2021, 5:57 a.m.