[numex] Always adding a version of the string without Roman numeral expansion since many times those tokens can be ambiguous

This commit is contained in:
Al
2015-12-07 14:29:13 -05:00
parent f8a3081d0f
commit 9bab70909d

View File

@@ -297,20 +297,17 @@ string_tree_t *add_string_alternatives(char *str, normalize_options_t options) {
}
void add_postprocessed_string(cstring_array *strings, char *str, normalize_options_t options) {
bool add_string = true;
cstring_array_add_string(strings, str);
if (options.roman_numerals) {
char *numex_replaced = replace_numeric_expressions(str, LATIN_LANGUAGE_CODE);
if (numex_replaced != NULL) {
cstring_array_add_string(strings, numex_replaced);
free(numex_replaced);
add_string = false;
}
}
if (add_string) {
cstring_array_add_string(strings, str);
}
}