Exemplo n.º 1
0
func NewLattice() (Lattice, error) {
	lattice := C.mecab_lattice_new()

	if lattice == nil {
		return Lattice{}, errors.New("mecab_lattice is not created")
	}
	return Lattice{lattice: lattice}, nil
}
Exemplo n.º 2
0
// New is a function to return create new lattice object
func New() (*Lattice, error) {
	return newLattice(C.mecab_lattice_new())
}