View source: R/AlcesteSource.R
AlcesteSource | R Documentation |
Construct a source for an input containing a set of texts saved in the Alceste format in a single text file.
AlcesteSource(x, encoding = "auto")
x |
Either a character identifying the file or a connection. |
encoding |
A character string: if non-empty declares the encoding
used when reading the file, so the character data can be
re-encoded. See the ‘Encoding’ section of the help for
|
Several texts are saved in a single Alceste-formatted file, separated
by lines starting with “***” or digits, followed by starred
variables (see links below). These variables are set as document
meta-data that can be accessed via the meta
function.
Currently, “theme” lines starting with “-*” are ignored.
An object of class AlcesteSource
which extends the class
Source
representing set of articles from Alceste.
Milan Bouchet-Valat
https://image-zafar.com/sites/default/files/telechargements/formatage_alceste.pdf (in French) about the Alceste format
readAlceste
for the function actually parsing
individual articles.
getSources
to list available sources.
library(tm)
file <- system.file("texts", "alceste_test.txt",
package = "tm.plugin.alceste")
corpus <- Corpus(AlcesteSource(file))
# See the contents of the documents
inspect(corpus)
# See meta-data associated with first article
meta(corpus[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.