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 }
// New is a function to return create new lattice object func New() (*Lattice, error) { return newLattice(C.mecab_lattice_new()) }