• Stars
    star
    127
  • Rank 281,151 (Top 6 %)
  • Language
    Python
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

multi-label-classification-4-event-type

多标签文本分类

数据集

数据来源:2020语言与智能技术竞赛:事件抽取任务

模型训练

  • 模型结构:采用ALBERT对文本进行特征提取,最大文本长度为200,采用的深度学习模型如下:

  • 模型训练效果如下图:

模型评估

本项目采用hamming loss对多标签分类进行评估,结果如下:

              precision    recall  f1-score   support

           0     1.0000    0.9167    0.9565        12
           1     1.0000    0.1250    0.2222         8
           2     1.0000    0.4000    0.5714        10
           3     1.0000    0.6364    0.7778        11
           4     0.9375    0.7895    0.8571        19
           5     0.9355    0.8286    0.8788        35
           6     1.0000    0.8750    0.9333        24
           7     0.9211    0.9333    0.9272       150
           8     1.0000    1.0000    1.0000        36
           9     0.9286    0.8125    0.8667        16
          10     0.5000    0.0667    0.1176        15
          11     1.0000    0.2500    0.4000         4
          12     0.9286    0.8667    0.8966        15
          13     1.0000    0.5000    0.6667        14
          14     0.8333    0.8333    0.8333         6
          15     1.0000    0.8750    0.9333        16
          16     1.0000    0.2500    0.4000         8
          17     0.8936    0.7925    0.8400       106
          18     1.0000    1.0000    1.0000         9
          19     0.9697    0.9697    0.9697        33
          20     0.9697    0.7442    0.8421        43
          21     1.0000    0.8889    0.9412         9
          22     1.0000    1.0000    1.0000        12
          23     0.8667    0.7222    0.7879        18
          24     0.9091    0.7143    0.8000        14
          25     0.9877    0.9091    0.9467        88
          26     1.0000    0.7778    0.8750         9
          27     0.9688    0.9688    0.9688        32
          28     0.9630    0.8966    0.9286        29
          29     0.8571    0.8571    0.8571        21
          30     1.0000    1.0000    1.0000        14
          31     1.0000    0.7000    0.8235        10
          32     1.0000    0.7692    0.8696        13
          33     0.0000    0.0000    0.0000         7
          34     1.0000    0.5556    0.7143         9
          35     1.0000    0.7500    0.8571        16
          36     0.9048    0.7037    0.7917        27
          37     0.9310    0.7714    0.8438        35
          38     0.8545    0.8393    0.8468        56
          39     0.9000    0.8182    0.8571        33
          40     0.9286    0.8125    0.8667        16
          41     0.9665    0.9484    0.9573       213
          42     1.0000    0.9091    0.9524        11
          43     0.7000    0.7778    0.7368        18
          44     1.0000    1.0000    1.0000        11
          45     1.0000    0.7317    0.8451        41
          46     0.9412    0.8421    0.8889        19
          47     0.9091    1.0000    0.9524        10
          48     0.5000    0.2000    0.2857         5
          49     1.0000    0.2308    0.3750        13
          50     0.9333    0.9859    0.9589        71
          51     0.8500    0.7727    0.8095        22
          52     0.9688    0.9688    0.9688        32
          53     1.0000    0.7778    0.8750         9
          54     1.0000    0.7500    0.8571         8
          55     1.0000    0.8889    0.9412         9
          56     0.0000    0.0000    0.0000         7
          57     0.8571    0.5000    0.6316        24
          58     0.0000    0.0000    0.0000         3
          59     1.0000    0.4000    0.5714         5
          60     1.0000    0.9259    0.9615        27
          61     1.0000    1.0000    1.0000        14
          62     1.0000    0.8571    0.9231        14
          63     0.8750    0.7778    0.8235         9
          64     1.0000    0.7500    0.8571         4

   micro avg     0.9424    0.8292    0.8822      1657
   macro avg     0.8983    0.7218    0.7791      1657
weighted avg     0.9308    0.8292    0.8669      1657
 samples avg     0.8675    0.8496    0.8517      1657
accuracy:  0.7983978638184246
hamming loss:  0.0037691280681934887

模型预测

在新数据上进行预测,结果如下:

预测语句: 北京时间6月7日,中国男足在广州天河体育场与菲律宾进行了一场热身赛,最终国足以2-0击败了对手,里皮也赢得了再度执教国足后的首场比赛胜利! 预测事件类型: 竞赛行为-胜负

预测语句: 巴西亚马孙雨林大火持续多日,引发全球关注。 预测事件类型: 灾害/意外-起火

预测语句: 19里加大师赛资格赛前两天战报 中国选手8人晋级6人遭淘汰2人弃赛 预测事件类型: 竞赛行为-晋级

预测语句: 日本电车卡车相撞,车头部分脱轨并倾斜,现场起火浓烟滚滚 预测事件类型: 灾害/意外-车祸

预测语句: 截止到11日13:30 ,因台风致浙江32人死亡,16人失联。具体如下:永嘉县岩坦镇山早村23死9失联,乐清6死,临安区岛石镇银坑村3死4失联,临海市东塍镇王加山村3失联。 预测事件类型: 人生-失联|人生-死亡

预测语句: 定位B端应用,BeBop发布Quest专属版柔性VR手套 预测事件类型: 产品行为-发布

预测语句: 8月17日。凌晨3点20分左右,济南消防支队领秀城中队接到指挥中心调度命令,济南市中区中海环宇城往南方向发生车祸,有人员被困。 预测事件类型: 灾害/意外-车祸

预测语句: 注意!济南可能有雷电事故|英才学院14.9亿被收购|八里桥蔬菜市场今日拆除,未来将建新的商业综合体 预测事件类型: 财经/交易-出售/收购

预测语句: 昨天18:30,陕西宁强县胡家坝镇向家沟村三组发生山体坍塌,5人被埋。当晚,3人被救出,其中1人在医院抢救无效死亡,2人在送医途中死亡。今天凌晨,另外2人被发现,已无生命迹象。 预测事件类型: 人生-死亡|灾害/意外-坍/垮塌

More Repositories

1

people_relation_extract

结合BERT+GRU+ATT模型,对自己收集的人物关系数据进行模型训练,用于人物关系抽取。
Python
319
star
2

spo_extract_platform

本项目是利用深度学习技术来构建知识图谱方向上的一次尝试,作为开放领域的关系抽取,算是笔者的一次创新,目前在这方面的文章和项目都很少。
Python
304
star
3

knowledge_graph_demo

本项目用于展示三元组抽取后形成的知识图谱,包括几本小说的实体关系,以及README.md,介绍这方面的一篇文章。
Python
190
star
4

embedding_rerank_retrieval

本项目是针对RAG中的Retrieve阶段的召回技术及算法效果所做评估实验。使用主体框架为LlamaIndex.
Jupyter Notebook
152
star
5

ccks_triple_extract

限定领域的三元组抽取的一次尝试,本文将会介绍笔者在2019语言与智能技术竞赛的三元组抽取比赛方面的一次尝试。
Python
132
star
6

ALBERT_text_classification

利用ALBERT实现文本二分类,判别是否属于政治上的出访类事件,提升模型训练和预测速度。
Python
71
star
7

keras_bert_multi_label_cls

本项目采用Keras和Keras-bert实现文本多标签分类任务,对BERT进行微调。
Python
64
star
8

bert_doc_binary_classification

文本二分类任务,是否文档是否属于政治上的出访类事件,利用BERT提取特征,模型采用简单的DNN。
Python
62
star
9

ALBERT_4_Time_Recognition

使用ALBERT预训练模型,用于识别文本中的时间,同时验证模型的预测耗时是否有显著提升。
Python
56
star
10

keras_bert_text_classification

本项目采用Keras和Keras-bert实现文本多分类任务,对BERT进行微调。
Python
46
star
11

keras_bert_sequence_labeling

本项目采用Keras和Keras-bert实现中文序列标注,对BERT进行微调,并在多个命名实体识别数据集上进行测试。
Python
46
star
12

-word-

利用文本分析算法和Python脚本,自动纠正word中的英语单词拼写错误
Python
44
star
13

Sentiment_Analysis

using LSTM model for sentiment analysis.
Python
37
star
14

llm_math_solver

本项目用于大模型数学解题能力方面的数据集合成,模型训练及评测,相关文章记录。
Python
37
star
15

UniLM_Chinese_DEMO

本项目使用云问科技训练的中文版UniLM模型对微博数据集进行自动标题生成。
Python
35
star
16

CNN_4_Verifycode

使用Keras搭建CNN模型,破解简单的网页验证码
Python
34
star
17

Chinese_Time_Recogniztion

利用深度学习模型,在小标注量数据上,进行文本中的时间识别。
Python
33
star
18

transformers_chinese_text_classification

本项目采用transformers模块,使用bert-base-chinese模型实现文本多分类。
Python
32
star
19

DL_4_NER

Using Bi-LSTM model for NER in English.
Python
32
star
20

pytorch_english_mltc

PyTorch使用BERT进行英语多标签文本分类
Python
32
star
21

PyTorch_Learning

learning pytorch step by step
Jupyter Notebook
26
star
22

entity_tagging_platform

A simple and useful platform for entity tagging using tornado.
HTML
25
star
23

cnews_text_classification

利用kashgari轻松搭建文本分类模型。
Python
25
star
24

pytorch_transformer_chinese_text_classification

本项目演示如何在PyTorch中使用Transformer模型进行中文文本分类
Python
23
star
25

R-BERT_for_people_relation_extraction

使用R-BERT模型对人物关系模型进行分类,效果有显著提升。
Python
23
star
26

huggingface_translation_model

使用HuggingFace翻译模型的一次尝试
Jupyter Notebook
21
star
27

llm_4_doc_qa

本项目用于文档问答,使用向量嵌入 + ES 做召回,使用Rerank模型作为精排,再使用LLM做文档问答,Web框架使用Flask。
Python
21
star
28

CRF_4_NER

Using CRF++ for NER
Python
20
star
29

pytorch_transformers_english_ner

本项目采用PyTorch和transformers模块实现英语序列标注,其中对BERT进行微调。
Python
19
star
30

Neo4j_movie_demo

Using Neo4j and Py2neo to demonstrate Chinese top 20 movies and their actor, visualized by graph.
Python
19
star
31

llm_open_triplet_extraction

本项目使用大语言模型(LLM)进行开放领域三元组抽取。
Python
18
star
32

Shicijielong

Using Python spider to complete a funny game named Shicijielong.
HTML
17
star
33

embedding_model_exp

本项目用于Embedding模型的相关实验,包括Embedding模型评估、Embedding模型微调、Embedding模型量化等。
Python
17
star
34

keras_albert_text_classification

本项目采用Keras和ALBERT实现文本多分类任务,其中对ALBERT进行微调。
Python
17
star
35

personal_travel_map

使用Pyecharts绘制个人足迹地图。
HTML
16
star
36

keras_bert_multiple_choice_MRC

本项目采用BERT等预训练模型实现多项选择型阅读理解任务(Multiple Choice MRC)
Python
14
star
37

llm_evaluation_4_mmlu

Using LLM to evaluate MMLU dataset.
Python
14
star
38

multi-modal-image-search

本项目使用LLaVA 1.6多模态模型实现以文搜图和以图搜图功能。
Python
14
star
39

WSD_With_Text_Extraction

抽取式NLP模型(阅读理解模型,MRC)实现词义消歧(WSD)
Python
12
star
40

yi_vl_experiment

本项目是关于Yi的多模态系列模型,如Yi-VL-6B/34B等的实验与应用。
Python
12
star
41

tensorflow-serving_4_kashgari

Using tensorflow/serving to deploy kashgari model for time training and predicting.
Python
12
star
42

keras_albert_multi_label_cls

本项目采用Keras和ALBERT实现文本多标签分类任务,其中对ALBERT进行微调。
Python
11
star
43

tensorflow_serving_examples

利用tensorflow/serving进行单模型、多模型、同一模型多版本的部署,并进行模型预测,并用Prothemus进行服务监控。
Python
11
star
44

alias_find_system

别名发现系统
Python
11
star
45

Keras_Transformer_Text_Classification

本项目使用Keras实现Transformer模型来进行文本分类(中文、英文均支持)。
Python
10
star
46

Keras_R_BERT

本项目使用Keras实现R-BERT,在人物关系数据集上进行测试验证。
Python
10
star
47

resnet_4_cifar10

Using Keras ResNet model to classify CIFAR-10 dataset.
Python
9
star
48

Docker_env_test

该项目用于演示如何构建Python开发环境的Docker镜像,并使用PyCharm连接Docker镜像进行开发测试。
Python
9
star
49

CRF_Chinese_NER

利用CRF++实现中文命名实体识别
Python
9
star
50

keras_bert_english_sequence_labeling

本项目采用Keras和Keras-bert实现英语序列标注,其中对BERT进行微调。
Python
9
star
51

document_qa_with_llm

本项目用于文档问答,使用向量嵌入 + ES 做召回,再使用LLM做文档问答。
Python
8
star
52

Movie_graphknowledge

利用2019年语言和智能比赛的数据和训练的模型,对开放的影视新闻进行三元组抽取,形成影视知识图谱。
Python
8
star
53

keras_bert_cloze

本项目采用keras-bert加载BERT模型,进行完形填空。
Python
8
star
54

CRF-Chinese-Word-Segment

利用CRF模型实现中文分词功能
Python
7
star
55

Keras_4_multiclass

Using Keras to create a DNN model to solve classical multiclass problem using IRIS data.
Python
7
star
56

celery_example

two examples for celery with python, one for math operation, the other for web scraping.
Python
7
star
57

keras_bert_short_text_match

本项目采用Keras和Keras-bert实现短文本匹配任务。
Python
7
star
58

CAPTCHA-Recognizition

Using CNN model to recognize CAPTCHA by using Keras.
Python
7
star
59

pdf-llm_series

The project is for PDF Python learning with Large Language Model.
Python
7
star
60

keras_roberta_text_classificaiton

Use English Roberta PLM to do text classification(TC) task with GLUE dataset: SST-2.
Python
6
star
61

tf_hub_english_text_classification

本项目使用tensorflow_hub中的BERT模型,对英语电影评论数据集(IMDB)进行文本二分类。
Python
6
star
62

text_corrector_corpus_auto_generation

该项目致力于从中文文字版PDF文档中,自动化构建出高质量的中文文本纠错语料。
Python
6
star
63

ES_Learning

Example codes for Elasticsearch learning with Python.
Python
6
star
64

llama-2-multiple-choice-mrc

本项目采用Firefly模型训练框架,使用LLAMA-2模型对多项选择阅读理解任务(Multiple Choice MRC)进行微调,取得了显著的进步。
Python
6
star
65

relation_extract_people

关系抽取之人物关系抽取,采用Pipeline方式。
Python
5
star
66

docker_image_demo

该项目用于显示如何使用Docker进行镜像打包,用于初学者入门。
Python
5
star
67

Examples-of-Python-Spiders

There are three Python Spiders written by myself using PhantomJS, Selenium, and AutoIt.
Python
5
star
68

Keras-K-fold-test

本项目以iris.csv和DNN模型为例,演示如何在Keras中使用K-fold交叉验证。
Python
5
star
69

bert_sougou_qa

本项目利用keras-bert和tokenizers模块,对BERT进行微调,对搜狗问答数据集实现抽取式问答。
Python
4
star
70

panas_usage_25_tricks

使用pandas的25个技巧。
HTML
4
star
71

keras_albert_sequence_labeling

本项目采用Keras和ALBERT实现序列标注,其中对ALBERT进行微调。
Python
4
star
72

vllm_learning

本项目用于大模型部署工具vLLM的研究与学习。
Python
4
star
73

roberta_torch_2_tf

本项目用于将HuggingFace提供的Roberta的Torch版本的模型转化为Tensorflow1.X版本的ckpt格式。
Python
4
star
74

bert_finetune_text_classification

利用BERT微调进行文本分类。
Python
4
star
75

CPM-LM-TF2-DEMO

本项目使用清源预训练模型CPM,并给出一些模型使用的例子。
Python
4
star
76

RoBERTa_and_DCMN_plus_for_RACE

I use RoBERTaMultipleChoiceModel and DCMN+ RoBERTa for RACE dataset.
Python
4
star
77

Keras_quasi_Mul_BERT

本项目使用Keras实现quasi Mul-BERT,在人物关系数据集上进行测试验证,其中quasi的意思为近似,因为Mul-BERT模型的论文还未发表,更多模型的细节还未知,因此为近似Mul-BERT。
Python
4
star
78

Sudoku-Solver-JavaScript-Version

This Sudoku Solver is written purely by HTML and JavaScript, which becomes more friendly for users to operate.
HTML
3
star
79

ORM_test

本项目用于演示如何使用SQLAlchemy来操作MySQL数据库,简单的CRUD操作。
Python
3
star
80

dynamic_quantization_on_bert

本项目使用动态量化(Dynamic Quantization)技术对BERT模型进行量化,并实验量化后的模型在推理性能和效果上的表现。
Jupyter Notebook
3
star
81

keras_bert_DCMN

使用DCMN模型完成多项选择阅读理解型任务。
Python
3
star
82

formIntoMySQL

This project use Spring Boot to interactive with form on the web and submit the result to MySQL database.
HTML
3
star
83

Poem-Search

web框架使用tornado, 后端数据库采用MongoDB, 诗词数据集使用爬虫。
Python
3
star
84

Sudoku-Solver

This program is written by Python Django, and used to solve Sudoku from other places.
HTML
2
star
85

phoneSpider

Scrapy phone information from baidu research using scrapy-splash, this is a simple version.
Python
2
star
86

machine_learning_text_classification

利用ALBERT+机器学习算法进行文本分类。
Python
2
star
87

llm_relation_classification

使用LLM对人物关系进行分类,记录模型训练、部署及评估结果。
Python
2
star
88

doubanMovieSpider

This project is simply a tutorial for downloading pictures from website and rename them.
Python
2
star
89

MathOperation

MathOperation
HTML
2
star
90

percent4.github.io

my personal blog with github + hexo
HTML
2
star
91

josephus

test
HTML
1
star
92

keras_train_visualization

Keras模型训练实时可视化
Python
1
star
93

csv_file_review

使用tornado上传Excel、CSV文件,并可以在线浏览。
HTML
1
star
94

unittest_example

Python单元测试使用例子
Python
1
star
95

protobuf_learning

Protobuf入门学习项目
Python
1
star
96

keras_roberta_mcqa_for_race

Use Roberta(English) pretrained model to finish multiple choice question answering task with RACE dataset.
Python
1
star
97

audio_recognizition

Using Xunfei and Baidu API to recognize audio in wav format
Python
1
star
98

WDS_With_Text_Extraction

使用Text Extraction模型进行词义消歧(WSD)
Python
1
star
99

Kaggle_Competition

some thoughts about a Kaggle competition
1
star
100

document_reviewer

常见文档格式的预览,比如txt,log,csv,image,pdf,markdown,python,html等。
JavaScript
1
star