generate_markovify_model: Generate Markovify model

Description Usage Arguments Value Examples

Description

Generate a markov model for a given input text and set of model parameters

Usage

1
2
generate_markovify_model(input_text, markov_state_size = 2,
  max_overlap_total = 15, max_overlap_ratio = 0.7, tries = 100)

Arguments

input_text

a vector of text

markov_state_size

markov state to use default is 2

max_overlap_total

maximum overlap total default is 15

max_overlap_ratio

maximum overlap ratio default is .7

tries

number over times to try to generate a sentence

Value

a markov model in Python object form

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
library(dplyr)
library(markovifyR)
data("linneman_lessons")
df <- linneman_lessons
lessons <-
df %>%
pull(textLesson)
markov_model <-
generate_markovify_model(
input_text = lessons,
markov_state_size = 3L,
max_overlap_total = 15,
max_overlap_ratio = .8
)
markov_model

## End(Not run)

abresler/markovifyR documentation built on June 1, 2019, 7:35 a.m.