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())); } }
public static extern KiwiHandle kiwi_builder_build(KiwiBuilderHandle handle);
public static extern KiwiWsHandle kiwi_builder_extract_add_words_w(KiwiBuilderHandle handle, CReader reader, IntPtr userData, int minCnt, int maxWordLen, float minScore, float posThreshold);
public static extern int kiwi_builder_load_dict(KiwiBuilderHandle handle, CString dictPath);
public static extern int kiwi_builder_add_word(KiwiBuilderHandle handle, CString word, CString pos, float score);
public static extern int kiwi_builder_close(KiwiBuilderHandle handle);