From dd4f3eb84c3206bc0dcc78f482226e64e7c3332c Mon Sep 17 00:00:00 2001 From: Al Date: Mon, 6 Mar 2017 15:25:10 -0500 Subject: [PATCH] [parser] simpler feature names for the state-transition features --- src/address_parser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/address_parser.c b/src/address_parser.c index dfac380d..6e97ba7e 100644 --- a/src/address_parser.c +++ b/src/address_parser.c @@ -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