swedish.c
来自「使用具有增量学习的监控式学习方法。包括几个不同的分类算法。」· C语言 代码 · 共 68 行
C
68 行
/** * @file * Interface to Xapian swedish stemmer. * * @author Mikael Ylikoski * @date 2001-2002 */#include <stdio.h>#include <string.h>#include "stemmer.h"#include "stemmers/stem_swedish.h"static void *data; /**< Stemmer data *//** * Stemming function. */static char *swedish_stem_word (char *word) { return (char *)swedish_stem (data, word, strlen (word));}/** * Initialize stemmer. */static intswedish_stemmer_init (void) { data = setup_swedish_stemmer (); return 0;}/** * Free memory used by stemmer. */static voidswedish_stemmer_free (void) { closedown_swedish_stemmer (data);}/** * Keep cygwin happy. */intmain (void) { return 0;}/** * Stemmer language. */const char *my_stemmer_language = "sv";/** * Stemmer functions. */const stemmer_functions my_functions = { .stem_word = swedish_stem_word, .init = swedish_stemmer_init, .free = swedish_stemmer_free};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?