[parser] simpler feature names for the state-transition features

This commit is contained in:
Al
2017-03-06 15:25:10 -05:00
parent 39fa8ff1a5
commit dd4f3eb84c

View File

@@ -1399,13 +1399,13 @@ bool address_parser_features(void *self, void *ctx, tokenized_string_t *tokenize
if (last_index == idx - 1) {
// Previous tag and current word
feature_array_add(prev_tag_features, 2, "prev tag+word", word);
feature_array_add(prev_tag_features, 1, "prev tag");
feature_array_add(prev_tag_features, 2, "word", word);
feature_array_add(prev_tag_features, 1, "trans");
// Previous two tags and current word
feature_array_add(prev2_tag_features, 2, "prev2 tag+prev tag+word", word);
feature_array_add(prev2_tag_features, 1, "prev2 tag+prev tag");
feature_array_add(prev2_tag_features, 2, "word", word);
feature_array_add(prev2_tag_features, 1, "trans");
}
if (last_index >= 0) {
@@ -1426,7 +1426,7 @@ bool address_parser_features(void *self, void *ctx, tokenized_string_t *tokenize
if (last_index == idx - 1) {
feature_array_add(prev_tag_features, 2, "prev tag+prev word", prev_word);
feature_array_add(prev_tag_features, 2, "prev word", prev_word);
}
// Previous word and current word