diff --git a/scripts/geodata/i18n/numex.py b/scripts/geodata/i18n/numex.py index c2177c66..c35e6449 100644 --- a/scripts/geodata/i18n/numex.py +++ b/scripts/geodata/i18n/numex.py @@ -54,7 +54,7 @@ rule_type_map = { 'ordinal': ORDINAL } -numex_rule_template = u'{{"{key}", {rule_type}, {gender}, {left_context_type}, {right_context_type}, {value}LL, {radix}}}' +numex_rule_template = u'{{"{key}", (numex_rule_t){{{left_context_type}, {right_context_type}, {rule_type}, {gender}, {radix}, {value}LL}}}}' ordinal_indicator_template = u'{{{number}, {gender}, "{value}"}}' @@ -67,7 +67,7 @@ numex_rule_source_t numex_rules[] = {{ {numex_rules} }}; -ordinal_indicator_rule_t ordinal_indicator_rules[] = {{ +ordinal_indicator_t ordinal_indicator_rules[] = {{ {ordinal_indicator_rules} }}; diff --git a/src/numex.h b/src/numex.h index d789b2c0..ca8b4564 100644 --- a/src/numex.h +++ b/src/numex.h @@ -11,9 +11,10 @@ extern "C" { #include #include +#include "collections.h" +#include "constants.h" #include "string_utils.h" #include "tokens.h" -#include "collections.h" #define DEFAULT_NUMEX_PATH LIBPOSTAL_DATA_DIR "/numex/numex.dat" diff --git a/src/transliterate.h b/src/transliterate.h index 5532c096..2067eff2 100644 --- a/src/transliterate.h +++ b/src/transliterate.h @@ -5,6 +5,7 @@ #include #include "collections.h" +#include "constants.h" #include "klib/khash.h" #include "string_utils.h" #include "trie.h" @@ -76,9 +77,6 @@ typedef struct transliteration_table { cstring_array *revisit_strings; } transliteration_table_t; -#define NAMESPACE_SEPARATOR_CHAR "|" -#define NAMESPACE_SEPARATOR_CHAR_LEN strlen(NAMESPACE_SEPARATOR_CHAR) - // Control characters are special #define WORD_BOUNDARY_CHAR "\x01" #define WORD_BOUNDARY_CODEPOINT 1