Keyword-BERT
Keyword-BERT copied to clipboard
hello @DataTerminatorX Questions about forecast results:test_results.tsv 1. What does generation mean by probability? Choose the one with high probability? 2. Why does the test data have a high probability or...
本文的work感觉很大质量上依赖于关键词抽取的质量。而在实际的业务中,并不能保证许多场景业务的关键词都能很好的抽取出来,导致实用性降低了一层。 针对各种关键词算法抽取对于整体模型的影响有仔细对比过吗
数据
您好,我想请问一下,在运行模型的时候构造数据时有create_pretraining_data.py和convert_to_bert_keyword.py两个文件,它们的作用分别是什么哪?然后在create_pretraining_data.py中数据输入输出的格式是什么那?
关键词系统
关键词系统相关代码可以提供一下吗?(数据预处理之类的)
``` def read_baike_examples(input_file, is_training): """Read a baike txt file into a list of SquadExample""" with tf.gfile.Open(input_file, "r") as reader: for line in reader: ``` 
正负样本的比例
请问正负样本的比例有什么建议吗,谢谢
你好,文件convert_to_bert_keyword.py文件中的match接口,有如下两点疑惑: 1、在调英文匹配的时候调用的仍是中文匹配接口 def match(s, kws): kw_index = set() for kw in kws: if re.match(r'^[\u4e00-\u9fff]+$', kw): kw_index |= set(match_ch(s, kw)) elif re.match(r'^[a-zA-Z]+$', kw): kw_index |= set(match_ch(s, kw)) #我的理解这里应该是用来做英文匹配的 else: continue return...
## 1. 模型结构 看论文中的描述,关键字注意力层和常规 transformer 层分别接在 11 层常规 transformer 之后,但是看源码中,貌似并不是这样,也就是 modeling.py 的第 212、226 行,类似于一个双塔结构,它们共享的只有 embedding 层? ## 2. kw_mask attention 在生成这个 mask 的过程中,cls 和 sep 三行中如果不经过特殊处理应该在进入 softmax 之前全部被填充成 -10000,那这三行在进行 softmax...
首先谢谢作者开放代码~ 看了您的源码,发现create_attention_mask_from_keyword_mask函数生成的kw_mask只有A's token到B's key word的映射,按这部分的注释似乎是包含A到B以及B到A两方的token 及 kw映射,代码似乎搞错了