b93a007cdf6fa77bb7ae7b0a9ae5f7c8e2db3ea9,ner_v1/api.py,,text,#Any#,141

Before Change


                ]
            ]
    
    try:
        parameters_dict = parse_parameters_from_request(request)
        entity_output = get_text(
            message=parameters_dict[PARAMETER_MESSAGE],
            entity_name=parameters_dict[PARAMETER_ENTITY_NAME],
            structured_value=parameters_dict[PARAMETER_STRUCTURED_VALUE],
            fallback_value=parameters_dict[PARAMETER_FALLBACK_VALUE],
            bot_message=parameters_dict[PARAMETER_BOT_MESSAGE],
            language=parameters_dict[PARAMETER_SOURCE_LANGUAGE],
            fuzziness=parameters_dict[PARAMETER_FUZZINESS],
            min_token_len_fuzziness=parameters_dict[PARAMETER_MIN_TOKEN_LEN_FUZZINESS],
            live_crf_model_path=parameters_dict[PARAMETER_LIVE_CRF_MODEL_PATH],
            read_model_from_s3=parameters_dict[PARAMETER_READ_MODEL_FROM_S3],
            read_embeddings_from_remote_url=parameters_dict[PARAMETER_READ_EMBEDDINGS_FROM_REMOTE_URL],
            predetected_values=parameters_dict[PARAMETER_PRIOR_RESULTS]
        )
        ner_logger.debug("Finished %s : %s " % (parameters_dict[PARAMETER_ENTITY_NAME], entity_output))
    except TypeError as e:
        ner_logger.exception("Exception for text_synonym: %s " % e)
        return HttpResponse(status=500)
    return HttpResponse(json.dumps({"data": entity_output}), content_type="application/json")


@require_http_methods(["GET", "POST"])

After Change


                ]
            ]
    
    try:
        parameters_dict = parse_parameters_from_request(request)
        entity_output = get_text(
            message=parameters_dict[PARAMETER_MESSAGE],
            entity_name=parameters_dict[PARAMETER_ENTITY_NAME],
            structured_value=parameters_dict[PARAMETER_STRUCTURED_VALUE],
            fallback_value=parameters_dict[PARAMETER_FALLBACK_VALUE],
            bot_message=parameters_dict[PARAMETER_BOT_MESSAGE],
            language=parameters_dict[PARAMETER_SOURCE_LANGUAGE],
            fuzziness=parameters_dict[PARAMETER_FUZZINESS],
            min_token_len_fuzziness=parameters_dict[PARAMETER_MIN_TOKEN_LEN_FUZZINESS],
            live_crf_model_path=parameters_dict[PARAMETER_LIVE_CRF_MODEL_PATH],
            read_model_from_s3=parameters_dict[PARAMETER_READ_MODEL_FROM_S3],
            read_embeddings_from_remote_url=parameters_dict[PARAMETER_READ_EMBEDDINGS_FROM_REMOTE_URL],
            predetected_values=parameters_dict[PARAMETER_PRIOR_RESULTS]
        )
        ner_logger.debug("Finished %s : %s " % (parameters_dict[PARAMETER_ENTITY_NAME], entity_output))
    except TypeError as e:
        ner_logger.exception("Exception for text_synonym: %s " % e)
        return HttpResponse(status=500)
    except KeyError as e:
        ner_logger.exception("Exception for text_synonym: %s " % e)
        return HttpResponse(status=500)
    except es_exceptions.ConnectionTimeout as e:
        ner_logger.exception("Exception for text_synonym: %s " % e)
        return HttpResponse(status=500)
    except es_exceptions.ConnectionError as e:
        ner_logger.exception("Exception for text_synonym: %s " % e)
        return HttpResponse(status=500)

    return HttpResponse(json.dumps({"data": entity_output}), content_type="application/json")


@require_http_methods(["GET", "POST"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: hellohaptik/chatbot_ner
Commit Name: b93a007cdf6fa77bb7ae7b0a9ae5f7c8e2db3ea9
Time: 2021-04-05
Author: ankur09011@gmail.com
File Name: ner_v1/api.py
Class Name:
Method Name: text


Project Name: chakki-works/doccano
Commit Name: f8a72a0a60658d462753fe39a2119932358ccca5
Time: 2018-12-26
Author: sergiy.n@attendify.com
File Name: app/server/views.py
Class Name: DataUpload
Method Name: post


Project Name: hellohaptik/chatbot_ner
Commit Name: edf89e236de2df9d5aa9ac477eed23d64b9a38e7
Time: 2021-04-05
Author: ankur09011@gmail.com
File Name: ner_v1/api.py
Class Name:
Method Name: city