observe_sonnet_chain: Convert the raw text of all 154 sonnets to an observed Markov...

View source: R/observe_sonnet_chain.R

observe_sonnet_chainR Documentation

Convert the raw text of all 154 sonnets to an observed Markov chain of words

Description

Formatting of the raw text file of 154 sonnets by Shakespeare. The function prepares it into a discrete time observed chain by putting each word in a big vector/list, removing punctuation, cases, and titles.

Usage

observe_sonnet_chain(punctuation = FALSE, uppercase = FALSE)

Arguments

punctuation

boolean whether to keep punctuation (TRUE) or not (FALSE)

uppercase

boolean whether to distinuqish between uppercase (TRUE) or not (FALSE)

Value

list containing named entries


shill1729/markovChains documentation built on April 24, 2022, 11:50 a.m.