From 958e1f04034ea9aed7c54b85f3ad67dc4dd45482 Mon Sep 17 00:00:00 2001 From: Rizki Syarif Date: Sat, 25 Feb 2023 12:34:33 -0800 Subject: [PATCH] fix so that `reserved_words` gets filled instead of creating new `reserved` attribute --- preprocessor/parse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/preprocessor/parse.py b/preprocessor/parse.py index 20e93cd..140cb0c 100644 --- a/preprocessor/parse.py +++ b/preprocessor/parse.py @@ -44,7 +44,8 @@ def parse(self, tweet_string): for a_parser_method in parser_methods: method_to_call = getattr(self, a_parser_method) - attr = a_parser_method.split('_')[1] + attr = a_parser_method.replace(Defines.PARSE_METHODS_PREFIX,'') + items = method_to_call(tweet_string) setattr(parse_result_obj, attr, items)