Mohidul Islam 5 yıl önce
ebeveyn
işleme
db7a5616ec
2 değiştirilmiş dosya ile 5 ekleme ve 6 silme
  1. 1 2
      README.md
  2. 4 4
      nlu_job/nlu_utils.py

+ 1 - 2
README.md

@@ -1,2 +1 @@
-# ER Care24 review automation.
-
+# ER Care24 review automation.

+ 4 - 4
nlu_job/nlu_utils.py

@@ -17,7 +17,7 @@ def filter_with_last_ten_reviews(location_id, replies):
             similarity = SequenceMatcher(None, s1, s2).ratio()
             if similarity > 0.7:
                 replies.remove(rep)
-                print(similarity, '--------------', rep.reply_category)
+                print('%.2f'%similarity, ' -------------- ', rep.reply_category)
 
     return replies
 
@@ -37,7 +37,7 @@ def is_a_name(name):
     '''
     function that decide whether it is a person name or not
     :param : name -> a string usually reviewer name
-    :return -> a boolean True/False:
+    :return: Boolean ->  true or false
     '''
 
     response = model_inference(name.title())
@@ -57,8 +57,8 @@ def analyze_inference(response):
     ['intent', 'entities', 'intent_ranking', 'text']
     we took all intents that has more than 10% of intent confident.
     all the intents that has bellow confidence has been omitted.
-    :param response: a json response that RASA NLU server respond.
-    :return: dictionary with key of intent and value of it's confident.
+    :param response: JSON -> a json response that RASA NLU server respond.
+    :return: DICT ->dictionary with key of intent and value of it's confident.
     '''
 
     res_intents = response.get('intent_ranking')