public virtual bool parse(Lattice lattice) { bool ret = MeCabPINVOKE.Tagger_parse__SWIG_1(swigCPtr, Lattice.getCPtr(lattice)); if (MeCabPINVOKE.SWIGPendingException.Pending) { throw MeCabPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static bool parse(Model model, Lattice lattice) { bool ret = MeCabPINVOKE.Tagger_parse__SWIG_0(Model.getCPtr(model), Lattice.getCPtr(lattice)); if (MeCabPINVOKE.SWIGPendingException.Pending) { throw MeCabPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual Lattice createLattice() { IntPtr cPtr = MeCabPINVOKE.Model_createLattice(swigCPtr); Lattice ret = (cPtr == IntPtr.Zero) ? null : new Lattice(cPtr, false); if (MeCabPINVOKE.SWIGPendingException.Pending) { throw MeCabPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual Node lookup(string begin, string end, Lattice lattice) { IntPtr cPtr = MeCabPINVOKE.Model_lookup(swigCPtr, begin, end, Lattice.getCPtr(lattice)); Node ret = (cPtr == IntPtr.Zero) ? null : new Node(cPtr, false); if (MeCabPINVOKE.SWIGPendingException.Pending) { throw MeCabPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
static void Main(String[] argv) { try { Console.WriteLine(MeCab.MeCab.VERSION); String arg = ""; for (int i = 0; i < argv.Length; ++i) { arg += " "; arg += argv[i]; } MeCab.Tagger t = new MeCab.Tagger(arg); String s = "太郎は花子が持っている本を次郎に渡した。"; Console.WriteLine(t.parse(s)); for (MeCab.Node n = t.parseToNode(s); n != null; n = n.next) { Console.WriteLine(n.surface + "\t" + n.feature); } MeCab.Model model = new MeCab.Model(arg); MeCab.Tagger t2 = model.createTagger(); Console.WriteLine(t2.parse(s)); MeCab.Lattice lattice = model.createLattice(); Console.WriteLine(s); lattice.set_sentence(s); if (t2.parse(lattice)) { Console.WriteLine(lattice.toString()); } lattice.add_request_type(MeCab.MeCab.MECAB_NBEST); lattice.set_sentence(s); t2.parse(lattice); for (int i = 0; i < 10; ++i) { lattice.next(); Console.WriteLine(lattice.toString()); } } catch (Exception e) { Console.WriteLine("Generic Exception Handler: {0}", e.ToString()); } }
public virtual bool parse(Lattice lattice) { bool ret = MeCabPINVOKE.Tagger_parse__SWIG_1(swigCPtr, Lattice.getCPtr(lattice)); if (MeCabPINVOKE.SWIGPendingException.Pending) throw MeCabPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public static bool parse(Model model, Lattice lattice) { bool ret = MeCabPINVOKE.Tagger_parse__SWIG_0(Model.getCPtr(model), Lattice.getCPtr(lattice)); if (MeCabPINVOKE.SWIGPendingException.Pending) throw MeCabPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public virtual Node lookup(string begin, string end, Lattice lattice) { IntPtr cPtr = MeCabPINVOKE.Model_lookup(swigCPtr, begin, end, Lattice.getCPtr(lattice)); Node ret = (cPtr == IntPtr.Zero) ? null : new Node(cPtr, false); if (MeCabPINVOKE.SWIGPendingException.Pending) throw MeCabPINVOKE.SWIGPendingException.Retrieve(); return ret; }
internal static HandleRef getCPtr(Lattice obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
internal static HandleRef getCPtr(Lattice obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }