All Projects → hiDaDeng → eventextraction

hiDaDeng / eventextraction

Licence: MIT License
中文复合事件抽取,能识别文本的模式,包括条件事件、顺承事件、反转事件等,可以用于文本逻辑性分析。

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to eventextraction

TextDatasetCleaner
🔬 Очистка датасетов от мусора (нормализация, препроцессинг)
Stars: ✭ 27 (+58.82%)
Mutual labels:  text-mining
advanced-text-mining
TEANAPS 라이브러리를 활용한 자연어 처리와 텍스트 분석 방법론에 대해 다룹니다.
Stars: ✭ 15 (-11.76%)
Mutual labels:  text-mining
vor-knowledge-graph
🎓 Open knowledge mining and graph builder
Stars: ✭ 57 (+235.29%)
Mutual labels:  text-mining
Guten-gutter
Strips boilerplate from Project Gutenberg text files
Stars: ✭ 16 (-5.88%)
Mutual labels:  text-mining
ipo-miner
IPO Investment via Text Mining.
Stars: ✭ 20 (+17.65%)
Mutual labels:  text-mining
textstem
Tools for fast text stemming & lemmatization
Stars: ✭ 36 (+111.76%)
Mutual labels:  text-mining
Introduction-to-text-mining-with-Python
Lectures in Urban Data Science Lab, Seoul
Stars: ✭ 25 (+47.06%)
Mutual labels:  text-mining
elpresidente
🇺🇸 Search and Extract Corpus Elements from 'The American Presidency Project'
Stars: ✭ 21 (+23.53%)
Mutual labels:  text-mining
textdigester
TextDigester: document summarization java library
Stars: ✭ 23 (+35.29%)
Mutual labels:  text-mining
aera-workshop
This workshop introduces participants to the Learning Analytics (LA), and provides a brief overview of LA methodologies, literature, applications, and ethical issues as they relate to STEM education.
Stars: ✭ 14 (-17.65%)
Mutual labels:  text-mining
sacred
📖 Sacred texts in R
Stars: ✭ 19 (+11.76%)
Mutual labels:  text-mining
gofastr
Make a DocumentTermMatrix faster
Stars: ✭ 19 (+11.76%)
Mutual labels:  text-mining
sensim
Sentence Similarity Estimator (SenSim)
Stars: ✭ 15 (-11.76%)
Mutual labels:  text-mining
restaurant-finder-featureReviews
Build a Flask web application to help users retrieve key restaurant information and feature-based reviews (generated by applying market-basket model – Apriori algorithm and NLP on user reviews).
Stars: ✭ 21 (+23.53%)
Mutual labels:  text-mining
ruimtehol
R package to Embed All the Things! using StarSpace
Stars: ✭ 95 (+458.82%)
Mutual labels:  text-mining
Quran-and-Arabic-Language-Repository
Projects & Libraries related to Quran & Arabic Language
Stars: ✭ 26 (+52.94%)
Mutual labels:  text-mining
blueprints-text
Jupyter notebooks for our O'Reilly book "Blueprints for Text Analysis Using Python"
Stars: ✭ 103 (+505.88%)
Mutual labels:  text-mining
support-tickets-classification
This case study shows how to create a model for text analysis and classification and deploy it as a web service in Azure cloud in order to automatically classify support tickets. This project is a proof of concept made by Microsoft (Commercial Software Engineering team) in collaboration with Endava http://endava.com/en
Stars: ✭ 142 (+735.29%)
Mutual labels:  text-mining
DaDengAndHisPython
【微信公众号:大邓和他的python】, Python语法快速入门https://www.bilibili.com/video/av44384851 Python网络爬虫快速入门https://www.bilibili.com/video/av72010301, 我的联系邮箱[email protected]
Stars: ✭ 59 (+247.06%)
Mutual labels:  text-mining
named-entity-recognition
Notebooks for teaching Named Entity Recognition at the Cultural Heritage Data School, run by Cambridge Digital Humanities
Stars: ✭ 18 (+5.88%)
Mutual labels:  text-mining

一、文本事理类型分析

中文复合事件抽取,可以用来识别文本的模式,包括条件事件、顺承事件、反转事件。

我仅仅是对代码做了简单的修改,增加了函数说明注释和stats函数,可以用于统计文本中各种模式的分布(数量)情况。代码原作者为刘焕勇 https://github.com/liuhuanyong


事件图谱(事理图谱)的类型

项目地址https://github.com/liuhuanyong/ComplexEventExtraction 项目介绍很详细,感兴趣的一定要去原项目看一下。

事件 含义 形式化 事件应用 图谱场景 举例
条件事件 某事件条件下另一事件发生 如果A那么B 事件预警 时机判定 <限制放宽,立即增产>
反转事件 某事件与另一事件形成对立 虽然A但是B 预防不测 反面教材 <起步晚,发展快>
顺承事件 某事件紧接着另一事件发生 A接着B 事件演化 未来意图识别 <去旅游,买火车票>

分析出文本中的条件、顺承、反转,理论上就可以构建知识网络(本库做不到这可视化)。 1、反转事件图谱 2、条件事件图谱



二、安装方法

2.1 方法一

最简单的安装,现在由于国内外网络不稳定,可能需要尝试几次

pip3 install eventextraction

2.2 加镜像站点

有的童鞋已经把pip默认安装镜像站点改为国内,如果国内镜像还未收录我的这个包,那么可能会安装失败。只能从国外

https://pypi.org/simple

站点搜索eventextraction资源并安装

pip3 install eventextraction -i https://pypi.org/simple

2.3 国内镜像安装

如果国内镜像站点已经收录,那么使用这个会更快

pip3 install eventextraction -i https://pypi.tuna.tsinghua.edu.cn/simple/



三、使用

3.1 主函数

from eventextraction import EventsExtraction

extractor = EventsExtraction()
content = '虽然你做了坏事,但我觉得你是好人。一旦时机成熟,就坚决推行'
datas = extractor.extract_main(content)
print(datas)

运行结果

[{'sent': '虽然你做了坏事,但我觉得你是好人', 'type': 'but', 'tuples': {'pre_wd': '虽然', 'pre_part': '你做了坏事,', 'post_wd': '但', 'post_part ': '我觉得你是好人'}},
{'sent': '一旦时机成熟,就坚决推行', 'type': 'condition', 'tuples': {'pre_wd': '一旦', 'pre_part': '时机成熟,', 'post_wd': '就', 'post_part ': '坚决推行'}}]


3.2 统计

from eventextraction import EventsExtraction

extractor = EventsExtraction()
content = '虽然你做了坏事,但我觉得你是好人。一旦时机成熟,就坚决推行'
datas = extractor.extract_main(content)
print(extractor.stats(datas))

运行结果

{'but': 1, 'condition': 1, 'seq': 0, 'more': 0, 'other': 0}



如果

如果您是经管人文社科专业背景,编程小白,面临海量文本数据采集和处理分析艰巨任务,可以参看《python网络爬虫与文本数据分析》视频课。作为文科生,一样也是从两眼一抹黑开始,这门课程是用五年时间凝缩出来的。自认为讲的很通俗易懂o( ̄︶ ̄)o,

  • python入门
  • 网络爬虫
  • 数据读取
  • 文本分析入门
  • 机器学习与文本分析
  • 文本分析在经管研究中的应用

感兴趣的童鞋不妨 戳一下《python网络爬虫与文本数据分析》进来看看~

更多


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].