corpus_filepaths: Returns the absolute filepaths to corpus text files.

Description Usage Arguments Value Examples

Description

Returns file paths to the corpus texts; the locations of which are not always transparent to the user.

Usage

1

Arguments

corpus

The name of the corpus. Can be ‘DNov’ or ‘19C’.

title

Either a character string or a vector of character strings representing the novel titles. If title is not given then all paths for the corpus are returned. title values are first checked against the title abbreviations and then against the full titles. Any unique partial match is allowed, for example 'the mill' would match 'The Mill on the Floss'.

Value

corpus_filepaths returns a single filepath as a string, or multiple filepaths as a vector of strings. When a vector is returned the name attributes are the title abbreviations.

Examples

1
2
3
4
5
    all_paths <- corpus_filepaths('DNov')

    some_paths <- corpus_filepaths('DNov', title = c('Great Expectations', 'A Tale of Two Cities'))

    a_path <- corpus_filepaths('DNov', title = 'GE')

ravingmantis/CorporaCorpus documentation built on May 27, 2019, 2:04 a.m.