View source: R/gutenberg_strip.R
gutenberg_strip | R Documentation |
Strip header and footer content from a Project Gutenberg book. This is based on some formatting guesses so it may not be perfect. It will also not strip tables of contents, prologues, or other text that appears at the start of a book.
gutenberg_strip(text)
text |
A character vector with lines of a book. |
A character vector with Project Gutenberg headers and footers removed
book <- gutenberg_works(title == "Pride and Prejudice") |>
gutenberg_download(strip = FALSE)
head(book$text, 10)
tail(book$text, 10)
text_stripped <- gutenberg_strip(book$text)
head(text_stripped, 10)
tail(text_stripped, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.