Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aatxe/markov
/ functions
Functions
50 in github.com/aatxe/markov
⨍
Functions
50
◇
Types & classes
5
↓ 28 callers
Function
new
()
src/lib.rs:440
↓ 18 callers
Method
feed
Feeds the chain a collection of tokens. This operation is `O(n)` where `n` is the number of tokens to be fed into the chain.
src/lib.rs:117
↓ 18 callers
Method
feed_str
Feeds a string of text into the chain.
src/lib.rs:290
↓ 9 callers
Method
iter
Produces an infinite iterator of generated token collections.
src/lib.rs:200
↓ 5 callers
Method
generate
Generates a collection of tokens from the chain. This operation is `O(mn)` where `m` is the length of the generated collection, and `n` is the number
src/lib.rs:140
↓ 4 callers
Function
markov_gen
(args: Vec<String>)
src/bin/markgen.rs:49
↓ 3 callers
Method
generate_from_token
Generates a collection of tokens from the chain, starting with the given token. This operation is O(mn) where m is the length of the generated collect
src/lib.rs:161
↓ 3 callers
Method
is_empty
Determines whether or not the chain is empty. A chain is considered empty if nothing has been fed into it.
src/lib.rs:111
↓ 2 callers
Method
add
(&mut self, token: Token<T>, count: usize)
src/lib.rs:408
↓ 2 callers
Method
next
(&mut self)
src/lib.rs:363
↓ 2 callers
Method
save
Saves the current chain to the specified path.
src/lib.rs:265
↓ 1 callers
Method
feed_file
Feeds a properly formatted file into the chain. This file should be formatted such that each line is a new sentence. Punctuation may be included if it
src/lib.rs:296
↓ 1 callers
Method
graph
(&self)
src/lib.rs:211
↓ 1 callers
Method
iter_for
Produces an iterator for the specified number of generated token collections.
src/lib.rs:205
↓ 1 callers
Method
merge
Merges 2 chains (self and other) into self, consuming the other one. Both chains must be of the same order. This method is useful when you want to spe
src/lib.rs:185
↓ 1 callers
Method
str_iter_for
Produces a sized iterator of generated strings.
src/lib.rs:342
Method
default
()
src/lib.rs:79
Function
feed
()
src/lib.rs:454
Function
feed_str
()
src/lib.rs:512
Function
gen_before_number
()
src/bin/markgen.rs:130
Function
gen_default
()
src/bin/markgen.rs:108
Function
gen_invalid_n_arg_string
()
src/bin/markgen.rs:162
Function
gen_invalid_n_arg_zero
()
src/bin/markgen.rs:151
Function
gen_invalid_no_files
()
src/bin/markgen.rs:145
Function
gen_number_after
()
src/bin/markgen.rs:116
Function
generate
()
src/lib.rs:460
Function
generate_for_higher_order
()
src/lib.rs:468
Function
generate_from_token
()
src/lib.rs:482
Function
generate_from_unfound_token
()
src/lib.rs:490
Function
generate_str
()
src/lib.rs:518
Method
generate_str
Generates a random string of text.
src/lib.rs:325
Function
generate_str_from_token
()
src/lib.rs:525
Method
generate_str_from_token
Generates a random string of text starting with the desired token. This returns an empty string if the token is not found.
src/lib.rs:331
Function
generate_str_from_token_higher_order
()
src/lib.rs:532
Function
generate_str_from_unfound_token
()
src/lib.rs:540
Function
is_empty
()
src/lib.rs:446
Function
iter
()
src/lib.rs:498
Function
iter_for
()
src/lib.rs:505
Method
load
Loads a chain from the specified path.
src/lib.rs:279
Function
main
()
src/bin/markgen.rs:17
Function
main
()
examples/graph.rs:6
Function
merge
()
src/lib.rs:572
Method
new
Constructs a new Markov chain.
src/lib.rs:89
Method
of_order
Creates a new Markov chain of the specified order. The order is the number of previous tokens to use for each mapping in the chain. Higher orders mean
src/lib.rs:97
Function
save_then_load
()
src/lib.rs:562
Method
size_hint
(&self)
src/lib.rs:372
Function
str_iter
()
src/lib.rs:547
Method
str_iter
Produces an infinite iterator of generated strings.
src/lib.rs:336
Function
str_iter_for
()
src/lib.rs:554
Method
vec_to_string
Converts the output of `generate(...)` on a String chain to a single String.
src/lib.rs:311