Code Monkey home page Code Monkey logo

text_data_mining's Introduction

text_data_mining

爬虫技术、搜索技术和文本相似度技术用于网络文本数据的挖掘和知识图谱的自动构建

(1) 用scrapy爬取足球相关的信息

(2) 把爬取到的信息放入ElasticSearch当中,并搜索出梅西相关的信息,相当于是梅西的实体抽取

(3) 在这些梅西相关的信息中,利用句向量和句子相似度寻找标签为”梅西 跑动和进球“的信息。所使用的句子有:

'9球,梅西刷新自己的甘伯杯历史进球纪录; '

'阿根廷跑动数据:梅西7.6公里; 对阵克罗地亚全场84%的时间梅西的跑动速度均在7km/h以下。'

凡是和上面的句子距离较近的句子就被标上”梅西 跑动和进球“的标签。具体来说,先计算这两个句子与”梅西 跑动和进球“这个句子的句子相似度,得到均值mean和标准差std。然后,依次计算数据库中的句子和”梅西 跑动和进球“这个句子的句子相似度,凡是相似度大于mean-5*std的句子就可以打上”梅西 跑动和进球“的标签。

'9球,梅西刷新自己的甘伯杯历史进球纪录; '与”梅西 跑动和进球“算出来的句子相似度为0.915

'阿根廷跑动数据:梅西7.6公里; 对阵克罗地亚全场84%的时间梅西的跑动速度均在7km/h以下。'与”梅西 跑动和进球“算出来的句子相似度为0.893

根据相似度大于mean-5std,还找到一个句子(相似度是0.856,大于mean-5std):

迷失,梅西触球仅比门将多6次;而在传球和射门等数据上,梅西的表现同样远低于他的平均水平。

注意,这个句子中既没有跑动这个词,也没有进球这个词,但意思是类似的,句向量和句子相似度的方法可以很好的把这个句子找出来,并打上”梅西 跑动和进球“的标签。

打标签的过程其实就是事件抽取的过程。

得到了实体,也抽出了事件,就能够构建简单的知识图谱了。

text_data_mining's People

Contributors

mediaproduct2017 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.