From 716ba95b5d83329b01c095ee3563dcb506a96c55 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Thu, 6 Jan 2022 18:48:46 +0530 Subject: [PATCH] Improvement on resolving token system conflict --- input_classifier.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/input_classifier.py b/input_classifier.py index 1948279..e93b36d 100644 --- a/input_classifier.py +++ b/input_classifier.py @@ -414,23 +414,23 @@ text_list = [ "Send 15 rupee# to swap-rupee-article@ its FLO address being FJXw6QGVVaZVvqpyF422Aj4FWQ6jm8p2dL$" ] -text_list1 = [ - "create 5 million rmt#" -] for text in text_list1: text = text_preprocessing(text) first_classification = firstclassification_rawstring(text) parsed_data = None if first_classification['categorization'] == 'tokensystem-C': - pdb.set_trace() + # Resolving conflict for 'tokensystem-C' tokenamount = apply_rule1(extractAmount_rule,text) operation = apply_rule1(selectCateogry, text, category1, category2) - if operation == 'category1': + if operation == 'category1' and tokenamount is not None: parsed_data = outputreturn('token_transfer',f"{text}", f"{first_classification['wordlist'][0][:-1]}", f"{tokenamount}") - elif operation == 'category2': + elif operation == 'category2' and tokenamount is not None: parsed_data = outputreturn('token_incorporation',f"{text}", f"{first_classification['wordlist'][0][:-1]}", f"{tokenamount}") else: parsed_data = outputreturn('noise') + else: + parsed_data = outputreturn('noise') + print(f"\n\n{text}") print(parsed_data) \ No newline at end of file