Example #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()));
     }
 }
Example #2
0
 public static extern KiwiHandle kiwi_builder_build(KiwiBuilderHandle handle);
Example #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);
Example #4
0
 public static extern int kiwi_builder_load_dict(KiwiBuilderHandle handle, CString dictPath);
Example #5
0
 public static extern int kiwi_builder_add_word(KiwiBuilderHandle handle, CString word, CString pos, float score);
Example #6
0
 public static extern int kiwi_builder_close(KiwiBuilderHandle handle);