PostgreSQL Source Code git master
|
#include "postgres.h"
#include "catalog/pg_collation_d.h"
#include "commands/defrem.h"
#include "mb/pg_wchar.h"
#include "tsearch/ts_public.h"
#include "utils/formatting.h"
#include "snowball/libstemmer/header.h"
#include "snowball/libstemmer/stem_ISO_8859_1_basque.h"
#include "snowball/libstemmer/stem_ISO_8859_1_catalan.h"
#include "snowball/libstemmer/stem_ISO_8859_1_danish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_dutch.h"
#include "snowball/libstemmer/stem_ISO_8859_1_english.h"
#include "snowball/libstemmer/stem_ISO_8859_1_finnish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_french.h"
#include "snowball/libstemmer/stem_ISO_8859_1_german.h"
#include "snowball/libstemmer/stem_ISO_8859_1_indonesian.h"
#include "snowball/libstemmer/stem_ISO_8859_1_irish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_italian.h"
#include "snowball/libstemmer/stem_ISO_8859_1_norwegian.h"
#include "snowball/libstemmer/stem_ISO_8859_1_porter.h"
#include "snowball/libstemmer/stem_ISO_8859_1_portuguese.h"
#include "snowball/libstemmer/stem_ISO_8859_1_spanish.h"
#include "snowball/libstemmer/stem_ISO_8859_1_swedish.h"
#include "snowball/libstemmer/stem_ISO_8859_2_hungarian.h"
#include "snowball/libstemmer/stem_ISO_8859_2_romanian.h"
#include "snowball/libstemmer/stem_KOI8_R_russian.h"
#include "snowball/libstemmer/stem_UTF_8_arabic.h"
#include "snowball/libstemmer/stem_UTF_8_armenian.h"
#include "snowball/libstemmer/stem_UTF_8_basque.h"
#include "snowball/libstemmer/stem_UTF_8_catalan.h"
#include "snowball/libstemmer/stem_UTF_8_danish.h"
#include "snowball/libstemmer/stem_UTF_8_dutch.h"
#include "snowball/libstemmer/stem_UTF_8_english.h"
#include "snowball/libstemmer/stem_UTF_8_finnish.h"
#include "snowball/libstemmer/stem_UTF_8_french.h"
#include "snowball/libstemmer/stem_UTF_8_german.h"
#include "snowball/libstemmer/stem_UTF_8_greek.h"
#include "snowball/libstemmer/stem_UTF_8_hindi.h"
#include "snowball/libstemmer/stem_UTF_8_hungarian.h"
#include "snowball/libstemmer/stem_UTF_8_indonesian.h"
#include "snowball/libstemmer/stem_UTF_8_irish.h"
#include "snowball/libstemmer/stem_UTF_8_italian.h"
#include "snowball/libstemmer/stem_UTF_8_lithuanian.h"
#include "snowball/libstemmer/stem_UTF_8_nepali.h"
#include "snowball/libstemmer/stem_UTF_8_norwegian.h"
#include "snowball/libstemmer/stem_UTF_8_porter.h"
#include "snowball/libstemmer/stem_UTF_8_portuguese.h"
#include "snowball/libstemmer/stem_UTF_8_romanian.h"
#include "snowball/libstemmer/stem_UTF_8_russian.h"
#include "snowball/libstemmer/stem_UTF_8_serbian.h"
#include "snowball/libstemmer/stem_UTF_8_spanish.h"
#include "snowball/libstemmer/stem_UTF_8_swedish.h"
#include "snowball/libstemmer/stem_UTF_8_tamil.h"
#include "snowball/libstemmer/stem_UTF_8_turkish.h"
#include "snowball/libstemmer/stem_UTF_8_yiddish.h"
Go to the source code of this file.
Data Structures | |
struct | stemmer_module |
struct | DictSnowball |
Macros | |
#define | STEMMER_MODULE(name, enc, senc) {#name, enc, name##_##senc##_create_env, name##_##senc##_close_env, name##_##senc##_stem} |
Typedefs | |
typedef struct stemmer_module | stemmer_module |
typedef struct DictSnowball | DictSnowball |
Functions | |
PG_FUNCTION_INFO_V1 (dsnowball_init) | |
PG_FUNCTION_INFO_V1 (dsnowball_lexize) | |
static void | locate_stem_module (DictSnowball *d, const char *lang) |
Datum | dsnowball_init (PG_FUNCTION_ARGS) |
Datum | dsnowball_lexize (PG_FUNCTION_ARGS) |
Variables | |
PG_MODULE_MAGIC | |
static const stemmer_module | stemmer_modules [] |
#define STEMMER_MODULE | ( | name, | |
enc, | |||
senc | |||
) | {#name, enc, name##_##senc##_create_env, name##_##senc##_close_env, name##_##senc##_stem} |
Definition at line 97 of file dict_snowball.c.
typedef struct DictSnowball DictSnowball |
typedef struct stemmer_module stemmer_module |
Datum dsnowball_init | ( | PG_FUNCTION_ARGS | ) |
Definition at line 222 of file dict_snowball.c.
References CurrentMemoryContext, defGetString(), DefElem::defname, DictSnowball::dictCtx, ereport, errcode(), errmsg(), ERROR, SN_env::l, lfirst, locate_stem_module(), palloc0(), PG_GETARG_POINTER, PG_RETURN_POINTER, readstoplist(), DictSnowball::stem, DictSnowball::stoplist, and str_tolower().
Datum dsnowball_lexize | ( | PG_FUNCTION_ARGS | ) |
Definition at line 272 of file dict_snowball.c.
References DictSnowball::dictCtx, SN_env::l, len, MemoryContextSwitchTo(), DictSnowball::needrecode, SN_env::p, palloc0(), pfree(), pg_any_to_server(), PG_GETARG_INT32, PG_GETARG_POINTER, PG_RETURN_POINTER, pg_server_to_any(), PG_UTF8, repalloc(), res, searchstoplist(), SN_set_current(), DictSnowball::stem, DictSnowball::stoplist, str_tolower(), and DictSnowball::z.
|
static |
Definition at line 181 of file dict_snowball.c.
References stemmer_module::create, stemmer_module::enc, ereport, errcode(), errmsg(), ERROR, GetDatabaseEncoding(), GetDatabaseEncodingName(), stemmer_module::name, DictSnowball::needrecode, PG_SQL_ASCII, pg_strcasecmp(), PG_UTF8, stemmer_module::stem, DictSnowball::stem, stemmer_modules, and DictSnowball::z.
Referenced by dsnowball_init().
PG_FUNCTION_INFO_V1 | ( | dsnowball_init | ) |
PG_FUNCTION_INFO_V1 | ( | dsnowball_lexize | ) |
PG_MODULE_MAGIC |
Definition at line 80 of file dict_snowball.c.
|
static |
Definition at line 100 of file dict_snowball.c.
Referenced by locate_stem_module().