projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make a few functions static (private)
[yaz-moved-to-github.git]
/
src
/
stemmer.c
diff --git
a/src/stemmer.c
b/src/stemmer.c
index
7ee2633
..
256ae60
100644
(file)
--- a/
src/stemmer.c
+++ b/
src/stemmer.c
@@
-1,13
+1,19
@@
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2013 Index Data
+ * See the file LICENSE for details.
+ */
+/**
+ * \file stemmer.c
+ * \brief Implements stemmer wrapper
+ */
#if HAVE_CONFIG_H
#if HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#if YAZ_HAVE_ICU
#endif
#if YAZ_HAVE_ICU
-#include <yaz/yconfig.h>
-
#include <yaz/stemmer.h>
#include <yaz/xmalloc.h>
#include <yaz/stemmer.h>
#include <yaz/xmalloc.h>
@@
-45,18
+51,18
@@
yaz_stemmer_p yaz_stemmer_snowball_create(const char *locale, const char *rule,
yaz_stemmer_p yaz_stemmer;
if (stemmer == 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
yaz_stemmer_p yaz_stemmer;
if (stemmer == 0) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
- yaz_log(YLOG_FATAL, "yaz_stemmer: Failed to create snowball stemmer from locale %srule %s. Showball: charenc %s algorithm %s ",
+ yaz_log(YLOG_FATAL, "yaz_stemmer: Failed to create snowball stemmer from locale %srule %s. Showball: charenc %s algorithm %s ",
locale, rule, charenc, algorithm);
return 0;
}
locale, rule, charenc, algorithm);
return 0;
}
- yaz_log(YLOG_DEBUG, "created snowball stemmer: algoritm %s charenc %s ", algorithm, charenc);
+ yaz_log(YLOG_DEBUG, "created snowball stemmer: algorithm %s charenc %s ", algorithm, charenc);
yaz_stemmer = xmalloc(sizeof(*yaz_stemmer));
yaz_stemmer->implementation = yaz_snowball;
yaz_stemmer = xmalloc(sizeof(*yaz_stemmer));
yaz_stemmer->implementation = yaz_snowball;
-
+
yaz_stemmer->locale = xstrdup(locale);
yaz_stemmer->rule = xstrdup(rule);
yaz_stemmer->sb_stemmer = stemmer;
yaz_stemmer->locale = xstrdup(locale);
yaz_stemmer->rule = xstrdup(rule);
yaz_stemmer->sb_stemmer = stemmer;
- yaz_log(YLOG_DEBUG, "created snowball stemmer: algoritm %s charenc %s ", algorithm, charenc);
+ yaz_log(YLOG_DEBUG, "created snowball stemmer: algorithm %s charenc %s ", algorithm, charenc);
return yaz_stemmer;
}
return yaz_stemmer;
}
@@
-90,7
+96,7
@@
void yaz_stemmer_stem(yaz_stemmer_p stemmer, struct icu_buf_utf16 *dst, struct i
const char *cstr2 = (const char *) sb_symbol;
icu_utf16_from_utf8_cstr(dst, cstr2 , status);
const char *cstr2 = (const char *) sb_symbol;
icu_utf16_from_utf8_cstr(dst, cstr2 , status);
-#if 0
+#if 0
yaz_log(YLOG_DEBUG, "stemming %s to %s ", cstr, cstr2);
#endif
}
yaz_log(YLOG_DEBUG, "stemming %s to %s ", cstr, cstr2);
#endif
}
@@
-108,7
+114,7
@@
void yaz_stemmer_stem(yaz_stemmer_p stemmer, struct icu_buf_utf16 *dst, struct i
}
}
}
}
-void yaz_stemmer_destroy(yaz_stemmer_p stemmer)
+void yaz_stemmer_destroy(yaz_stemmer_p stemmer)
{
/* Handle no stemmer correctly */
if (stemmer == 0)
{
/* Handle no stemmer correctly */
if (stemmer == 0)