forked from quanteda/quanteda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsummary.corpus.Rd
36 lines (32 loc) · 1.1 KB
/
summary.corpus.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/corpus-methods-base.R
\name{summary.corpus}
\alias{summary.corpus}
\title{Summarize a corpus}
\usage{
\method{summary}{corpus}(object, n = 100, showmeta = FALSE,
tolower = FALSE, ...)
}
\arguments{
\item{object}{corpus to be summarized}
\item{n}{maximum number of texts to describe, default=100}
\item{showmeta}{set to \code{TRUE} to include document-level
meta-data}
\item{tolower}{convert texts to lower case before counting types}
\item{...}{additional arguments passed through to \code{\link{tokens}}}
}
\description{
Displays information about a corpus, including attributes and metadata such
as date of number of texts, creation and source.
}
\examples{
summary(data_corpus_inaugural)
summary(data_corpus_inaugural, n = 10)
corp <- corpus(data_char_ukimmig2010,
docvars = data.frame(party=names(data_char_ukimmig2010)))
summary(corp, showmeta = TRUE) # show the meta-data
sumcorp <- summary(corp) # (quietly) assign the results
sumcorp$Types / sumcorp$Tokens # crude type-token ratio
}
\keyword{corpus}
\keyword{internal}