isomorfeus-ferret 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +612 -0
- data/README.md +44 -0
- data/ext/isomorfeus_ferret_ext/benchmark.c +223 -0
- data/ext/isomorfeus_ferret_ext/benchmark.h +45 -0
- data/ext/isomorfeus_ferret_ext/benchmarks_all.h +25 -0
- data/ext/isomorfeus_ferret_ext/bm_bitvector.c +123 -0
- data/ext/isomorfeus_ferret_ext/bm_hash.c +118 -0
- data/ext/isomorfeus_ferret_ext/bm_micro_string.c +40 -0
- data/ext/isomorfeus_ferret_ext/bm_store.c +93 -0
- data/ext/isomorfeus_ferret_ext/email.rl +21 -0
- data/ext/isomorfeus_ferret_ext/extconf.rb +5 -0
- data/ext/isomorfeus_ferret_ext/fio_tmpfile.h +53 -0
- data/ext/isomorfeus_ferret_ext/frb_analysis.c +2577 -0
- data/ext/isomorfeus_ferret_ext/frb_index.c +3457 -0
- data/ext/isomorfeus_ferret_ext/frb_lang.c +9 -0
- data/ext/isomorfeus_ferret_ext/frb_lang.h +17 -0
- data/ext/isomorfeus_ferret_ext/frb_qparser.c +629 -0
- data/ext/isomorfeus_ferret_ext/frb_search.c +4460 -0
- data/ext/isomorfeus_ferret_ext/frb_store.c +515 -0
- data/ext/isomorfeus_ferret_ext/frb_threading.h +30 -0
- data/ext/isomorfeus_ferret_ext/frb_utils.c +1127 -0
- data/ext/isomorfeus_ferret_ext/frt_analysis.c +1644 -0
- data/ext/isomorfeus_ferret_ext/frt_analysis.h +247 -0
- data/ext/isomorfeus_ferret_ext/frt_array.c +124 -0
- data/ext/isomorfeus_ferret_ext/frt_array.h +54 -0
- data/ext/isomorfeus_ferret_ext/frt_bitvector.c +95 -0
- data/ext/isomorfeus_ferret_ext/frt_bitvector.h +586 -0
- data/ext/isomorfeus_ferret_ext/frt_compound_io.c +374 -0
- data/ext/isomorfeus_ferret_ext/frt_config.h +44 -0
- data/ext/isomorfeus_ferret_ext/frt_document.c +134 -0
- data/ext/isomorfeus_ferret_ext/frt_document.h +52 -0
- data/ext/isomorfeus_ferret_ext/frt_except.c +95 -0
- data/ext/isomorfeus_ferret_ext/frt_except.h +188 -0
- data/ext/isomorfeus_ferret_ext/frt_field_index.c +233 -0
- data/ext/isomorfeus_ferret_ext/frt_field_index.h +42 -0
- data/ext/isomorfeus_ferret_ext/frt_filter.c +157 -0
- data/ext/isomorfeus_ferret_ext/frt_fs_store.c +502 -0
- data/ext/isomorfeus_ferret_ext/frt_global.c +427 -0
- data/ext/isomorfeus_ferret_ext/frt_global.h +290 -0
- data/ext/isomorfeus_ferret_ext/frt_hash.c +518 -0
- data/ext/isomorfeus_ferret_ext/frt_hash.h +466 -0
- data/ext/isomorfeus_ferret_ext/frt_hashset.c +191 -0
- data/ext/isomorfeus_ferret_ext/frt_hashset.h +206 -0
- data/ext/isomorfeus_ferret_ext/frt_helper.c +62 -0
- data/ext/isomorfeus_ferret_ext/frt_helper.h +13 -0
- data/ext/isomorfeus_ferret_ext/frt_ind.c +353 -0
- data/ext/isomorfeus_ferret_ext/frt_ind.h +54 -0
- data/ext/isomorfeus_ferret_ext/frt_index.c +6377 -0
- data/ext/isomorfeus_ferret_ext/frt_index.h +880 -0
- data/ext/isomorfeus_ferret_ext/frt_lang.c +104 -0
- data/ext/isomorfeus_ferret_ext/frt_lang.h +44 -0
- data/ext/isomorfeus_ferret_ext/frt_mempool.c +87 -0
- data/ext/isomorfeus_ferret_ext/frt_mempool.h +33 -0
- data/ext/isomorfeus_ferret_ext/frt_multimapper.c +349 -0
- data/ext/isomorfeus_ferret_ext/frt_multimapper.h +52 -0
- data/ext/isomorfeus_ferret_ext/frt_posh.c +1006 -0
- data/ext/isomorfeus_ferret_ext/frt_posh.h +973 -0
- data/ext/isomorfeus_ferret_ext/frt_priorityqueue.c +147 -0
- data/ext/isomorfeus_ferret_ext/frt_priorityqueue.h +147 -0
- data/ext/isomorfeus_ferret_ext/frt_q_boolean.c +1612 -0
- data/ext/isomorfeus_ferret_ext/frt_q_const_score.c +157 -0
- data/ext/isomorfeus_ferret_ext/frt_q_filtered_query.c +209 -0
- data/ext/isomorfeus_ferret_ext/frt_q_fuzzy.c +281 -0
- data/ext/isomorfeus_ferret_ext/frt_q_match_all.c +147 -0
- data/ext/isomorfeus_ferret_ext/frt_q_multi_term.c +672 -0
- data/ext/isomorfeus_ferret_ext/frt_q_parser.c +3084 -0
- data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +1182 -0
- data/ext/isomorfeus_ferret_ext/frt_q_prefix.c +98 -0
- data/ext/isomorfeus_ferret_ext/frt_q_range.c +665 -0
- data/ext/isomorfeus_ferret_ext/frt_q_span.c +2386 -0
- data/ext/isomorfeus_ferret_ext/frt_q_term.c +311 -0
- data/ext/isomorfeus_ferret_ext/frt_q_wildcard.c +166 -0
- data/ext/isomorfeus_ferret_ext/frt_ram_store.c +460 -0
- data/ext/isomorfeus_ferret_ext/frt_scanner.c +899 -0
- data/ext/isomorfeus_ferret_ext/frt_scanner.h +28 -0
- data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +6705 -0
- data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +4419 -0
- data/ext/isomorfeus_ferret_ext/frt_search.c +1824 -0
- data/ext/isomorfeus_ferret_ext/frt_search.h +924 -0
- data/ext/isomorfeus_ferret_ext/frt_similarity.c +150 -0
- data/ext/isomorfeus_ferret_ext/frt_similarity.h +79 -0
- data/ext/isomorfeus_ferret_ext/frt_sort.c +796 -0
- data/ext/isomorfeus_ferret_ext/frt_stopwords.c +395 -0
- data/ext/isomorfeus_ferret_ext/frt_store.c +680 -0
- data/ext/isomorfeus_ferret_ext/frt_store.h +789 -0
- data/ext/isomorfeus_ferret_ext/frt_term_vectors.c +72 -0
- data/ext/isomorfeus_ferret_ext/frt_threading.h +23 -0
- data/ext/isomorfeus_ferret_ext/frt_win32.h +54 -0
- data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.c +409 -0
- data/ext/isomorfeus_ferret_ext/isomorfeus_ferret.h +95 -0
- data/ext/isomorfeus_ferret_ext/libstemmer.c +93 -0
- data/ext/isomorfeus_ferret_ext/libstemmer.h +73 -0
- data/ext/isomorfeus_ferret_ext/q_parser.y +1366 -0
- data/ext/isomorfeus_ferret_ext/scanner.h +28 -0
- data/ext/isomorfeus_ferret_ext/scanner.in +43 -0
- data/ext/isomorfeus_ferret_ext/scanner.rl +84 -0
- data/ext/isomorfeus_ferret_ext/scanner_mb.rl +200 -0
- data/ext/isomorfeus_ferret_ext/scanner_utf8.rl +85 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +324 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +7 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +610 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +1104 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +749 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +7 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +1233 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +490 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +1217 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.h +7 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +1052 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +283 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +735 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +1003 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +7 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +1079 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +293 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +984 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +686 -0
- data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.c +325 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.c +620 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.c +1111 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.c +754 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.c +1242 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.c +495 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.c +1220 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.c +1059 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.c +285 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.c +741 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.c +1009 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.c +990 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.c +680 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.c +1083 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.c +294 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.c +2191 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_api.c +66 -0
- data/ext/isomorfeus_ferret_ext/stem_api.h +26 -0
- data/ext/isomorfeus_ferret_ext/stem_header.h +57 -0
- data/ext/isomorfeus_ferret_ext/stem_modules.h +190 -0
- data/ext/isomorfeus_ferret_ext/stem_modules.txt +50 -0
- data/ext/isomorfeus_ferret_ext/stem_utilities.c +478 -0
- data/ext/isomorfeus_ferret_ext/test.c +850 -0
- data/ext/isomorfeus_ferret_ext/test.h +416 -0
- data/ext/isomorfeus_ferret_ext/test_1710.c +63 -0
- data/ext/isomorfeus_ferret_ext/test_analysis.c +1221 -0
- data/ext/isomorfeus_ferret_ext/test_array.c +272 -0
- data/ext/isomorfeus_ferret_ext/test_bitvector.c +600 -0
- data/ext/isomorfeus_ferret_ext/test_compound_io.c +170 -0
- data/ext/isomorfeus_ferret_ext/test_document.c +156 -0
- data/ext/isomorfeus_ferret_ext/test_except.c +244 -0
- data/ext/isomorfeus_ferret_ext/test_fields.c +522 -0
- data/ext/isomorfeus_ferret_ext/test_file_deleter.c +185 -0
- data/ext/isomorfeus_ferret_ext/test_filter.c +331 -0
- data/ext/isomorfeus_ferret_ext/test_fs_store.c +25 -0
- data/ext/isomorfeus_ferret_ext/test_global.c +299 -0
- data/ext/isomorfeus_ferret_ext/test_hash.c +485 -0
- data/ext/isomorfeus_ferret_ext/test_hashset.c +288 -0
- data/ext/isomorfeus_ferret_ext/test_helper.c +47 -0
- data/ext/isomorfeus_ferret_ext/test_highlighter.c +548 -0
- data/ext/isomorfeus_ferret_ext/test_index.c +2323 -0
- data/ext/isomorfeus_ferret_ext/test_lang.c +74 -0
- data/ext/isomorfeus_ferret_ext/test_mempool.c +102 -0
- data/ext/isomorfeus_ferret_ext/test_multimapper.c +64 -0
- data/ext/isomorfeus_ferret_ext/test_priorityqueue.c +213 -0
- data/ext/isomorfeus_ferret_ext/test_q_const_score.c +84 -0
- data/ext/isomorfeus_ferret_ext/test_q_filtered.c +61 -0
- data/ext/isomorfeus_ferret_ext/test_q_fuzzy.c +241 -0
- data/ext/isomorfeus_ferret_ext/test_q_parser.c +464 -0
- data/ext/isomorfeus_ferret_ext/test_q_span.c +575 -0
- data/ext/isomorfeus_ferret_ext/test_ram_store.c +77 -0
- data/ext/isomorfeus_ferret_ext/test_search.c +1874 -0
- data/ext/isomorfeus_ferret_ext/test_segments.c +167 -0
- data/ext/isomorfeus_ferret_ext/test_similarity.c +25 -0
- data/ext/isomorfeus_ferret_ext/test_sort.c +333 -0
- data/ext/isomorfeus_ferret_ext/test_store.c +591 -0
- data/ext/isomorfeus_ferret_ext/test_store.h +3 -0
- data/ext/isomorfeus_ferret_ext/test_term.c +351 -0
- data/ext/isomorfeus_ferret_ext/test_term_vectors.c +373 -0
- data/ext/isomorfeus_ferret_ext/test_test.c +83 -0
- data/ext/isomorfeus_ferret_ext/test_threading.c +188 -0
- data/ext/isomorfeus_ferret_ext/testhelper.c +561 -0
- data/ext/isomorfeus_ferret_ext/testhelper.h +25 -0
- data/ext/isomorfeus_ferret_ext/tests_all.h +87 -0
- data/ext/isomorfeus_ferret_ext/uchar-ucs4.rl +1854 -0
- data/ext/isomorfeus_ferret_ext/uchar-utf8.rl +1999 -0
- data/ext/isomorfeus_ferret_ext/url.rl +27 -0
- data/ext/isomorfeus_ferret_ext/word_list.h +15156 -0
- data/lib/isomorfeus/ferret/document.rb +132 -0
- data/lib/isomorfeus/ferret/field_symbol.rb +85 -0
- data/lib/isomorfeus/ferret/index/field_infos.rb +48 -0
- data/lib/isomorfeus/ferret/index/index.rb +970 -0
- data/lib/isomorfeus/ferret/monitor.rb +323 -0
- data/lib/isomorfeus/ferret/stdlib_patches.rb +151 -0
- data/lib/isomorfeus/ferret/version.rb +5 -0
- data/lib/isomorfeus-ferret.rb +8 -0
- metadata +307 -0
@@ -0,0 +1,325 @@
|
|
1
|
+
/* This file was generated automatically by the Snowball to ANSI C compiler */
|
2
|
+
|
3
|
+
#include "stem_header.h"
|
4
|
+
|
5
|
+
extern int danish_UTF_8_stem(struct SN_env * z);
|
6
|
+
|
7
|
+
static int r_undouble(struct SN_env * z);
|
8
|
+
static int r_other_suffix(struct SN_env * z);
|
9
|
+
static int r_consonant_pair(struct SN_env * z);
|
10
|
+
static int r_main_suffix(struct SN_env * z);
|
11
|
+
static int r_mark_regions(struct SN_env * z);
|
12
|
+
|
13
|
+
extern struct SN_env * danish_UTF_8_create_env(void);
|
14
|
+
extern void danish_UTF_8_close_env(struct SN_env * z);
|
15
|
+
|
16
|
+
static const symbol s_0_0[3] = { 'h', 'e', 'd' };
|
17
|
+
static const symbol s_0_1[5] = { 'e', 't', 'h', 'e', 'd' };
|
18
|
+
static const symbol s_0_2[4] = { 'e', 'r', 'e', 'd' };
|
19
|
+
static const symbol s_0_3[1] = { 'e' };
|
20
|
+
static const symbol s_0_4[5] = { 'e', 'r', 'e', 'd', 'e' };
|
21
|
+
static const symbol s_0_5[4] = { 'e', 'n', 'd', 'e' };
|
22
|
+
static const symbol s_0_6[6] = { 'e', 'r', 'e', 'n', 'd', 'e' };
|
23
|
+
static const symbol s_0_7[3] = { 'e', 'n', 'e' };
|
24
|
+
static const symbol s_0_8[4] = { 'e', 'r', 'n', 'e' };
|
25
|
+
static const symbol s_0_9[3] = { 'e', 'r', 'e' };
|
26
|
+
static const symbol s_0_10[2] = { 'e', 'n' };
|
27
|
+
static const symbol s_0_11[5] = { 'h', 'e', 'd', 'e', 'n' };
|
28
|
+
static const symbol s_0_12[4] = { 'e', 'r', 'e', 'n' };
|
29
|
+
static const symbol s_0_13[2] = { 'e', 'r' };
|
30
|
+
static const symbol s_0_14[5] = { 'h', 'e', 'd', 'e', 'r' };
|
31
|
+
static const symbol s_0_15[4] = { 'e', 'r', 'e', 'r' };
|
32
|
+
static const symbol s_0_16[1] = { 's' };
|
33
|
+
static const symbol s_0_17[4] = { 'h', 'e', 'd', 's' };
|
34
|
+
static const symbol s_0_18[2] = { 'e', 's' };
|
35
|
+
static const symbol s_0_19[5] = { 'e', 'n', 'd', 'e', 's' };
|
36
|
+
static const symbol s_0_20[7] = { 'e', 'r', 'e', 'n', 'd', 'e', 's' };
|
37
|
+
static const symbol s_0_21[4] = { 'e', 'n', 'e', 's' };
|
38
|
+
static const symbol s_0_22[5] = { 'e', 'r', 'n', 'e', 's' };
|
39
|
+
static const symbol s_0_23[4] = { 'e', 'r', 'e', 's' };
|
40
|
+
static const symbol s_0_24[3] = { 'e', 'n', 's' };
|
41
|
+
static const symbol s_0_25[6] = { 'h', 'e', 'd', 'e', 'n', 's' };
|
42
|
+
static const symbol s_0_26[5] = { 'e', 'r', 'e', 'n', 's' };
|
43
|
+
static const symbol s_0_27[3] = { 'e', 'r', 's' };
|
44
|
+
static const symbol s_0_28[3] = { 'e', 't', 's' };
|
45
|
+
static const symbol s_0_29[5] = { 'e', 'r', 'e', 't', 's' };
|
46
|
+
static const symbol s_0_30[2] = { 'e', 't' };
|
47
|
+
static const symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
|
48
|
+
|
49
|
+
static const struct among a_0[32] =
|
50
|
+
{
|
51
|
+
/* 0 */ { 3, s_0_0, -1, 1, 0},
|
52
|
+
/* 1 */ { 5, s_0_1, 0, 1, 0},
|
53
|
+
/* 2 */ { 4, s_0_2, -1, 1, 0},
|
54
|
+
/* 3 */ { 1, s_0_3, -1, 1, 0},
|
55
|
+
/* 4 */ { 5, s_0_4, 3, 1, 0},
|
56
|
+
/* 5 */ { 4, s_0_5, 3, 1, 0},
|
57
|
+
/* 6 */ { 6, s_0_6, 5, 1, 0},
|
58
|
+
/* 7 */ { 3, s_0_7, 3, 1, 0},
|
59
|
+
/* 8 */ { 4, s_0_8, 3, 1, 0},
|
60
|
+
/* 9 */ { 3, s_0_9, 3, 1, 0},
|
61
|
+
/* 10 */ { 2, s_0_10, -1, 1, 0},
|
62
|
+
/* 11 */ { 5, s_0_11, 10, 1, 0},
|
63
|
+
/* 12 */ { 4, s_0_12, 10, 1, 0},
|
64
|
+
/* 13 */ { 2, s_0_13, -1, 1, 0},
|
65
|
+
/* 14 */ { 5, s_0_14, 13, 1, 0},
|
66
|
+
/* 15 */ { 4, s_0_15, 13, 1, 0},
|
67
|
+
/* 16 */ { 1, s_0_16, -1, 2, 0},
|
68
|
+
/* 17 */ { 4, s_0_17, 16, 1, 0},
|
69
|
+
/* 18 */ { 2, s_0_18, 16, 1, 0},
|
70
|
+
/* 19 */ { 5, s_0_19, 18, 1, 0},
|
71
|
+
/* 20 */ { 7, s_0_20, 19, 1, 0},
|
72
|
+
/* 21 */ { 4, s_0_21, 18, 1, 0},
|
73
|
+
/* 22 */ { 5, s_0_22, 18, 1, 0},
|
74
|
+
/* 23 */ { 4, s_0_23, 18, 1, 0},
|
75
|
+
/* 24 */ { 3, s_0_24, 16, 1, 0},
|
76
|
+
/* 25 */ { 6, s_0_25, 24, 1, 0},
|
77
|
+
/* 26 */ { 5, s_0_26, 24, 1, 0},
|
78
|
+
/* 27 */ { 3, s_0_27, 16, 1, 0},
|
79
|
+
/* 28 */ { 3, s_0_28, 16, 1, 0},
|
80
|
+
/* 29 */ { 5, s_0_29, 28, 1, 0},
|
81
|
+
/* 30 */ { 2, s_0_30, -1, 1, 0},
|
82
|
+
/* 31 */ { 4, s_0_31, 30, 1, 0}
|
83
|
+
};
|
84
|
+
|
85
|
+
static const symbol s_1_0[2] = { 'g', 'd' };
|
86
|
+
static const symbol s_1_1[2] = { 'd', 't' };
|
87
|
+
static const symbol s_1_2[2] = { 'g', 't' };
|
88
|
+
static const symbol s_1_3[2] = { 'k', 't' };
|
89
|
+
|
90
|
+
static const struct among a_1[4] =
|
91
|
+
{
|
92
|
+
/* 0 */ { 2, s_1_0, -1, -1, 0},
|
93
|
+
/* 1 */ { 2, s_1_1, -1, -1, 0},
|
94
|
+
/* 2 */ { 2, s_1_2, -1, -1, 0},
|
95
|
+
/* 3 */ { 2, s_1_3, -1, -1, 0}
|
96
|
+
};
|
97
|
+
|
98
|
+
static const symbol s_2_0[2] = { 'i', 'g' };
|
99
|
+
static const symbol s_2_1[3] = { 'l', 'i', 'g' };
|
100
|
+
static const symbol s_2_2[4] = { 'e', 'l', 'i', 'g' };
|
101
|
+
static const symbol s_2_3[3] = { 'e', 'l', 's' };
|
102
|
+
static const symbol s_2_4[5] = { 'l', 0xC3, 0xB8, 's', 't' };
|
103
|
+
|
104
|
+
static const struct among a_2[5] =
|
105
|
+
{
|
106
|
+
/* 0 */ { 2, s_2_0, -1, 1, 0},
|
107
|
+
/* 1 */ { 3, s_2_1, 0, 1, 0},
|
108
|
+
/* 2 */ { 4, s_2_2, 1, 1, 0},
|
109
|
+
/* 3 */ { 3, s_2_3, -1, 1, 0},
|
110
|
+
/* 4 */ { 5, s_2_4, -1, 2, 0}
|
111
|
+
};
|
112
|
+
|
113
|
+
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 };
|
114
|
+
|
115
|
+
static const unsigned char g_s_ending[] = { 239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 };
|
116
|
+
|
117
|
+
static const symbol s_0[] = { 's', 't' };
|
118
|
+
static const symbol s_1[] = { 'i', 'g' };
|
119
|
+
static const symbol s_2[] = { 'l', 0xC3, 0xB8, 's' };
|
120
|
+
|
121
|
+
static int r_mark_regions(struct SN_env * z) {
|
122
|
+
z->I[0] = z->l;
|
123
|
+
{ int c_test = z->c; /* test, line 33 */
|
124
|
+
{ int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
|
125
|
+
if (ret < 0) return 0;
|
126
|
+
z->c = ret; /* hop, line 33 */
|
127
|
+
}
|
128
|
+
z->I[1] = z->c; /* setmark x, line 33 */
|
129
|
+
z->c = c_test;
|
130
|
+
}
|
131
|
+
if (out_grouping_U(z, g_v, 97, 248, 1) < 0) return 0; /* goto */ /* grouping v, line 34 */
|
132
|
+
{ /* gopast */ /* non v, line 34 */
|
133
|
+
int ret = in_grouping_U(z, g_v, 97, 248, 1);
|
134
|
+
if (ret < 0) return 0;
|
135
|
+
z->c += ret;
|
136
|
+
}
|
137
|
+
z->I[0] = z->c; /* setmark p1, line 34 */
|
138
|
+
/* try, line 35 */
|
139
|
+
if (!(z->I[0] < z->I[1])) goto lab0;
|
140
|
+
z->I[0] = z->I[1];
|
141
|
+
lab0:
|
142
|
+
return 1;
|
143
|
+
}
|
144
|
+
|
145
|
+
static int r_main_suffix(struct SN_env * z) {
|
146
|
+
int among_var;
|
147
|
+
{ int mlimit; /* setlimit, line 41 */
|
148
|
+
int m1 = z->l - z->c; (void)m1;
|
149
|
+
if (z->c < z->I[0]) return 0;
|
150
|
+
z->c = z->I[0]; /* tomark, line 41 */
|
151
|
+
mlimit = z->lb; z->lb = z->c;
|
152
|
+
z->c = z->l - m1;
|
153
|
+
z->ket = z->c; /* [, line 41 */
|
154
|
+
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851440 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
|
155
|
+
among_var = find_among_b(z, a_0, 32); /* substring, line 41 */
|
156
|
+
if (!(among_var)) { z->lb = mlimit; return 0; }
|
157
|
+
z->bra = z->c; /* ], line 41 */
|
158
|
+
z->lb = mlimit;
|
159
|
+
}
|
160
|
+
switch(among_var) {
|
161
|
+
case 0: return 0;
|
162
|
+
case 1:
|
163
|
+
{ int ret = slice_del(z); /* delete, line 48 */
|
164
|
+
if (ret < 0) return ret;
|
165
|
+
}
|
166
|
+
break;
|
167
|
+
case 2:
|
168
|
+
if (in_grouping_b_U(z, g_s_ending, 97, 229, 0)) return 0;
|
169
|
+
{ int ret = slice_del(z); /* delete, line 50 */
|
170
|
+
if (ret < 0) return ret;
|
171
|
+
}
|
172
|
+
break;
|
173
|
+
}
|
174
|
+
return 1;
|
175
|
+
}
|
176
|
+
|
177
|
+
static int r_consonant_pair(struct SN_env * z) {
|
178
|
+
{ int m_test = z->l - z->c; /* test, line 55 */
|
179
|
+
{ int mlimit; /* setlimit, line 56 */
|
180
|
+
int m1 = z->l - z->c; (void)m1;
|
181
|
+
if (z->c < z->I[0]) return 0;
|
182
|
+
z->c = z->I[0]; /* tomark, line 56 */
|
183
|
+
mlimit = z->lb; z->lb = z->c;
|
184
|
+
z->c = z->l - m1;
|
185
|
+
z->ket = z->c; /* [, line 56 */
|
186
|
+
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 116)) { z->lb = mlimit; return 0; }
|
187
|
+
if (!(find_among_b(z, a_1, 4))) { z->lb = mlimit; return 0; } /* substring, line 56 */
|
188
|
+
z->bra = z->c; /* ], line 56 */
|
189
|
+
z->lb = mlimit;
|
190
|
+
}
|
191
|
+
z->c = z->l - m_test;
|
192
|
+
}
|
193
|
+
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
|
194
|
+
if (ret < 0) return 0;
|
195
|
+
z->c = ret; /* next, line 62 */
|
196
|
+
}
|
197
|
+
z->bra = z->c; /* ], line 62 */
|
198
|
+
{ int ret = slice_del(z); /* delete, line 62 */
|
199
|
+
if (ret < 0) return ret;
|
200
|
+
}
|
201
|
+
return 1;
|
202
|
+
}
|
203
|
+
|
204
|
+
static int r_other_suffix(struct SN_env * z) {
|
205
|
+
int among_var;
|
206
|
+
{ int m1 = z->l - z->c; (void)m1; /* do, line 66 */
|
207
|
+
z->ket = z->c; /* [, line 66 */
|
208
|
+
if (!(eq_s_b(z, 2, s_0))) goto lab0;
|
209
|
+
z->bra = z->c; /* ], line 66 */
|
210
|
+
if (!(eq_s_b(z, 2, s_1))) goto lab0;
|
211
|
+
{ int ret = slice_del(z); /* delete, line 66 */
|
212
|
+
if (ret < 0) return ret;
|
213
|
+
}
|
214
|
+
lab0:
|
215
|
+
z->c = z->l - m1;
|
216
|
+
}
|
217
|
+
{ int mlimit; /* setlimit, line 67 */
|
218
|
+
int m2 = z->l - z->c; (void)m2;
|
219
|
+
if (z->c < z->I[0]) return 0;
|
220
|
+
z->c = z->I[0]; /* tomark, line 67 */
|
221
|
+
mlimit = z->lb; z->lb = z->c;
|
222
|
+
z->c = z->l - m2;
|
223
|
+
z->ket = z->c; /* [, line 67 */
|
224
|
+
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
|
225
|
+
among_var = find_among_b(z, a_2, 5); /* substring, line 67 */
|
226
|
+
if (!(among_var)) { z->lb = mlimit; return 0; }
|
227
|
+
z->bra = z->c; /* ], line 67 */
|
228
|
+
z->lb = mlimit;
|
229
|
+
}
|
230
|
+
switch(among_var) {
|
231
|
+
case 0: return 0;
|
232
|
+
case 1:
|
233
|
+
{ int ret = slice_del(z); /* delete, line 70 */
|
234
|
+
if (ret < 0) return ret;
|
235
|
+
}
|
236
|
+
{ int m3 = z->l - z->c; (void)m3; /* do, line 70 */
|
237
|
+
{ int ret = r_consonant_pair(z);
|
238
|
+
if (ret == 0) goto lab1; /* call consonant_pair, line 70 */
|
239
|
+
if (ret < 0) return ret;
|
240
|
+
}
|
241
|
+
lab1:
|
242
|
+
z->c = z->l - m3;
|
243
|
+
}
|
244
|
+
break;
|
245
|
+
case 2:
|
246
|
+
{ int ret = slice_from_s(z, 4, s_2); /* <-, line 72 */
|
247
|
+
if (ret < 0) return ret;
|
248
|
+
}
|
249
|
+
break;
|
250
|
+
}
|
251
|
+
return 1;
|
252
|
+
}
|
253
|
+
|
254
|
+
static int r_undouble(struct SN_env * z) {
|
255
|
+
{ int mlimit; /* setlimit, line 76 */
|
256
|
+
int m1 = z->l - z->c; (void)m1;
|
257
|
+
if (z->c < z->I[0]) return 0;
|
258
|
+
z->c = z->I[0]; /* tomark, line 76 */
|
259
|
+
mlimit = z->lb; z->lb = z->c;
|
260
|
+
z->c = z->l - m1;
|
261
|
+
z->ket = z->c; /* [, line 76 */
|
262
|
+
if (out_grouping_b_U(z, g_v, 97, 248, 0)) { z->lb = mlimit; return 0; }
|
263
|
+
z->bra = z->c; /* ], line 76 */
|
264
|
+
z->S[0] = slice_to(z, z->S[0]); /* -> ch, line 76 */
|
265
|
+
if (z->S[0] == 0) return -1; /* -> ch, line 76 */
|
266
|
+
z->lb = mlimit;
|
267
|
+
}
|
268
|
+
if (!(eq_v_b(z, z->S[0]))) return 0; /* name ch, line 77 */
|
269
|
+
{ int ret = slice_del(z); /* delete, line 78 */
|
270
|
+
if (ret < 0) return ret;
|
271
|
+
}
|
272
|
+
return 1;
|
273
|
+
}
|
274
|
+
|
275
|
+
extern int danish_UTF_8_stem(struct SN_env * z) {
|
276
|
+
{ int c1 = z->c; /* do, line 84 */
|
277
|
+
{ int ret = r_mark_regions(z);
|
278
|
+
if (ret == 0) goto lab0; /* call mark_regions, line 84 */
|
279
|
+
if (ret < 0) return ret;
|
280
|
+
}
|
281
|
+
lab0:
|
282
|
+
z->c = c1;
|
283
|
+
}
|
284
|
+
z->lb = z->c; z->c = z->l; /* backwards, line 85 */
|
285
|
+
|
286
|
+
{ int m2 = z->l - z->c; (void)m2; /* do, line 86 */
|
287
|
+
{ int ret = r_main_suffix(z);
|
288
|
+
if (ret == 0) goto lab1; /* call main_suffix, line 86 */
|
289
|
+
if (ret < 0) return ret;
|
290
|
+
}
|
291
|
+
lab1:
|
292
|
+
z->c = z->l - m2;
|
293
|
+
}
|
294
|
+
{ int m3 = z->l - z->c; (void)m3; /* do, line 87 */
|
295
|
+
{ int ret = r_consonant_pair(z);
|
296
|
+
if (ret == 0) goto lab2; /* call consonant_pair, line 87 */
|
297
|
+
if (ret < 0) return ret;
|
298
|
+
}
|
299
|
+
lab2:
|
300
|
+
z->c = z->l - m3;
|
301
|
+
}
|
302
|
+
{ int m4 = z->l - z->c; (void)m4; /* do, line 88 */
|
303
|
+
{ int ret = r_other_suffix(z);
|
304
|
+
if (ret == 0) goto lab3; /* call other_suffix, line 88 */
|
305
|
+
if (ret < 0) return ret;
|
306
|
+
}
|
307
|
+
lab3:
|
308
|
+
z->c = z->l - m4;
|
309
|
+
}
|
310
|
+
{ int m5 = z->l - z->c; (void)m5; /* do, line 89 */
|
311
|
+
{ int ret = r_undouble(z);
|
312
|
+
if (ret == 0) goto lab4; /* call undouble, line 89 */
|
313
|
+
if (ret < 0) return ret;
|
314
|
+
}
|
315
|
+
lab4:
|
316
|
+
z->c = z->l - m5;
|
317
|
+
}
|
318
|
+
z->c = z->lb;
|
319
|
+
return 1;
|
320
|
+
}
|
321
|
+
|
322
|
+
extern struct SN_env * danish_UTF_8_create_env(void) { return SN_create_env(1, 2, 0); }
|
323
|
+
|
324
|
+
extern void danish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 1); }
|
325
|
+
|