forked from quanteda/quanteda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.Rd
54 lines (44 loc) · 1.48 KB
/
settings.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/settings.R
\name{settings}
\alias{settings}
\alias{settings.default}
\alias{settings.corpus}
\alias{settings<-}
\alias{settings.dfm}
\title{Get or set the corpus settings}
\usage{
settings(x, ...)
\method{settings}{default}(x = NULL, ...)
\method{settings}{corpus}(x, field = NULL, ...)
settings(x, field) <- value
\method{settings}{dfm}(x, ...)
}
\arguments{
\item{x}{object from/to which settings are queried or applied}
\item{...}{additional arguments}
\item{field}{string containing the name of the setting to be set or queried
\code{settings(x)} query the corps settings
\code{settings(x, field) <-} update the corpus settings for \code{field}}
\item{value}{new setting value}
}
\description{
Get or set the corpus settings
Get or set various settings in the corpus for the treatment of texts, such as rules for
stemming, stopwords, collocations, etc.
Get the settings from a which a \link{dfm} was created
}
\details{
Calling \code{settings()} with no arguments returns a list of system default settings.
}
\examples{
settings(data_corpus_inaugural, "stopwords")
(dfmat1 <- dfm(corpus_subset(data_corpus_inaugural, Year > 1980)))
(dfmat2 <- dfm(corpus_subset(data_corpus_inaugural, Year > 1980),
remove = stopwords("english")))
settings(data_corpus_inaugural, "stopwords") <- TRUE
dfmat <- dfm(data_corpus_inaugural, stem = TRUE, verbose = FALSE)
settings(dfmat)
}
\keyword{internal}
\keyword{settings}