Index
Modules:
nimkov
,
nimkov/constants
,
nimkov/generator
,
nimkov/typedefs
,
nimkov/utils
,
nimkov/validators
.
API symbols
add:
generator: proc add(generator: MarkovGenerator; samples: seq[string])
generator: proc add(generator: MarkovGenerator; sample: string)
clear:
generator: proc clear(generator: MarkovGenerator)
defaultValidator:
validators: proc defaultValidator(): MarkovValidator
generate:
generator: proc generate(generator: MarkovGenerator; attempts: Positive = 1; begin = none string; validator: MarkovValidator = defaultValidator()): string
MarkovEmptyModelError:
typedefs: object MarkovEmptyModelError
MarkovError:
typedefs: object MarkovError
MarkovGenerateOptions:
typedefs: object MarkovGenerateOptions
MarkovGenerator:
generator: type MarkovGenerator
MarkovGeneratorModelType:
typedefs: enum MarkovGeneratorModelType
MarkovNotEnoughSamplesError:
typedefs: object MarkovNotEnoughSamplesError
MarkovOutOfAttemptsError:
typedefs: object MarkovOutOfAttemptsError
MarkovProcessWordProc:
typedefs: type MarkovProcessWordProc
MarkovValidator:
typedefs: type MarkovValidator
mgtSimple:
typedefs: MarkovGeneratorModelType.mgtSimple
mgtWeighted:
typedefs: MarkovGeneratorModelType.mgtWeighted
model:
generator: proc model(generator: MarkovGenerator): Table[string, CountTable[string]]
mrkvEnd:
constants: const mrkvEnd
mrkvStart:
constants: const mrkvStart
newMarkov:
generator: proc newMarkov(samples = newSeq(); wordProc: MarkovProcessWordProc = (proc ( word: string): Option[string] = result = some unicodeStringToLower(word)); kind: MarkovGeneratorModelType = mgtSimple): MarkovGenerator
symbolsCount:
validators: proc symbolsCount(min = 0; max = int.high): MarkovValidator
unicodeStringToLower:
utils: proc unicodeStringToLower(str: string): string
weightedRandom:
utils: proc weightedRandom[T](weights: openArray[tuple[key: T, weight: int]]): T
wordsCount:
validators: proc wordsCount(min = 0; max = int.high): MarkovValidator