generate_markovify_model: Generate Markovify model

View source: R/markovify.R

generate_markovify_modelR Documentation

Generate Markovify model

Description

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

Usage

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

## 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 July 19, 2023, 7:06 p.m.