Esempio n. 1
0
// CalculateWS calculates the word segmentation and finds the word boundaries.
func (k KyTea) CalculateWS(s Sentence) error {
	err := C.kytea_calculate_ws(k.kytea, s.sentence)
	if err != nil {
		defer C.kytea_std_string_destroy(err)
		return errors.New(C.GoString(C.kytea_std_string_cstring(err)))
	}
	return nil
}
Esempio n. 2
0
func (t *Tagger) CalculateWS(s *Sentence) {
	C.kytea_calculate_ws(t.rep, s.rep)
}