brightgems / deep_learning

projects about NLP knowledge graph, web crawling, word embedding, entity&relation extraction.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

readme

1 Deep Learning

1.1 Natural Language Processing description

technique_excel_table 具体每项技术细节在excel table 的链接里面。

  1. 分词

jieba分词 中文自然语言处理首先要解决的一个问题是分词问题,即一个句子,怎么样把它拆分成一组一组的词或者单个意义的字。

  1. 词向量化

词向量化

怎么样让计算机可以读懂中文呢?得想办法把字符转换成数字。

这里面有两个方法,一个是one-hot mapping,把每个字用一个单独的向量来表示,向量的dimension就是所有搜集到词的词典的大小。这里有个问题就是词与词之间的向量是没有联系的。

另一个方法是word embedding, 用distributed representation的方式来表示所有词,把一个向量压缩到一个100维或者200维的空间里面,这样训练出来的模型词与词之间在空间上就有联系。具体看principle里面的内容介绍。

  1. 词向量可视化

词向量可视化t-sne

怎么样把这些高维空间的向量可视化,或者说怎么知道一个词的向量与另一个词向量之间空间上的关系,就是embedding visualization, 也就是降维。里面运用到的技术主要有t-SNE和PCA.

  1. 实体抽取与关系抽取

关系抽取

怎么样知道一段话里面说了什么东西,他们之间的关系是怎么样的,运用了实体抽取和关系抽取的技术。现在这两个都是由深度学习模型循环神经网络来做了。当然也有deepdive这样已经集成化的library.

  1. 关键词抽取

textrank

怎么把一段话,一篇文章里面的关键词,关键句子找出来,运用了textrank技术,这种技术是从pagerank得到启发。 将原文本拆分为句子,在每个句子中过滤掉停用词(可选),并只保留指定词性的单词(可选)。由此可以得到句子的集合和单词的集合。每个单词作为pagerank中的一个节点。设定窗口大小为k,假设一个句子依次由下面的单词组成:w1, w2, w3, w4, w5, …, wn,w1, w2, …, wk、w2, w3, …,wk+1、w3, w4, …,wk+2等都是一个窗口。在一个窗口中的任两个单词对应的节点之间存在一个无向无权的边。k=2:10.基于上面构成图,可以计算出每个单词节点的重要性。最重要的若干单词可以作为关键词。

  1. 文档相似性

怎么分辨文档与文档之间的相关性运用了LDA, TF-IDF技术,具体可在文档里面查看。

  1. 网络爬虫

网络爬虫是用来从某个网站上搜集数据的,一般是结构化数据。

  1. 知识图谱

英雄联盟知识图谱

知识图谱是把识别到的实体,用实体之间关系组成的一个图。涉及到了图数据库(当然也可以用关系型数据库),实体抽取和关系抽取。

1.2 Personalized Intelligent Agents(PIA)

1.2.1 Objective:

1.2.1.1 Short Term

  • make traditional and mature NLP model customizable visually by end users at multiple levels e.g., training data, model parameter.
  • incorporate customizable NLP signals into both qualitative and quantitative investment strategies and research process.
  • recommendation of context sensitive synonyms.
  • Hot-word trending analysis on various topics, technology, industrial sectors, analysts comment, company announcement, Deep Learning authors comments, popular topics, papges, etc. Scrape the historical archives of web text in order to get for each post the following information: date, keywords, text.

1.2.1.2 Long Term

  • context sensitive, Personalized Intelligent Agents, forming an eco-system collaborating, competing and evolving together on behalf of their owners.
  • Graph2vec, 把word2vec应用在用户workflow使用序列上,根据用户使用app/func的顺序,把app/func看做单词,也是可以形成这样的序列数据,进而训练处每个app对应的向量。利用这个向量计算app之间的相似度,把真正内容相关的app聚合在一起,推荐给用户。
  • 可计算的知识服务引擎, like WolframAlpha.
1.2.1.2.1 智能投顾
  • 基于金融理财产品知识图谱的语义查询。知识图谱从互联网上公开信息构建,并支持如“高收益”这样的语义搜索。
  • 搜索相关主题的股票,及其新闻,公告,如“雄安题材”,“苹果主题”,“独角兽”等。
1.2.1.2.2 金融新闻Bots
  • 实时监控各大金融新闻网站的数据,构建了一个监控平台。 根据用户输入的自然语言问题,自动推送与其相关的新闻,并标记其中和用户输入问题相关的段落。
  • Event-Driven Stock prediction, using sentiment analysis on the web-crawling tokens/documents with doc2vec.
1.2.1.2.2.1 金融搜索

显示当前关键词所有的新闻消息,公告,根据消息数量得出的热度。

1.2.1.2.3 智能选股
百科类筛选ST股票, 非ST股票, 上证50股票
数据类筛选股价小于100块股票
事件类筛选刚复牌股票,今年刚上市的股票
选股类筛选每股收益在0.2-0.3之间,且市盈率小于30的股票;浙江省市盈率小于20倍的公司
1.2.1.2.4 知识图谱分析

通过知识图谱相关技术从招股书、年报、公司公告、券商研究报告、新闻等半结构化表格和非结构化文本数据中批量自动抽取公司的股东、子公司、供应商、客户、合作伙伴、竞争对手等信息,构建出公司的知识图谱。

关系可以是企业的上下游、合作、竞争对手、子母公司、投资、对标等关系,可以是高管与企业间的任职等关系,也可以是行业间的逻辑关系,实体则是投资机构、投资人、企业等等,把它们用知识图谱表示出来,从而进行更深入的知识推理。

在某个宏观经济事件或者企业相关事件发生的时候,券商分析师、交易员、基金公司基金经理等投资研究人员可以通过此图谱做更深层次的分析和更好的投资决策,比如在美国限制向中兴通讯出口的消息发布之后,如果我们有中兴通讯的客户供应商、合作伙伴以及竞争对手的关系图谱,就能在中兴通讯停牌的情况下快速地筛选出受影响的国际国内上市公司从而挖掘投资机会或者进行投资组合风险控制。

某公司打算借壳上市,通过知识图谱相关技术寻找相关联的公司,找到有可能的潜在借壳对象。

1.2.1.2.5 Event-Driven Strategies
1.2.1.2.5.1 Goal:

Detect event from announcement, predict stock price.

1.2.1.2.5.2 events:
  • Earnings Releases:

Corporate earnings tend to move markets when they come in above or below the market’s expectations, which means that it’s important for active traders to understand the expected figures beforehand.

  • Mergers & Acquisitions:

M&A tends to produce dramatic increases or decreases in share prices depending on the terms of the deal, while creating an opportunity for arbitrage strategies between the buyer and seller.

  • Spin-Offs:

Spin-offs tend to see an initial decline in share price as institutional investors who received shares sell off their stake to comply with regulatory requirements or other rules, thereby creating opportunities for traders.

1.2.1.2.5.3 Tool:

Named Entity Recognization, Entity Relation Extraction, Recurrent Neural Networks, CNN.

1.2.2 Overview Steps:

  • 数据爬虫 -> 数据清洗(干净数据) -> 语义分析, 命名实体识别(识别金融实体、实体提取及消歧、关系提取,分区语义网络) -> 文档树/表 -> 图谱(根据业务需要,定义并识别金融实体间的各种关系,进而生成知识图谱) -> 本体,本体存储 -> 语用分析 -> 分析推理,逻辑(定义并表达业务逻辑,通过在知识图谱上实现各种具体任务来体现数据价值,如推理等,实现数据到智能的升华。)
  • Pipeline: choose category and depth in GS skill -> return pages GID -> fetch paper via GID in python -> text processing -> word embedding models, entity extraction, classification, topic extraction, relation extraction, sequence to sequenc, sentiment analysis -> help users to select X,y.

1.2.3 Data

1.2.3.1 Text Labeled with (semi) structured data

  • [X] wiki page titles and page text, wiki category
  • [ ] company filings text, filing classification, event time series data (attributes manually extracted)
  • [ ] finance conference scripts.
  • [ ] corporate telephone comference notes, memo.
  • [ ] company filings text, company industry classification
  • [ ] textbook or CFA chapter name, chapter exercise questions, multiple choice questions
  • [ ] SSRN paper keyword, category, title, abstract, data, model and conclusion

1.2.3.2 Text Unlabeled

  • [ ] analyst research reports, analyst research reports, report classification, analyst ranking
  • [ ] textbooks

About

projects about NLP knowledge graph, web crawling, word embedding, entity&relation extraction.


Languages

Language:Jupyter Notebook 91.8%Language:Python 7.6%Language:C 0.2%Language:HTML 0.2%Language:CSS 0.0%Language:Shell 0.0%Language:Perl 0.0%Language:Julia 0.0%Language:Dockerfile 0.0%Language:MATLAB 0.0%Language:PowerShell 0.0%Language:Makefile 0.0%Language:Batchfile 0.0%