2e733ebeab730dd7f789ecbeedea5468c73432da,ner_v1/chatbot/entity_detection.py,,get_pnr,#Any#Any#Any#Any#Any#,499

Before Change


    

    pnr_detection = PNRDetector(entity_name=entity_name)
    if structured_value:
        entity_list, original_text_list = pnr_detection.detect_entity(text=structured_value)
        if entity_list:
            return output_entity_dict_list(entity_list, original_text_list, FROM_STRUCTURE_VALUE_VERIFIED)
        else:
            return output_entity_dict_list([structured_value], [structured_value], FROM_STRUCTURE_VALUE_NOT_VERIFIED)
    else:
        entity_list, original_text_list = pnr_detection.detect_entity(text=message)
        if entity_list:
            return output_entity_dict_list(entity_list, original_text_list, FROM_MESSAGE)
        elif fallback_value:
            return output_entity_dict_list([fallback_value], [fallback_value], FROM_FALLBACK_VALUE)

    return None


def get_regex(message, entity_name, structured_value, fallback_value, bot_message, pattern):
    Use RegexDetector to detect text that abide by the specified

After Change


    

    pnr_detection = PNRDetector(entity_name=entity_name)
    return pnr_detection.detect(message=message, structured_value=structured_value, fallback_value=fallback_value,
                                bot_message=bot_message)


def get_regex(message, entity_name, structured_value, fallback_value, bot_message, pattern):
    Use RegexDetector to detect text that abide by the specified
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 27

Instances


Project Name: hellohaptik/chatbot_ner
Commit Name: 2e733ebeab730dd7f789ecbeedea5468c73432da
Time: 2018-08-27
Author: saileshdev@gmail.com
File Name: ner_v1/chatbot/entity_detection.py
Class Name:
Method Name: get_pnr


Project Name: hellohaptik/chatbot_ner
Commit Name: d4c4ff563301262743a418b6af1f050b33c79fa1
Time: 2018-08-31
Author: anchan.viraj@gmail.com
File Name: ner_v1/chatbot/entity_detection.py
Class Name:
Method Name: get_shopping_size


Project Name: hellohaptik/chatbot_ner
Commit Name: 2e733ebeab730dd7f789ecbeedea5468c73432da
Time: 2018-08-27
Author: saileshdev@gmail.com
File Name: ner_v1/chatbot/entity_detection.py
Class Name:
Method Name: get_pnr


Project Name: hellohaptik/chatbot_ner
Commit Name: 2bd2a44c4b5b1c4540b6d90917ed99964c161375
Time: 2018-08-25
Author: anchan.viraj@gmail.com
File Name: ner_v1/chatbot/entity_detection.py
Class Name:
Method Name: get_number


Project Name: hellohaptik/chatbot_ner
Commit Name: 1582871bca5249effa299c1f7a36acd08f8797fa
Time: 2018-08-23
Author: anchan.viraj@gmail.com
File Name: ner_v1/chatbot/entity_detection.py
Class Name:
Method Name: get_phone_number


Project Name: hellohaptik/chatbot_ner
Commit Name: c5867743fdc1acfcb3ba7b1710e235e2a45807e1
Time: 2018-08-24
Author: saileshdev@gmail.com
File Name: ner_v1/chatbot/entity_detection.py
Class Name:
Method Name: get_email