Learn Data & AI Skills | 50% off
Get 50% off unlimited learning

koRpus (version 0.04-27)

read.corp.custom: Import custom corpus data

Description

Read data from a custom corpus into a valid object of class kRp.corp.freq-class.

Usage

read.corp.custom(corpus, format = "file",
    fileEncoding = "UTF-8", quiet = FALSE, ...)

Arguments

corpus
Either the path to directory with txt files to read and analyze, or a vector object already holding the text corpus.
format
Either "file" or "obj", depending on whether you want to scan files or analyze the given object.
fileEncoding
A character string naming the encoding of the corpus files.
quiet
Logical. If FALSE, short status messages will be shown.
...
Additional options to be passed through to the tokenize function.

Value

Details

The function should enable you to perform a basic text corpus frequency analysis. That is, not just to import analysis results like LCC files, but to import the corpus material itself. The resulting object is of class kRp.corp.freq-class, so it can be used for frequency analysis by other functions of this package.

See Also

kRp.corp.freq-class

Examples

Run this code
ru.corp <- read.corp.custom("~/mydata/corpora/russian_corpus/")

Run the code above in your browser using DataLab