mirror of
https://github.com/postgres/postgres.git
synced 2026-01-26 09:41:40 +03:00
Update to latest Snowball sources.
It's been almost a year since we last did this, and upstream has been busy. They've added stemmers for Polish and Esperanto, and also deprecated their old Dutch stemmer in favor of the Kraaij-Pohlmann algorithm. (The "dutch" stemmer is now the latter, and "dutch_porter" is the old algorithm.) Upstream also decided to rename their internal header "header.h" to something less generic: "snowball_runtime.h". Seems like a good thing, but it complicates this patch a bit because we were relying on interposing our own version of "header.h" to control system header inclusion order. (We're partially failing at that now, because now the generated stemmer files include <stddef.h> before snowball_runtime.h. I think that'll be okay, but if the buildfarm complains then we'll have to do more-extensive editing of the generated files.) I realized that we weren't documenting the available stemmers in any user-visible place, except indirectly through sample \dFd output. That's incomplete because we only provide built-in dictionaries for the recommended stemmers for each language, not alternative stemmers such as dutch_porter. So I added a list to the documentation. I did not do anything with the stopword lists. If those are still available from snowballstem.org, they are mighty well hidden. Discussion: https://postgr.es/m/1185975.1767569534@sss.pgh.pa.us
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#ifndef SNOWBALL_API_H_INCLUDED
|
||||
#define SNOWBALL_API_H_INCLUDED
|
||||
|
||||
typedef unsigned char symbol;
|
||||
|
||||
@@ -5,28 +7,28 @@ typedef unsigned char symbol;
|
||||
|
||||
More precisely, replace 'char' with whatever type guarantees the
|
||||
character width you need. Note however that sizeof(symbol) should divide
|
||||
HEAD, defined in header.h as 2*sizeof(int), without remainder, otherwise
|
||||
there is an alignment problem. In the unlikely event of a problem here,
|
||||
consult Martin Porter.
|
||||
|
||||
HEAD, defined in snowball_runtime.h as 2*sizeof(int), without remainder,
|
||||
otherwise there is an alignment problem. In the unlikely event of a problem
|
||||
here, consult Martin Porter.
|
||||
*/
|
||||
|
||||
struct SN_env {
|
||||
symbol * p;
|
||||
int c; int l; int lb; int bra; int ket;
|
||||
symbol * * S;
|
||||
int * I;
|
||||
int af;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct SN_env * SN_create_env(int S_size, int I_size);
|
||||
extern void SN_close_env(struct SN_env * z, int S_size);
|
||||
extern struct SN_env * SN_new_env(int alloc_size);
|
||||
extern void SN_delete_env(struct SN_env * z);
|
||||
|
||||
extern int SN_set_current(struct SN_env * z, int size, const symbol * s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "api.h"
|
||||
|
||||
#define MAXINT INT_MAX
|
||||
#define MININT INT_MIN
|
||||
|
||||
#define HEAD 2*sizeof(int)
|
||||
|
||||
#define SIZE(p) ((int *)(p))[-1]
|
||||
#define SET_SIZE(p, n) ((int *)(p))[-1] = n
|
||||
#define CAPACITY(p) ((int *)(p))[-2]
|
||||
|
||||
struct among
|
||||
{ int s_size; /* number of chars in string */
|
||||
const symbol * s; /* search string */
|
||||
int substring_i;/* index to longest matching substring */
|
||||
int result; /* result of the lookup */
|
||||
int (* function)(struct SN_env *);
|
||||
};
|
||||
|
||||
extern symbol * create_s(void);
|
||||
extern void lose_s(symbol * p);
|
||||
|
||||
extern int skip_utf8(const symbol * p, int c, int limit, int n);
|
||||
|
||||
extern int skip_b_utf8(const symbol * p, int c, int limit, int n);
|
||||
|
||||
extern int in_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int in_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int out_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int out_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
|
||||
extern int in_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int in_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int out_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int out_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
|
||||
extern int eq_s(struct SN_env * z, int s_size, const symbol * s);
|
||||
extern int eq_s_b(struct SN_env * z, int s_size, const symbol * s);
|
||||
extern int eq_v(struct SN_env * z, const symbol * p);
|
||||
extern int eq_v_b(struct SN_env * z, const symbol * p);
|
||||
|
||||
extern int find_among(struct SN_env * z, const struct among * v, int v_size);
|
||||
extern int find_among_b(struct SN_env * z, const struct among * v, int v_size);
|
||||
|
||||
extern int replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s, int * adjustment);
|
||||
extern int slice_from_s(struct SN_env * z, int s_size, const symbol * s);
|
||||
extern int slice_from_v(struct SN_env * z, const symbol * p);
|
||||
extern int slice_del(struct SN_env * z);
|
||||
|
||||
extern int insert_s(struct SN_env * z, int bra, int ket, int s_size, const symbol * s);
|
||||
extern int insert_v(struct SN_env * z, int bra, int ket, const symbol * p);
|
||||
|
||||
extern symbol * slice_to(struct SN_env * z, symbol * p);
|
||||
extern symbol * assign_to(struct SN_env * z, symbol * p);
|
||||
|
||||
extern int len_utf8(const symbol * p);
|
||||
|
||||
extern void debug(struct SN_env * z, int number, int line_count);
|
||||
109
src/include/snowball/libstemmer/snowball_runtime.h
Normal file
109
src/include/snowball/libstemmer/snowball_runtime.h
Normal file
@@ -0,0 +1,109 @@
|
||||
#ifndef SNOWBALL_INCLUDED_SNOWBALL_RUNTIME_H
|
||||
#define SNOWBALL_INCLUDED_SNOWBALL_RUNTIME_H
|
||||
|
||||
#include "api.h"
|
||||
|
||||
#define HEAD 2*sizeof(int)
|
||||
|
||||
#ifdef __cplusplus
|
||||
/* Use reinterpret_cast<> to avoid -Wcast-align warnings from clang++. */
|
||||
# define SIZE(p) (reinterpret_cast<const int *>(p))[-1]
|
||||
# define SET_SIZE(p, n) (reinterpret_cast<int *>(p))[-1] = n
|
||||
# define CAPACITY(p) (reinterpret_cast<int *>(p))[-2]
|
||||
#else
|
||||
# define SIZE(p) ((const int *)(p))[-1]
|
||||
# define SET_SIZE(p, n) ((int *)(p))[-1] = n
|
||||
# define CAPACITY(p) ((int *)(p))[-2]
|
||||
#endif
|
||||
|
||||
#ifdef SNOWBALL_RUNTIME_THROW_EXCEPTIONS
|
||||
# define SNOWBALL_ERR void
|
||||
#else
|
||||
# define SNOWBALL_ERR int
|
||||
#endif
|
||||
|
||||
#ifdef SNOWBALL_DEBUG_COMMAND_USED
|
||||
# include <stdio.h>
|
||||
static void debug(struct SN_env * z, int number, int line_count) {
|
||||
int i;
|
||||
int limit = SIZE(z->p);
|
||||
if (number >= 0) printf("%3d (line %4d): [%d]'", number, line_count, limit);
|
||||
for (i = 0; i <= limit; i++) {
|
||||
if (z->lb == i) printf("{");
|
||||
if (z->bra == i) printf("[");
|
||||
if (z->c == i) printf("|");
|
||||
if (z->ket == i) printf("]");
|
||||
if (z->l == i) printf("}");
|
||||
if (i < limit) {
|
||||
int ch = z->p[i];
|
||||
if (ch == 0) ch = '#';
|
||||
printf("%c", ch);
|
||||
}
|
||||
}
|
||||
printf("'\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
struct among
|
||||
{
|
||||
/* Number of symbols in s. */
|
||||
int s_size;
|
||||
/* Search string. */
|
||||
const symbol * s;
|
||||
/* Delta of index to longest matching substring, or 0 if none. */
|
||||
int substring_i;
|
||||
/* Result of the lookup. */
|
||||
int result;
|
||||
/* Optional condition routine index, or 0 if none. */
|
||||
int function;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern symbol * create_s(void);
|
||||
extern void lose_s(symbol * p);
|
||||
|
||||
extern int skip_utf8(const symbol * p, int c, int limit, int n);
|
||||
|
||||
extern int skip_b_utf8(const symbol * p, int c, int limit, int n);
|
||||
|
||||
extern int in_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int in_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int out_grouping_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int out_grouping_b_U(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
|
||||
extern int in_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int in_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int out_grouping(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
extern int out_grouping_b(struct SN_env * z, const unsigned char * s, int min, int max, int repeat);
|
||||
|
||||
extern int eq_s(struct SN_env * z, int s_size, const symbol * s);
|
||||
extern int eq_s_b(struct SN_env * z, int s_size, const symbol * s);
|
||||
extern int eq_v(struct SN_env * z, const symbol * p);
|
||||
extern int eq_v_b(struct SN_env * z, const symbol * p);
|
||||
|
||||
extern int find_among(struct SN_env * z, const struct among * v, int v_size,
|
||||
int (*)(struct SN_env *));
|
||||
extern int find_among_b(struct SN_env * z, const struct among * v, int v_size,
|
||||
int (*)(struct SN_env *));
|
||||
|
||||
extern SNOWBALL_ERR replace_s(struct SN_env * z, int c_bra, int c_ket, int s_size, const symbol * s);
|
||||
extern SNOWBALL_ERR slice_from_s(struct SN_env * z, int s_size, const symbol * s);
|
||||
extern SNOWBALL_ERR slice_from_v(struct SN_env * z, const symbol * p);
|
||||
extern SNOWBALL_ERR slice_del(struct SN_env * z);
|
||||
|
||||
extern SNOWBALL_ERR insert_s(struct SN_env * z, int bra, int ket, int s_size, const symbol * s);
|
||||
extern SNOWBALL_ERR insert_v(struct SN_env * z, int bra, int ket, const symbol * p);
|
||||
|
||||
extern SNOWBALL_ERR slice_to(struct SN_env * z, symbol ** p);
|
||||
extern SNOWBALL_ERR assign_to(struct SN_env * z, symbol ** p);
|
||||
|
||||
extern int len_utf8(const symbol * p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from basque.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int basque_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from catalan.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int catalan_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from danish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int danish_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from dutch.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int dutch_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Generated from dutch_porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct SN_env * dutch_porter_ISO_8859_1_create_env(void);
|
||||
extern void dutch_porter_ISO_8859_1_close_env(struct SN_env * z);
|
||||
|
||||
extern int dutch_porter_ISO_8859_1_stem(struct SN_env * z);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from english.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int english_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from finnish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int finnish_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from french.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int french_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from german.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int german_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from indonesian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int indonesian_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from irish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int irish_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from italian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int italian_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from norwegian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int norwegian_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int porter_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from portuguese.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int portuguese_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from spanish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int spanish_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from swedish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int swedish_ISO_8859_1_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from hungarian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int hungarian_ISO_8859_2_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
14
src/include/snowball/libstemmer/stem_ISO_8859_2_polish.h
Normal file
14
src/include/snowball/libstemmer/stem_ISO_8859_2_polish.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/* Generated from polish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct SN_env * polish_ISO_8859_2_create_env(void);
|
||||
extern void polish_ISO_8859_2_close_env(struct SN_env * z);
|
||||
|
||||
extern int polish_ISO_8859_2_stem(struct SN_env * z);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from russian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int russian_KOI8_R_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from arabic.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int arabic_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from armenian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int armenian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from basque.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int basque_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from catalan.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int catalan_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from danish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int danish_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from dutch.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int dutch_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
14
src/include/snowball/libstemmer/stem_UTF_8_dutch_porter.h
Normal file
14
src/include/snowball/libstemmer/stem_UTF_8_dutch_porter.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/* Generated from dutch_porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct SN_env * dutch_porter_UTF_8_create_env(void);
|
||||
extern void dutch_porter_UTF_8_close_env(struct SN_env * z);
|
||||
|
||||
extern int dutch_porter_UTF_8_stem(struct SN_env * z);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from english.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int english_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
14
src/include/snowball/libstemmer/stem_UTF_8_esperanto.h
Normal file
14
src/include/snowball/libstemmer/stem_UTF_8_esperanto.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/* Generated from esperanto.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct SN_env * esperanto_UTF_8_create_env(void);
|
||||
extern void esperanto_UTF_8_close_env(struct SN_env * z);
|
||||
|
||||
extern int esperanto_UTF_8_stem(struct SN_env * z);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from estonian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int estonian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from finnish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int finnish_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from french.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int french_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from german.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int german_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from greek.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int greek_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from hindi.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int hindi_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from hungarian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int hungarian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from indonesian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int indonesian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from irish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int irish_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from italian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int italian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from lithuanian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int lithuanian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from nepali.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int nepali_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from norwegian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int norwegian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
14
src/include/snowball/libstemmer/stem_UTF_8_polish.h
Normal file
14
src/include/snowball/libstemmer/stem_UTF_8_polish.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/* Generated from polish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct SN_env * polish_UTF_8_create_env(void);
|
||||
extern void polish_UTF_8_close_env(struct SN_env * z);
|
||||
|
||||
extern int polish_UTF_8_stem(struct SN_env * z);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int porter_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from portuguese.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int portuguese_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from romanian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int romanian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from russian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int russian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from serbian.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int serbian_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from spanish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int spanish_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from swedish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int swedish_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from tamil.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int tamil_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from turkish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int turkish_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
||||
/* Generated from yiddish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -12,4 +12,3 @@ extern int yiddish_UTF_8_stem(struct SN_env * z);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* header.h
|
||||
* snowball_runtime.h
|
||||
* Replacement header file for Snowball stemmer modules
|
||||
*
|
||||
* The Snowball stemmer modules do #include "header.h", and think they
|
||||
* are including snowball/libstemmer/header.h. We adjust the CPPFLAGS
|
||||
* so that this file is found instead, and thereby we can modify the
|
||||
* headers they see. The main point here is to ensure that pg_config.h
|
||||
* The Snowball stemmer modules do #include "snowball_runtime.h", and think
|
||||
* they are including snowball/libstemmer/snowball_runtime.h. We adjust
|
||||
* the CPPFLAGS so that this file is found instead, and thereby we can modify
|
||||
* the headers they see. The main point here is to ensure that pg_config.h
|
||||
* is included before any system headers such as <stdio.h>; without that,
|
||||
* we have portability issues on some platforms due to variation in
|
||||
* largefile options across different modules in the backend.
|
||||
@@ -15,12 +15,12 @@
|
||||
*
|
||||
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
|
||||
*
|
||||
* src/include/snowball/header.h
|
||||
* src/include/snowball/snowball_runtime.h
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef SNOWBALL_HEADR_H
|
||||
#define SNOWBALL_HEADR_H
|
||||
#ifndef PG_SNOWBALL_RUNTIME_H
|
||||
#define PG_SNOWBALL_RUNTIME_H
|
||||
|
||||
/*
|
||||
* It's against Postgres coding conventions to include postgres.h in a
|
||||
@@ -37,8 +37,8 @@
|
||||
#undef MININT
|
||||
#endif
|
||||
|
||||
/* Now we can include the original Snowball header.h */
|
||||
#include "snowball/libstemmer/header.h"
|
||||
/* Now we can include the original Snowball snowball_runtime.h */
|
||||
#include "snowball/libstemmer/snowball_runtime.h"
|
||||
|
||||
/*
|
||||
* Redefine standard memory allocation interface to pgsql's one.
|
||||
@@ -64,4 +64,4 @@
|
||||
#endif
|
||||
#define free(a) pfree(a)
|
||||
|
||||
#endif /* SNOWBALL_HEADR_H */
|
||||
#endif /* PG_SNOWBALL_RUNTIME_H */
|
||||
Reference in New Issue
Block a user