func (l Lattice) SetSentence(s string) { length := C.size_t(len(s)) if s == "" { s = "dummy" } input := *(**C.char)(unsafe.Pointer(&s)) C.mecab_lattice_add_request_type(l.lattice, 64) // MECAB_ALLOCATE_SENTENCE = 64 C.mecab_lattice_set_sentence2(l.lattice, input, length) }
// AddRequestType is a method to add a request type func (l *Lattice) AddRequestType(requestType int) { C.mecab_lattice_add_request_type(l.toMecabLatticeT(), C.int(requestType)) }