Beispiel #1
0
void * segmentor_create_segmentor(const char * path, const char * lexicon_file) {
    SegmentorWrapper * wrapper = new SegmentorWrapper();

    if (!wrapper->load(path, lexicon_file)) {
        return 0;
    }

    return reinterpret_cast<void *>(wrapper);
}