1. 相关知识调研

知识图谱的应用
1/超级验证码
2/内部问答系统

数眼科技
海致警务知识图谱

网感至察 https://www.tmlsystem.cn/#/index/

海致星图 http://www.stargraph.cn/

《知识图谱 方法、实践与应用》 王昊奋

分词—》词性标注 —》句法和语义分析

DeepKE 知识表示 DeepKE 是基于 Pytorch 的深度学习中文关系抽取处理套件。
OpenKE 关系抽取
远程监督

发布了OpenNRE工具包,经过近两年来的不断改进,涵盖有监督关系抽取、远程监督关系抽取、
少次学习关系抽取和文档级关系抽取等丰富场景

关系抽取:
开放关系抽取
限定关系抽取:一个分类问题

1.1. OpenNRE

  • 有监督的关系抽取
    • CNN Convolutional Neural Networks
    • BERT (Bidirectional Encoder Representations from Transformers)

Convolutional Neural Networks (CNN) use convolutional networks to extract semantic features from input sentences. Here we first get the word embeddings and position embeddings of the sentences, then send them to CNN to get the sentence representations. Finally those representations are fed to a fully-connected layer to calculate the probabilities for each relation.

Bidirectional Encoder Representations from Transformers (BERT) (Devlin et al. 2018) is a self-attention-based text encoder that achieves state-of-the-arts on several NLP benchmarks. We follow the setting of (Soares et al. 2019) for this task.

换用国内源,快速pip下载
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt

https://www.parallels.cn/ 虚拟机

命名实体识别 NER named entity necognition

KBQA 基于知识图谱的问答

TACRED(TAC Relation Extraction Dataset)

中文数据集: COAE 2016 Task3

todo pyachram 调通
农业项目下载
openNRE下好

信息抽取(Information Extraction,IE)旨在从大规模非结构或半结构的自然语言文本中抽取结构化信息。信息抽取的主要任务有:命名实体识别、实体关系抽取、事件抽取、实体消歧。关系抽取(Relation Extracion,RE)是其中的重要子任务之一

PCNN模型(CNN的衍生模型,分片卷积神经网络)

WARNING: The script virtualenv is installed in ‘/Users/leo/Library/Python/2.7/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use —no-warn-script-location.

实体识别:主流的算法CNN-CRF
主要原因cnn/lstm crf需要大量数据支持,而我们缺乏标注数据,因此选择了无监督的方法。
此外,我们的实体种类较多,用序列标注方法的效果可能不好(特征只有输入序列的embedding),而我们的方法能够将百科中实体的各种特征引入。

NER Named Entity Recognition 命名实体识别

基于bert的中文实体关系识别(实体关系抽取)项目开源

1.2. nlp中的实体关系抽取方法

  • pipeline方法
    • Pipeline方法指先抽取实体、再抽取关系(对已经抽取的实体进行两两配对,然后进行关系分类)
    • 优点:Pipeline方法易于实现,这两个抽取模型的灵活性高,实体模型和关系模型可以使用独立的数据集,并不需要同时标注实体和关系的数据集
    • 缺点:
      • 误差积累
      • 实体冗余
      • 交互缺失
    • 实体抽取方法
      • 序列标注:SoftMax和CRF
      • Span抽取:指针网络
      • 片段排列+分类
      • Seq2Seq
    • 关系抽取(分类问题)
      • 模板匹配(人工模板/统计模板)
      • 半监督学习
      • 监督学习
  • 联合抽取(只有一个模型)
    • 参数共享
    • 联合解码
  • 疑难问题
    • 少次关系学习
    • 文档级别的关系抽取

1.3. CNN 卷积神经网络

1.4. RNN 循环神经网络

1.5. LSTM

  • 长短期记忆网络(LSTM,Long Short-Term Memory)
  • 是RNN的一种

1.6. BERT

  • 基于Transrofmer模型
  • Masked LM (MLM)
  • Next Sentence Prediction (NSP)

1.7. CRF Conditional Random Field 条件随机场

  • 可以用于构造在给定一组输入随机变量的条件下,另一组输出随机变量的条件概率分布模型

对抗学习 对抗生成网络GAN
预训练的模型

attention是一种能让模型对重要信息重点关注并充分学习吸收的技术,它不算是一个完整的模型,应当是一种技术,能够作用于任何序列模型中。

1.8. Transrofmer模型

  • 全新模型,抛弃了以往深度学习任务里面使用到的 CNN 和 RNN
  • encoer-decoder 架构

1.9. PCNN(Piece-Wise-CNN)

1.10. KNN K最近邻分类方法 K-NearestNeighbor



Libraries have been installed in:
/usr/local/lib/../lib64

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:

  • add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
    during execution
  • add LIBDIR to the `LD_RUN_PATH’ environment variable
    during linking
  • use the `-Wl,-rpath -Wl,LIBDIR’ linker flag
  • have your system administrator add LIBDIR to `/etc/ld.so.conf’

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.

Libraries have been installed in:
/usr/local/lib/../lib64

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:

  • add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
    during execution
  • add LIBDIR to the `LD_RUN_PATH’ environment variable
    during linking
  • use the `-Wl,-rpath -Wl,LIBDIR’ linker flag
  • have your system administrator add LIBDIR to `/etc/ld.so.conf’

这其中关键的问题是怎样高效的完成实体对齐,技术路线基本可以分为两类:基于实体属性相似度的框架、基于联合表征的深度学习框架。考虑到基于联合表征的深度学习框架依赖大量标注数据,并且模型与行业及数据强相关,无法提供很好的通用化能力,因此,华为云知识图谱服务当前支持基于实体属性相似度的框架,可以通过定义相似度度量及组合,完成实体对齐以及知识融合。

阿里自学习平台
极天信息 : G1brain类脑平台

公安行业的数据?

通用裁判文书
抽取原告、被告、适用法律、犯罪事实,罚款金额等语义要素

离婚裁判文书
抽取是否出轨、子女情况、分居年限、是否军婚等语义要素

刑事庭审记录
抽取犯罪时间、犯罪地点、犯罪手段、案情、后果等语义要素

专利申请书
抽取发明人,地址,权利要求等语义要素