示例#1
0
 public KiwiBuilder(string modelPath, int numThreads = 0, Option options = Option.LoadDefaultDict | Option.IntegrateAllomorph)
 {
     inst = KiwiCAPI.kiwi_builder_init(new Utf8String(modelPath).IntPtr, numThreads, (int)options);
     if (inst == IntPtr.Zero)
     {
         throw new KiwiException(Marshal.PtrToStringAnsi(KiwiCAPI.kiwi_error()));
     }
 }
示例#2
0
 public static extern KiwiHandle kiwi_builder_build(KiwiBuilderHandle handle);
示例#3
0
 public static extern KiwiWsHandle kiwi_builder_extract_add_words_w(KiwiBuilderHandle handle, CReader reader, IntPtr userData, int minCnt, int maxWordLen, float minScore, float posThreshold);
示例#4
0
 public static extern int kiwi_builder_load_dict(KiwiBuilderHandle handle, CString dictPath);
示例#5
0
 public static extern int kiwi_builder_add_word(KiwiBuilderHandle handle, CString word, CString pos, float score);
示例#6
0
 public static extern int kiwi_builder_close(KiwiBuilderHandle handle);