first commit
客服敏感词和客服服务禁语 只需要传不同的words初始化模型就行,model_config_path共享。
model_config_path
from kf_sentence_detector import KFSentenceDetector words = ['高端班', '应试', '不知道', '高端班', '您只能', '集训'] model_config_path = 'data/re_model_config.json' kf_detector = KFSentenceDetector(words, model_config_path) if __name__ == '__main__': input_text = [ { "text": "后右下角儿有个高端班次孩子中考分数是多少分呀", "begin_time": 1326750, "end_time": 1332165 }, { "text": "看一下题目为什么呢?", "begin_time": 1326751, "end_time": 1332165 }, { "text": "你先把题目看一下第三问。", "begin_time": 1326752, "end_time": 1332165 } ] result = kf_detector.predict_text_list_format(input_text) print(result)
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
algorithm_kf_detector
使用方法
客服敏感词和客服服务禁语 只需要传不同的words初始化模型就行,
model_config_path
共享。使用示例