Documentation ¶
Index ¶
Examples ¶
Constants ¶
View Source
const ( DEFAULT_SENTENCE_TRIES = 10 DEFAULT_MAX_OVERLAP_RATIO = 0.7 DEFAULT_MAX_OVERLAP_TOTAL = 15 DEFAULT_STATE_SIZE = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TextModel ¶
type TextModel struct { Tries int MaxOverlapTotal int MaxOverlapRatio float64 // contains filtered or unexported fields }
func NewTextModel ¶
func (*TextModel) MakeSentence ¶
Example ¶
package main import ( "fmt" "io/ioutil" "github.com/ragnar-johannsson/babble" ) func main() { b, _ := ioutil.ReadFile("./texts/pg5827.txt") t := babble.NewTextModel(string(b), babble.DEFAULT_STATE_SIZE) fmt.Println(t.MakeSentence()) }
Output:
func (*TextModel) MakeShortSentence ¶
Click to show internal directories.
Click to hide internal directories.