• Stars
    star
    314
  • Rank 132,586 (Top 3 %)
  • Language
    Python
  • Created over 5 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

2019百度的关系抽取比赛,使用Pytorch实现苏神的模型,F1在dev集可达到0.75,联合关系抽取,Joint Relation Extraction.

kg-baseline-pytorch

2019百度的关系抽取比赛,Pytorch版苏神的baseline,联合关系抽取。

模型

与苏神的模型相同,只不过开发框架由Keras+Tensorflow变成了Pytorch,给使用Pytorch的小伙伴分享。

苏神Keras版链接:https://github.com/bojone/kg-2019-baseline

代码中复用了许多苏神的代码,因此首先对苏神表示感谢!

以下为苏神模型介绍原文:

用BiLSTM做联合标注,先预测subject,然后根据suject同时预测object和predicate,标注结构是“半指针-半标注”结构,以前也曾介绍过( https://kexue.fm/archives/5409 )

标注结构是自己设计的,我看了很多关系抽取的论文,没有发现类似的做法。所以,如果你基于此模型做出后的修改,最终获奖了或者发表paper什么的,烦请注明一下(其实也不是太奢望)

@misc{
  jianlin2019bdkg,
  title={Hybrid Structure of Pointer and Ragging for Relation Extraction: A Baseline},
  author={Jianlin Su},
  year={2019},
  publisher={GitHub},
  howpublished={\url{https://github.com/bojone/kg-2019-baseline}},
}

CSDN上基于本代码的算法简介:https://blog.csdn.net/qq_35268841/article/details/107063066

用法

python trans.py转换数据,python main.py跑模型并观察结果。

代码需要GPU运行!若需要CPU运行则去掉代码中所有的.cuda()并将一些cuda上的数据类型改为普通数据类型即可。

数据

数据只提供了共30条示例数据。数据由比赛官方提供,如有需要请联系比赛主办方。

结果

5个epoch到达0.73,最高能到0.75。

环境

Python 3.5+

Pytorch 1.0.1

tqdm

链接

More Repositories

1

mnist-classification

Pytorch、Scikit-learn实现多种分类方法,包括逻辑回归(Logistic Regression)、多层感知机(MLP)、支持向量机(SVM)、K近邻(KNN)、CNN、RNN,极简代码适合新手小白入门,附英文实验报告(ACM模板)
Python
377
star
2

DHAP

Source code of SIGIR2021 Paper 'One Chatbot Per Person: Creating Personalized Chatbots based on Implicit Profiles'
Python
39
star
3

DTW_Digital_Voice_Recognition

基于DTW与MFCC特征进行数字0-9的语音识别,DTW,MFCC,语音识别,中英数据,端点检测,Digital Voice Recognition。
Python
38
star
4

ncov_sentiment

疫情期间网民情绪识别比赛baseline,使用BERT进行端到端的fine-tuning,datafountain平台,平台评测F1值0.716。
Python
35
star
5

RICHRUC

Java swing实现的大富翁游戏(monopoly of RUC), 《大富翁7》同款界面,加以RUC学校特色
Java
24
star
6

Qmazon

Qt C++ 图书推荐与评论系统GUI 协同过滤推荐 collaborative filtering, book recommendation System, Book-Crossing Dataset
C++
22
star
7

twitter_sentiment_bert_scikit

Twitter US Airline数据集情感分析(sentiment Analysis),使用Bert Sentence encoding作为特征,实现了SVM、XGBoost、RandomForest(随机森林)若干分类器。
Python
18
star
8

GMM_Digital_Voice_Recognition

基于GMM与MFCC特征进行数字0-9的语音识别,GMM,MFCC,语音识别,中文数据,sklearn,Digital Voice Recognition。
Python
18
star
9

Anchors

Source code of CIKM2021 Paper 'Pre-training for Ad-hoc Retrieval: Hyperlink is Also You Need'
Python
17
star
10

paperlist_nlp_ir_rec_ai_conference

2016-至今nlp/ir/recsys/ai相关顶会的论文清单paperlist列表含目录,方便直接搜索关键字。包括AAAI/ACL/EMNLP/IJCAI/SIGIR/CIKM/WSDM/WWW/NIPS/COLING
Python
17
star
11

HMM_Digital_Voice_Recognition

基于HMM与MFCC特征进行数字0-9的语音识别,HMM,GMMHMM,MFCC,语音识别,sklearn,Digital Voice Recognition。
Python
16
star
12

Diplomaticdata

使用Django搭建的基于Neo4j知识图谱的人际关系搜索与六度关系搜索系统,使用Mongo存储语料输出,使用Neo4j维护知识图谱
JavaScript
15
star
13

fuckdk

快速观看党课的脚本 党课快速观看器
Python
15
star
14

knowqa

预训练模型知识量度量竞赛 Baseline F1 0.35 BERTForMaskedLM
Python
13
star
15

pretrain4ir_tutorial

NLPIR tutorial: pretrain for IR. pre-train on raw textual corpus, fine-tune on MS MARCO Document Ranking
Python
13
star
16

airplane

2019华为杯 第十六届研究生数学建模F题解决方案“基于最小代价与Dubins曲线的改进Dijkstra与A*算法航迹规划“源代码
Python
9
star
17

imagezoo-cv2

使用opencv-python/PyQt5完成的数字图像处理系统,包括图像缩放/裁剪/灰度变换/高低通滤波/边缘检测等功能
Python
9
star
18

fuckxk

微人大课程中心 自动抢课器 模拟五秒抢一次
Python
6
star
19

zhengyima.github.io

homepage of me
HTML
5
star
20

mnist-classification-latex

mnist-classification仓库的实验报告latex源码
TeX
3
star
21

judgepro

处理于子明的判决书的小脚本,将doc转docx并抽取docx文件中的案名
Python
3
star
22

95invite

95c虚拟货币(区块链):空投的网页
PHP
3
star
23

WeiboImage-Spider

微博探针-微博图片爬取Spider Scrapy
Python
3
star
24

WeiboSensor

WeiboSensor 微博探针 前端
JavaScript
2
star
25

scraper-school

基于Scrapy,Splash,Selenium,Mongo的140所双一流高校新闻网站的通用爬虫项目
Python
2
star
26

WeiboSensor-Service

WeiboSensor微博探针服务端
Python
1
star
27

rucsnake

支持玩家通过编写C代码进行多人对战的贪吃蛇大作战平台
PHP
1
star
28

WikiExtract

基于规则的维基百科关系抽取
Java
1
star
29

lechufun_service_new

微信小程序后台,Django 3.1, Python 3.7, 入门教学,连了mysql并实现登录
Python
1
star
30

FileSystem

OS Work
C++
1
star
31

More-Than-Meet-MC-

不如遇见-微信小程序-后台
JavaScript
1
star
32

More-Than-Meet

不如遇见-微信小程序
JavaScript
1
star
33

fanyi

fanyi page
PHP
1
star
34

ss

Python
1
star
35

zhengyima

1
star
36

vruc_student_scrape

from vruc course center, scrape student's information
Python
1
star
37

Itchat-Scripts

一些自娱自乐的Itchat脚本
Python
1
star
38

dak_coin

DAK数字货币官网
CSS
1
star
39

school-django-tutorial

django入门代码 连接了数据库 实现了简单的选课功能
Python
1
star
40

RICHRUCOnline

跨机器网络对战的分布式 人大版大富翁游戏。
1
star
41

shop-Zhouyan

【个人备份】朋友的毕业设计,一个PHP实现的家居网站。
PHP
1
star
42

LeChuFun

又一个高颜值小程序
JavaScript
1
star
43

zgj

最高检公开法律文书爬虫(http://www.ajxxgk.jcy.cn/html/zjxflws/4.html)
HTML
1
star