Example #1
0
func doGetMaxCharSequence(t *testing.T, line string, char rune, count int,
	expvtest, expctest bool) {
	gotv, gotc := tekstus.GetMaxCharSequence(line)

	assert(t, char, gotv, expvtest)
	assert(t, count, gotc, expctest)
}
Example #2
0
/*
Compute maximum sequence of character at inserted text.
*/
func (ftr *LongestCharSeq) Compute(dataset tabula.DatasetInterface) {
	col := dataset.GetColumnByName("additions")

	for _, rec := range col.Records {
		text := rec.String()

		_, v := tekstus.GetMaxCharSequence(text)

		ftr.PushBack(tabula.NewRecordInt(int64(v)))
	}
}