ab_accessors: slot accessors

Description Usage Arguments Details Methods

Description

Methods for accessing slots of a book object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S4 method for signature 'book'
author(x)
## S4 method for signature 'book'
text(x)
## S4 method for signature 'book'
language(x)
## S4 method for signature 'pgbook'
language(x, with.license=FALSE)
## S4 method for signature 'pgbook'
license(x)

Arguments

x

book object

with.license

logical; determines if selection via the text() method should include (in the corpus itself) the license the book is subject to.

Details

author(x), language(x), and license(x) are just syntactic sugar for x@author, x@language, and x@license respectively.

On the other hand, text() is a bit different. Its main use is to return the body of the book, stored as a single string, with or without its license. The idea behind the latter being that the user may not want to have the terms of the license of the book included in the analysis of the book itself.

Methods

signature(x = "book")
signature(x = "pgbook")

wrathematics/rgutenberg documentation built on May 4, 2019, 10:54 a.m.