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
|
\name{WordListDocument}
\alias{WordListDocument}
\title{Word List Text Documents}
\description{
Create text documents from word lists.
}
\usage{
WordListDocument(con, encoding = "unknown", meta = list())
}
\arguments{
\item{con}{a connection object or a character string.
See \code{\link{readLines}()} for details.
}
\item{encoding}{encoding to be assumed for input strings.
See \code{\link{readLines}()} for details.
}
\item{meta}{a named or empty list of document metadata tag-value
pairs.}
}
\details{
\code{WordListDocument()} uses \code{\link{readLines}()} to read
collections of words from connections for which each line provides one
word, with blank lines ignored, and returns a word list document
object which inherits from classes \code{"WordListDocument"} and
\code{"\link{TextDocument}"}.
The methods for generics \code{\link{words}()} and
\code{\link{as.character}()} and class \code{"WordListDocument"}
can be used to extract the words.
}
\value{
A word list document object inheriting from \code{"WordListDocument"}
and \code{"\link{TextDocument}"}.
}
\seealso{
\code{\link{TextDocument}} for basic information on the text document
infrastructure employed by package \pkg{NLP}.
}
|