本文主要是针对specific domain中的KG构建中涉及到的相关工具完成梳理、配置、简单使用工作,达到熟悉的目的。
短语挖掘——在关键词提取和属性提取等IE抽取中,作用还是蛮大的,可以用做校准的依据。
知识分类体系建设
NLP工具(一般一个工具,具有多种功能,比如分词、分句、句法依存分析、NER等等)——样例地址:project_hj_py
KG 工具
网页信息抽取
Domain PLM训练
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
def Delete_stopwords(example_sent):
stop_words = set(stopwords.words('english'))
word_tokens = word_tokenize(example_sent)
filtered_sentence = [w for w in word_tokens if not w in stop_words]
filtered_sentence = []
for w in word_tokens:
if w not in stop_words:
filtered_sentence.append(w)
return word_tokens,filtered_sentence
example_sent = "This is a sample sentence, showing off the stop words filtration."
word_tokens,filtered_sentence=Delete_stopwords(example_sent)
print(word_tokens,filtered_sentence)
https://www.nltk.org/nltk_data/——73项
不仅只有re表达式的方式,在大量网站抽取时,好像是有专门的研究分支——网页信息抽取技术。
Google Sheet:https://cn.gijn.org/2022/07/22/data-extraction-tools/
可以捕获标签内的text内容。通过公式,IMPORTXML导入网页元素。
Google sheet教程:https://blog.coupler.io/importhtml-function-google-sheets/
建议:如果会爬虫,就不要用Google sheet,不好使,还没现有的爬虫软件好用。