├── news_spider
├── travelspider
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── items.cpython-36.pyc
│ │ ├── __init__.cpython-36.pyc
│ │ ├── settings.cpython-36.pyc
│ │ └── pipelines.cpython-36.pyc
│ ├── spiders
│ │ ├── __pycache__
│ │ │ ├── __init__.cpython-36.pyc
│ │ │ └── travel_spider.cpython-36.pyc
│ │ ├── __init__.py
│ │ └── travel_spider.py
│ ├── items.py
│ ├── pipelines.py
│ ├── settings.py
│ └── middlewares.py
├── .idea
│ ├── modules.xml
│ ├── travelspider.iml
│ ├── misc.xml
│ └── workspace.xml
└── scrapy.cfg
├── image
├── all.png
├── book.png
├── food.png
├── graph.png
├── plane.png
└── train.png
├── .gitattributes
├── .idea
├── vcs.xml
├── modules.xml
├── SequentialEventGraph.iml
├── misc.xml
└── workspace.xml
├── event_graph
├── event_extract.py
├── event_graph.py
├── sentence_parser.py
├── VIS
│ └── dist
│ │ ├── vis.min.css
│ │ └── vis.css
└── travel_event_graph.html
└── README.md
/news_spider/travelspider/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/image/all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/image/all.png
--------------------------------------------------------------------------------
/image/book.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/image/book.png
--------------------------------------------------------------------------------
/image/food.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/image/food.png
--------------------------------------------------------------------------------
/image/graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/image/graph.png
--------------------------------------------------------------------------------
/image/plane.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/image/plane.png
--------------------------------------------------------------------------------
/image/train.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/image/train.png
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=Python
2 | *.css linguist-language=Python
3 | *.html linguist-language=Python
4 |
--------------------------------------------------------------------------------
/news_spider/travelspider/__pycache__/items.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/news_spider/travelspider/__pycache__/items.cpython-36.pyc
--------------------------------------------------------------------------------
/news_spider/travelspider/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/news_spider/travelspider/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/news_spider/travelspider/__pycache__/settings.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/news_spider/travelspider/__pycache__/settings.cpython-36.pyc
--------------------------------------------------------------------------------
/news_spider/travelspider/__pycache__/pipelines.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/news_spider/travelspider/__pycache__/pipelines.cpython-36.pyc
--------------------------------------------------------------------------------
/news_spider/travelspider/spiders/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/news_spider/travelspider/spiders/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/news_spider/travelspider/spiders/__pycache__/travel_spider.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/liuhuanyong/SequentialEventExtration/HEAD/news_spider/travelspider/spiders/__pycache__/travel_spider.cpython-36.pyc
--------------------------------------------------------------------------------
/news_spider/travelspider/spiders/__init__.py:
--------------------------------------------------------------------------------
1 | # This package will contain the spiders of your Scrapy project
2 | #
3 | # Please refer to the documentation for information on how to create and manage
4 | # your spiders.
5 |
--------------------------------------------------------------------------------
/news_spider/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/news_spider/scrapy.cfg:
--------------------------------------------------------------------------------
1 | # Automatically created by: scrapy startproject
2 | #
3 | # For more information about the [deploy] section see:
4 | # https://scrapyd.readthedocs.io/en/latest/deploy.html
5 |
6 | [settings]
7 | default = travelspider.settings
8 |
9 | [deploy]
10 | #url = http://localhost:6800/
11 | project = travelspider
12 |
--------------------------------------------------------------------------------
/.idea/SequentialEventGraph.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/news_spider/travelspider/items.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Define here the models for your scraped items
4 | #
5 | # See documentation in:
6 | # https://doc.scrapy.org/en/latest/topics/items.html
7 |
8 | import scrapy
9 |
10 |
11 | class TravelspiderItem(scrapy.Item):
12 | # define the fields for your item here like:
13 | # name = scrapy.Field()
14 | title = scrapy.Field()
15 | url = scrapy.Field()
16 | content = scrapy.Field()
17 |
18 |
19 |
--------------------------------------------------------------------------------
/news_spider/.idea/travelspider.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/news_spider/travelspider/pipelines.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Define your item pipelines here
4 | #
5 | # Don't forget to add your pipeline to the ITEM_PIPELINES setting
6 | # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
7 |
8 | import pymongo
9 |
10 | class TravelspiderPipeline(object):
11 | def __init__(self):
12 | conn = pymongo.MongoClient()
13 | self.col = conn['travel']['doc2']
14 |
15 | '''处理采集资讯, 存储至Mongodb数据库'''
16 | def process_item(self, item, spider):
17 | try:
18 | self.col.insert(dict(item))
19 | except (pymongo.errors.WriteError, KeyError) as err:
20 | raise DropItem("Duplicated Item: {}".format(item['name']))
21 | return item
22 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/news_spider/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/news_spider/travelspider/spiders/travel_spider.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | import scrapy
3 | from urllib import request
4 | import pymongo
5 | from lxml import etree
6 | from travelspider.items import TravelspiderItem
7 |
8 | class TravelSpider(scrapy.Spider):
9 | name = 'travel'
10 | '''资讯采集主控函数'''
11 | def start_requests(self):
12 | for index in range(1, 505831):
13 | url = 'http://you.ctrip.com/travels/china110000/t3-p%s.html'%index
14 | response = request.urlopen(url)
15 | page = response.read().decode('utf-8')
16 | urls = self.get_urls(page)
17 | if urls:
18 | for url in urls:
19 | try:
20 | print(url)
21 | param = {'url': url}
22 | yield scrapy.Request(url=url, meta=param, callback=self.page_parser, dont_filter=True)
23 | except:
24 | pass
25 |
26 | '''获取url列表'''
27 | def get_urls(self, content):
28 | selector = etree.HTML(content)
29 | urls = ['http://you.ctrip.com' + i for i in selector.xpath('//a[starts-with(@class,"journal-item")]/@href')]
30 | return set(urls)
31 |
32 | '''网页解析'''
33 | def page_parser(self, response):
34 | selector = etree.HTML(response.text)
35 | title = selector.xpath('//title/text()')[0]
36 | paras = [p.xpath('string(.)').replace('\xa0', '') for p in selector.xpath('//div[@class="ctd_content"]/p') if
37 | p.xpath('string(.)').replace('\xa0', '')]
38 | if not paras:
39 | paras = [p.xpath('string(.)').replace('\xa0', '') for p in
40 | selector.xpath('//div[@class="ctd_content wtd_content"]/p') if
41 | p.xpath('string(.)').replace('\xa0', '')]
42 | if not paras:
43 | paras = [p.xpath('string(.)').replace('\xa0', '') for p in selector.xpath('//div[@class="ctd_content"]')]
44 | content = "\n".join([i.replace('\r', '').replace('\n', '') for i in paras])
45 | item = TravelspiderItem()
46 | item['url'] = response.meta['url']
47 | item['title'] = title
48 | item['content'] = content
49 | yield item
50 | return
51 |
--------------------------------------------------------------------------------
/news_spider/travelspider/settings.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Scrapy settings for travelspider project
4 | #
5 | # For simplicity, this file contains only settings considered important or
6 | # commonly used. You can find more settings consulting the documentation:
7 | #
8 | # https://doc.scrapy.org/en/latest/topics/settings.html
9 | # https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
10 | # https://doc.scrapy.org/en/latest/topics/spider-middleware.html
11 |
12 | BOT_NAME = 'travelspider'
13 |
14 | SPIDER_MODULES = ['travelspider.spiders']
15 | NEWSPIDER_MODULE = 'travelspider.spiders'
16 |
17 |
18 | # Crawl responsibly by identifying yourself (and your website) on the user-agent
19 | #USER_AGENT = 'travelspider (+http://www.yourdomain.com)'
20 |
21 | # Obey robots.txt rules
22 | ROBOTSTXT_OBEY = True
23 |
24 | # Configure maximum concurrent requests performed by Scrapy (default: 16)
25 | #CONCURRENT_REQUESTS = 32
26 |
27 | # Configure a delay for requests for the same website (default: 0)
28 | # See https://doc.scrapy.org/en/latest/topics/settings.html#download-delay
29 | # See also autothrottle settings and docs
30 | #DOWNLOAD_DELAY = 3
31 | # The download delay setting will honor only one of:
32 | #CONCURRENT_REQUESTS_PER_DOMAIN = 16
33 | #CONCURRENT_REQUESTS_PER_IP = 16
34 |
35 | # Disable cookies (enabled by default)
36 | #COOKIES_ENABLED = False
37 |
38 | # Disable Telnet Console (enabled by default)
39 | #TELNETCONSOLE_ENABLED = False
40 |
41 | # Override the default request headers:
42 | #DEFAULT_REQUEST_HEADERS = {
43 | # 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
44 | # 'Accept-Language': 'en',
45 | #}
46 |
47 | # Enable or disable spider middlewares
48 | # See https://doc.scrapy.org/en/latest/topics/spider-middleware.html
49 | #SPIDER_MIDDLEWARES = {
50 | # 'travelspider.middlewares.TravelspiderSpiderMiddleware': 543,
51 | #}
52 |
53 | # Enable or disable downloader middlewares
54 | # See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html
55 | #DOWNLOADER_MIDDLEWARES = {
56 | # 'travelspider.middlewares.TravelspiderDownloaderMiddleware': 543,
57 | #}
58 |
59 | # Enable or disable extensions
60 | # See https://doc.scrapy.org/en/latest/topics/extensions.html
61 | #EXTENSIONS = {
62 | # 'scrapy.extensions.telnet.TelnetConsole': None,
63 | #}
64 |
65 | # Configure item pipelines
66 | # See https://doc.scrapy.org/en/latest/topics/item-pipeline.html
67 | ITEM_PIPELINES = {
68 | 'travelspider.pipelines.TravelspiderPipeline': 300,
69 | }
70 |
71 | # Enable and configure the AutoThrottle extension (disabled by default)
72 | # See https://doc.scrapy.org/en/latest/topics/autothrottle.html
73 | #AUTOTHROTTLE_ENABLED = True
74 | # The initial download delay
75 | #AUTOTHROTTLE_START_DELAY = 5
76 | # The maximum download delay to be set in case of high latencies
77 | #AUTOTHROTTLE_MAX_DELAY = 60
78 | # The average number of requests Scrapy should be sending in parallel to
79 | # each remote server
80 | #AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
81 | # Enable showing throttling stats for every response received:
82 | #AUTOTHROTTLE_DEBUG = False
83 |
84 | # Enable and configure HTTP caching (disabled by default)
85 | # See https://doc.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
86 | #HTTPCACHE_ENABLED = True
87 | #HTTPCACHE_EXPIRATION_SECS = 0
88 | #HTTPCACHE_DIR = 'httpcache'
89 | #HTTPCACHE_IGNORE_HTTP_CODES = []
90 | #HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
91 |
--------------------------------------------------------------------------------
/event_graph/event_extract.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # coding: utf-8
3 | # File: pattern.py
4 | # Author: lhy
5 | # Date: 18-7-15
6 |
7 | import pymongo
8 | import re
9 | import jieba
10 | from sentence_parser import *
11 |
12 | class EventGraph:
13 | def __init__(self):
14 | conn = pymongo.MongoClient()
15 | self.pattern = re.compile(r'(.*)(其次|然后|接着|随后|接下来)(.*)')
16 | self.col = conn['travel']['doc']
17 | self.col_insert = conn['travel']['events']
18 | self.parse_handler = LtpParser()
19 |
20 | '''长句切分'''
21 | def seg_long_sents(self, content):
22 | return [sentence for sentence in re.split(r'[??!!。;;::\n\r….·]', content.replace(' ','').replace('\u3000','')) if len(sentence) > 5]
23 |
24 | '''短句切分'''
25 | def process_subsent(self, content):
26 | return [s for s in re.split(r'[,、,和与及且跟()~▲.]', content) if len(s)>1]
27 |
28 | '''处理数据库中的文本'''
29 | def process_doc(self):
30 | count = 0
31 | for item in self.col.find():
32 | content = item['content']
33 | events_all = self.collect_event(content)
34 | if events_all:
35 | data = {}
36 | data['events'] = events_all
37 | self.col_insert.insert(data)
38 | else:
39 | continue
40 |
41 | '''统计收集EVENT'''
42 | def collect_event(self, content):
43 | events_all = []
44 | sents= self.seg_long_sents(content)
45 | for sent in sents:
46 | events = self.event_extract(sent)
47 | if events:
48 | events_all.append(events)
49 | return events_all
50 |
51 | '''顺承事件抽取'''
52 | def event_extract(self, sent):
53 | result = self.pattern.findall(sent)
54 | if result:
55 | event_seqs = []
56 | for tmp in result:
57 | pre = tmp[0]
58 | post = tmp[2]
59 | pre_sents = self.process_subsent(pre)
60 | post_sents = self.process_subsent(post)
61 | if pre_sents and post_sents:
62 | event_seqs += pre_sents
63 | event_seqs += post_sents
64 | else:
65 | continue
66 | '''对事件进行结构化'''
67 | if event_seqs:
68 | events = self.extract_phrase(event_seqs)
69 | return events
70 | else:
71 | pass
72 | return []
73 |
74 |
75 | '''将一个长句中的句子进行分解,提取出其中的vob短语'''
76 | def extract_phrase(self, event_seqs):
77 | events = []
78 | for event in event_seqs:
79 | vobs = self.vob_exract(event)
80 | if vobs:
81 | events += vobs
82 | return events
83 |
84 | '''提取VOB关系'''
85 | def vob_exract(self, content):
86 | vobs = []
87 | words = list(jieba.cut(content))
88 | if len(words) >= 300:
89 | return []
90 | postags = self.parse_handler.get_postag(words)
91 | tuples, child_dict_list = self.parse_handler.parser_main(words, postags)
92 | for tuple in tuples:
93 | rel = tuple[-1]
94 | pos_verb= tuple[4][0]
95 | pos_object = tuple[2][0]
96 | if rel == 'VOB' and (pos_verb, pos_object) in [('v', 'n'), ('v', 'i')]:
97 | phrase = ''.join([tuple[3], '#', tuple[1]])
98 | vobs.append(phrase)
99 | return vobs
100 |
101 | handler = EventGraph()
102 | handler.process_doc()
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # EvolutionaryEventGraph
2 | Evolutionary Event Graph based on Travel note crawled from XieCheng,基于50W携程出行攻略的顺承事件抽取与事件图谱构建.
3 |
4 | # 项目来源
5 | 目前,以谓词性短语作为事件表示的方法方兴未艾,针对特定领域,构建起特定领域的顺承事件图谱,可以支持事件推理,基于事件的意图识别与推荐等多项运用.
6 | 本项目将从出行领域展开进行实验.
7 |
8 | # 项目构成
9 | 本项目由两个部分的组成,具体包括语料的获取以及基于语料的事件挖掘两个部分,具体项目目录包括:
10 | news_spider:基于scrapy的游记采集脚本
11 | event_graph:基于依存句法与顺承模式的顺承事件抽取脚
12 | image:游记顺承事件图谱效果图
13 |
14 | # 一 出行领域语料的获取
15 | 1) 语料来源:携程出行攻略
16 | 2) 时间范围:2018年7月14日之前
17 | 3) 采集方式:使用scrapy编写爬虫脚本进行抓取
18 | 4) 采集规模:共采集505767篇,量级50W
19 | 5) 采集脚本目录:news_spider/travelspider
20 | 6) 语料举例:
21 |
22 | 107330 一路向南——第二篇相逢南通(自驾游) - 游记攻略【携程攻略】
23 | 107331 彩云之南—云上的蜜月之旅 - 丽江游记攻略【携程攻略】
24 | 107332 甘肃游记之玛曲郎木寺 - 碌曲游记攻略【携程攻略】
25 | 107333 拍客白沙行 - 舟山游记攻略【携程攻略】
26 | 107334 九华山-沐浴在佛恩下的XXX - 九华山游记攻略【携程攻略】
27 | 107335 垦丁夏季活动 - 垦丁游记攻略【携程攻略】
28 | 107336 行走在台湾(向隅版)---世外桃源之我们的家(九份民宿) - 九份游记攻略【携程攻略】
29 | 107337 卫赛节马来西亚行 - 马六甲州游记攻略【携程攻略】
30 | 107338 蓝天下的嘉峪关 - 嘉峪关游记攻略【携程攻略】
31 | 107339 人生一定要登一次雪山---都日峰 - 四川游记攻略【携程攻略】
32 | 107340 八月,青海湖不远 - 海北游记攻略【携程攻略】
33 | 107341 #冬季北京# 帝都极冷天去首富的酒店避避寒 - 北京游记攻略【携程攻略】
34 | 107342 圣地西藏 - 青海湖游记攻略【携程攻略】
35 | 107343 孩子,妈妈想让你见识更多的繁华世界 - 深圳游记攻略【携程攻略】
36 | 107344 顶级奢华,舍我其谁! - 澳门游记攻略【携程攻略】
37 | 107345 旅行、不需要走远!美景就在身边 - 江门游记攻略【携程攻略】
38 | 107346 安安静静,不言不语都是好风景 - 厦门游记攻略【携程攻略】
39 | 107347 邂逅则天故里 行走美丽利州 体验师带你看中国女儿节 - 广元游记攻略【携程攻略】
40 | 107348 台湾,可以这样玩--15日环岛自由行全记录 - 台北游记攻略【携程攻略】
41 | 107349 让我记忆深刻的厦门--详细版 - 厦门游记攻略【携程攻略】
42 | 107350 上海地鐵站 - 上海游记攻略【携程攻略】
43 | 107351 逃离雾霾,带着“马拉多纳”去腾冲 - 腾冲游记攻略【携程攻略】
44 | 107352 在我心上用力地开一 - 四川游记攻略【携程攻略】
45 | 107353 冬季到鄱阳湖边的余干县看鸟,多张美图记录环湖游全过程 - 余干游记攻略【携程攻略】
46 | 107354 2014.十一沈阳,本溪老边沟,枫叶大道,丹东,不走重复路,古迹,景色5日穷游 - 沈阳游记攻略【携程攻略】
47 | 107355 库不齐老牛湾之户外行走 - 库布齐沙漠游记攻略【携程攻略】
48 |
49 | # 二 基于出行语料的顺承事件图谱构建
50 | # 1, 顺承事件的抽取
51 | event_extract.py, 思想步骤如下:
52 | 1) 输入游记文本
53 | 2) 对游记进行长句切分
54 | 3) 基于构造的顺承关系模板,进行顺承前后部分提取, 转入4)
55 | 4) 对3)得到的部分进行短句处理,转入5)
56 | 5) 对4)得到的短句进行谓词性短语提取
57 | 6) 对5)得到的谓词性短语向上汇聚,得到一个长句的谓词性短语有序集合
58 | 7) 对6)步骤得到的谓词性短语集合,以滑窗方式构造顺承关系事件对
59 | 8) 对步骤7)得到的顺承事件对进行汇总,最终得到顺承事件库
60 | 9) 对8)进行事件进行整合,去除过低频次的事件,构造标准顺承关系库
61 |
62 | # 2, 顺承事件图谱的展示
63 | 10)使用VIS插件进行顺承关系图谱构建与展示, event_graph.py
64 | 11)由于VIS作为一个封装的JS库,因此生成的顺承图谱在项目中暂时设置到500,见travel_event_graph.html
65 |
66 | # 三 顺承关系图谱效果
67 | # 1) 总体图谱样式
68 | 以500个顺承事件, 进行顺承事件图谱展示,结果是一张事件网络,这是一个大的顺承关系图谱,由众多小子图谱构成
69 | 
70 | # 2) 去丽江子图谱
71 | 该子图谱围绕"去丽江旅游"这一出行事件为核心形成的事件群:
72 | 
73 | # 3) 飞机路线子图谱
74 | 该子图谱显示了选择飞机进行出行形成的事件序列
75 | 
76 | # 4) 火车路线子图谱
77 | 该子图谱显示了选择火车进行出行形成的事件序列
78 | 
79 | # 5) 订酒店事件图谱
80 | 该子图谱描述了一个"预定酒店不愉快事件",从预定到失望到总结,在这条顺承事件链表现出来
81 | 
82 | # 6) 做饭事件图谱
83 | 该子图谱表示了一个"做饭"场景下的顺承事件,感觉也很有意思
84 | 
85 |
86 | # 总结
87 | 1) 该项目只是一个基于50W文章领域语料,运用简单提取方式形成的顺承关系图谱demo,还有很多不足
88 | 2) 该项目目前是形成了事件节点为326781个, 顺承事件对为543580条,分别为30W和50W的图谱规模
89 | 3) 对于谓词性短语进行事件表示是事件表示的一种方式,本方法只采用VOB关系进行提取,这种方式还有待改进
90 | 4) 以3)得到的结果中,还存在大量噪声,这一方面准确率受依存句法的准确性限制,另一方面该依存关系可能还相对单一,不够准确
91 | 5) 在构造顺承事件序列的方法,本项目采用的是长句为单位下的滑窗方式进行构造,这个方式还有待改进
92 | 6) 基于目前形成的顺承关系图谱还有待于进一步挖掘,可以在此基础上完成更多有价值的信息挖掘
93 |
94 |
95 | # contact
96 | 如有自然语言处理、知识图谱、事理图谱、社会计算、语言资源建设等问题或合作,请联系我:
97 | 邮箱:lhy_in_blcu@126.com
98 | csdn:https://blog.csdn.net/lhy2014
99 | 我的自然语言处理项目: https://liuhuanyong.github.io/
100 | 刘焕勇,中国科学院软件研究所
101 |
--------------------------------------------------------------------------------
/news_spider/travelspider/middlewares.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Define here the models for your spider middleware
4 | #
5 | # See documentation in:
6 | # https://doc.scrapy.org/en/latest/topics/spider-middleware.html
7 |
8 | from scrapy import signals
9 |
10 |
11 | class TravelspiderSpiderMiddleware(object):
12 | # Not all methods need to be defined. If a method is not defined,
13 | # scrapy acts as if the spider middleware does not modify the
14 | # passed objects.
15 |
16 | @classmethod
17 | def from_crawler(cls, crawler):
18 | # This method is used by Scrapy to create your spiders.
19 | s = cls()
20 | crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
21 | return s
22 |
23 | def process_spider_input(self, response, spider):
24 | # Called for each response that goes through the spider
25 | # middleware and into the spider.
26 |
27 | # Should return None or raise an exception.
28 | return None
29 |
30 | def process_spider_output(self, response, result, spider):
31 | # Called with the results returned from the Spider, after
32 | # it has processed the response.
33 |
34 | # Must return an iterable of Request, dict or Item objects.
35 | for i in result:
36 | yield i
37 |
38 | def process_spider_exception(self, response, exception, spider):
39 | # Called when a spider or process_spider_input() method
40 | # (from other spider middleware) raises an exception.
41 |
42 | # Should return either None or an iterable of Response, dict
43 | # or Item objects.
44 | pass
45 |
46 | def process_start_requests(self, start_requests, spider):
47 | # Called with the start requests of the spider, and works
48 | # similarly to the process_spider_output() method, except
49 | # that it doesn’t have a response associated.
50 |
51 | # Must return only requests (not items).
52 | for r in start_requests:
53 | yield r
54 |
55 | def spider_opened(self, spider):
56 | spider.logger.info('Spider opened: %s' % spider.name)
57 |
58 |
59 | class TravelspiderDownloaderMiddleware(object):
60 | # Not all methods need to be defined. If a method is not defined,
61 | # scrapy acts as if the downloader middleware does not modify the
62 | # passed objects.
63 |
64 | @classmethod
65 | def from_crawler(cls, crawler):
66 | # This method is used by Scrapy to create your spiders.
67 | s = cls()
68 | crawler.signals.connect(s.spider_opened, signal=signals.spider_opened)
69 | return s
70 |
71 | def process_request(self, request, spider):
72 | # Called for each request that goes through the downloader
73 | # middleware.
74 |
75 | # Must either:
76 | # - return None: continue processing this request
77 | # - or return a Response object
78 | # - or return a Request object
79 | # - or raise IgnoreRequest: process_exception() methods of
80 | # installed downloader middleware will be called
81 | return None
82 |
83 | def process_response(self, request, response, spider):
84 | # Called with the response returned from the downloader.
85 |
86 | # Must either;
87 | # - return a Response object
88 | # - return a Request object
89 | # - or raise IgnoreRequest
90 | return response
91 |
92 | def process_exception(self, request, exception, spider):
93 | # Called when a download handler or a process_request()
94 | # (from other downloader middleware) raises an exception.
95 |
96 | # Must either:
97 | # - return None: continue processing this exception
98 | # - return a Response object: stops process_exception() chain
99 | # - return a Request object: stops process_exception() chain
100 | pass
101 |
102 | def spider_opened(self, spider):
103 | spider.logger.info('Spider opened: %s' % spider.name)
104 |
--------------------------------------------------------------------------------
/event_graph/event_graph.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # coding: utf-8
3 | # File: event_graph.py
4 | # Author: lhy
5 | # Date: 18-7-20
6 |
7 |
8 | '''构造显示图谱'''
9 | class CreatePage:
10 | def __init__(self):
11 | self.base = '''
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
59 |
60 |
61 | '''
62 |
63 | '''生成数据'''
64 | def collect_data(self, nodes, edges):
65 | node_dict = {node:index for index, node in enumerate(nodes)}
66 | data_nodes= []
67 | data_edges = []
68 | for node, id in node_dict.items():
69 | data = {}
70 | data["group"] = 'Event'
71 | data["id"] = id
72 | data["label"] = node
73 | data_nodes.append(data)
74 |
75 | for edge in edges:
76 | data = {}
77 | data['from'] = node_dict.get(edge[0])
78 | data['label'] = '顺承'
79 | data['to'] = node_dict.get(edge[1])
80 | data_edges.append(data)
81 | return data_nodes, data_edges
82 |
83 | '''生成html文件'''
84 | def create_html(self, data_nodes, data_edges):
85 | f = open('travel_event_graph.html', 'w+')
86 | html = self.base.replace('data_nodes', str(data_nodes)).replace('data_edges', str(data_edges))
87 | f.write(html)
88 | f.close()
89 |
90 | '''顺承关系图谱'''
91 | class EventGraph:
92 | def __init__(self):
93 | self.event_path = './seq_events.txt'
94 |
95 | '''统计事件频次'''
96 | def collect_events(self):
97 | event_dict = {}
98 | node_dict = {}
99 | for line in open('seq_events.txt'):
100 | event = line.strip()
101 | if not event:
102 | continue
103 | nodes = event.split('->')
104 | for node in nodes:
105 | if node not in node_dict:
106 | node_dict[node] = 1
107 | else:
108 | node_dict[node] += 1
109 | if event not in event_dict:
110 | event_dict[event] = 1
111 | else:
112 | event_dict[event] += 1
113 | return event_dict, node_dict
114 |
115 | '''过滤低频事件,构建事件图谱'''
116 | def filter_events(self, event_dict, node_dict):
117 | edges = []
118 | nodes = []
119 | for event in sorted(event_dict.items(), key=lambda asd: asd[1], reverse=True)[:500]:
120 | e1 = event[0].split('->')[0]
121 | e2 = event[0].split('->')[1]
122 | if e1 in node_dict and e2 in node_dict:
123 | nodes.append(e1)
124 | nodes.append(e2)
125 | edges.append([e1, e2])
126 | else:
127 | continue
128 | return edges, nodes
129 |
130 | '''调用VIS插件,进行事件图谱展示'''
131 | def show_graph(self, edges, nodes):
132 | handler = CreatePage()
133 | data_nodes, data_edges = handler.collect_data(nodes, edges)
134 | handler.create_html(data_nodes, data_edges)
135 |
136 |
137 | handler = EventGraph()
138 | event_dict, node_dict = handler.collect_events()
139 | edges, nodes = handler.filter_events(event_dict, node_dict)
140 | handler.show_graph(edges, nodes)
141 |
--------------------------------------------------------------------------------
/event_graph/sentence_parser.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # coding: utf-8
3 | # File: sentence_parser.py
4 | # Author: lhy
5 | # Date: 18-3-10
6 | import os
7 | from pyltp import Segmentor, Postagger, Parser, NamedEntityRecognizer
8 |
9 | class LtpParser():
10 | def __init__(self):
11 | LTP_DIR = "./ltp_data"
12 | self.segmentor = Segmentor()
13 | self.segmentor.load(os.path.join(LTP_DIR, "cws.model"))
14 |
15 | self.postagger = Postagger()
16 | self.postagger.load(os.path.join(LTP_DIR, "pos.model"))
17 |
18 | self.parser = Parser()
19 | self.parser.load(os.path.join(LTP_DIR, "parser.model"))
20 |
21 | self.recognizer = NamedEntityRecognizer()
22 | self.recognizer.load(os.path.join(LTP_DIR, "ner.model"))
23 |
24 | '''ltp基本操作'''
25 | def basic_parser(self, words):
26 | postags = list(self.postagger.postag(words))
27 | netags = self.recognizer.recognize(words, postags)
28 | return postags, netags
29 |
30 | '''ltp获取词性'''
31 | def get_postag(self, words):
32 | return list(self.postagger.postag(words))
33 |
34 | '''基于实体识别结果,整理输出实体列表'''
35 | def format_entity(self, words, netags, postags):
36 | name_entity_dist = {}
37 | name_entity_list = []
38 | place_entity_list = []
39 | organization_entity_list = []
40 | ntag_E_Nh = ""
41 | ntag_E_Ni = ""
42 | ntag_E_Ns = ""
43 | index = 0
44 | for item in zip(words, netags):
45 | word = item[0]
46 | ntag = item[1]
47 | if ntag[0] != "O":
48 | if ntag[0] == "S":
49 | if ntag[-2:] == "Nh":
50 | name_entity_list.append(word+'_%s ' % index)
51 | elif ntag[-2:] == "Ni":
52 | organization_entity_list.append(word+'_%s ' % index)
53 | else:
54 | place_entity_list.append(word + '_%s ' % index)
55 | elif ntag[0] == "B":
56 | if ntag[-2:] == "Nh":
57 | ntag_E_Nh = ntag_E_Nh + word + '_%s ' % index
58 | elif ntag[-2:] == "Ni":
59 | ntag_E_Ni = ntag_E_Ni + word + '_%s ' % index
60 | else:
61 | ntag_E_Ns = ntag_E_Ns + word + '_%s ' % index
62 | elif ntag[0] == "I":
63 | if ntag[-2:] == "Nh":
64 | ntag_E_Nh = ntag_E_Nh + word + '_%s ' % index
65 | elif ntag[-2:] == "Ni":
66 | ntag_E_Ni = ntag_E_Ni + word + '_%s ' % index
67 | else:
68 | ntag_E_Ns = ntag_E_Ns + word + '_%s ' % index
69 | else:
70 | if ntag[-2:] == "Nh":
71 | ntag_E_Nh = ntag_E_Nh + word + '_%s ' % index
72 | name_entity_list.append(ntag_E_Nh)
73 | ntag_E_Nh = ""
74 | elif ntag[-2:] == "Ni":
75 | ntag_E_Ni = ntag_E_Ni + word + '_%s ' % index
76 | organization_entity_list.append(ntag_E_Ni)
77 | ntag_E_Ni = ""
78 | else:
79 | ntag_E_Ns = ntag_E_Ns + word + '_%s ' % index
80 | place_entity_list.append(ntag_E_Ns)
81 | ntag_E_Ns = ""
82 | index += 1
83 | name_entity_dist['nhs'] = self.modify_entity(name_entity_list, words, postags, 'nh')
84 | name_entity_dist['nis'] = self.modify_entity(organization_entity_list, words, postags, 'ni')
85 | name_entity_dist['nss'] = self.modify_entity(place_entity_list,words, postags, 'ns')
86 | return name_entity_dist
87 |
88 | '''entity修正,为rebuild_wordspostags做准备'''
89 | def modify_entity(self, entity_list, words, postags, tag):
90 | entity_modify = []
91 | if entity_list:
92 | for entity in entity_list:
93 | entity_dict = {}
94 | subs = entity.split(' ')[:-1]
95 | start_index = subs[0].split('_')[1]
96 | end_index = subs[-1].split('_')[1]
97 | entity_dict['stat_index'] = start_index
98 | entity_dict['end_index'] = end_index
99 | if start_index == entity_dict['end_index']:
100 | consist = [words[int(start_index)] + '/' + postags[int(start_index)]]
101 | else:
102 | consist = [words[index] + '/' + postags[index] for index in range(int(start_index), int(end_index)+1)]
103 | entity_dict['consist'] = consist
104 | entity_dict['name'] = ''.join(tmp.split('_')[0] for tmp in subs) + '/' + tag
105 | entity_modify.append(entity_dict)
106 | return entity_modify
107 |
108 | '''基于命名实体识别,修正words,postags'''
109 | def rebuild_wordspostags(self, name_entity_dist, words, postags):
110 | pre = ' '.join([item[0] + '/' + item[1] for item in zip(words, postags)])
111 | post = pre
112 | for et, infos in name_entity_dist.items():
113 | if infos:
114 | for info in infos:
115 | post = post.replace(' '.join(info['consist']), info['name'])
116 | post = [word for word in post.split(' ') if len(word.split('/')) == 2 and word.split('/')[0]]
117 | words = [tmp.split('/')[0] for tmp in post]
118 | postags = [tmp.split('/')[1] for tmp in post]
119 |
120 | return words, postags
121 |
122 | '''依存关系格式化'''
123 | def syntax_parser(self, words, postags):
124 | arcs = self.parser.parse(words, postags)
125 | words = ['Root'] + words
126 | postags = ['w'] + postags
127 | tuples = list()
128 | for index in range(len(words)-1):
129 | arc_index = arcs[index].head
130 | arc_relation = arcs[index].relation
131 | tuples.append([index+1, words[index+1], postags[index+1], words[arc_index], postags[arc_index], arc_index, arc_relation])
132 |
133 | return tuples
134 |
135 | '''为句子中的每个词语维护一个保存句法依存儿子节点的字典'''
136 | def build_parse_child_dict(self, words, postags, tuples):
137 | child_dict_list = list()
138 | for index, word in enumerate(words):
139 | child_dict = dict()
140 | for arc in tuples:
141 | if arc[3] == word:
142 | if arc[-1] in child_dict:
143 | child_dict[arc[-1]].append(arc)
144 | else:
145 | child_dict[arc[-1]] = []
146 | child_dict[arc[-1]].append(arc)
147 | child_dict_list.append([word, postags[index], index, child_dict])
148 |
149 | return child_dict_list
150 |
151 | '''parser主函数'''
152 | def parser_main(self, words, postags):
153 | tuples = self.syntax_parser(words, postags)
154 | child_dict_list = self.build_parse_child_dict(words, postags, tuples)
155 | return tuples, child_dict_list
156 |
157 | '''基础语言分析'''
158 | def basic_process(self, sentence):
159 | words = list(self.segmentor.segment(sentence))
160 | postags, netags = self.basic_parser(words)
161 | name_entity_dist = self.format_entity(words, netags, postags)
162 | words, postags = self.rebuild_wordspostags(name_entity_dist, words, postags)
163 | return words, postags
164 |
165 |
166 |
--------------------------------------------------------------------------------
/event_graph/VIS/dist/vis.min.css:
--------------------------------------------------------------------------------
1 | .vis-background,.vis-labelset,.vis-timeline{overflow:hidden}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*=span]{min-height:0;width:auto}div.vis-configuration{position:relative;display:block;float:left;font-size:9pt}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:90pt;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:75pt}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;height:13px;padding:1px;margin:0;pointer-events:none}.vis-panel,.vis-timeline{padding:0;box-sizing:border-box}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:transparent;width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:-moz-linear-gradient(top,#3876c2 0,#385380 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3876c2),color-stop(100%,#385380));background:-webkit-linear-gradient(top,#3876c2 0,#385380 100%);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(to bottom,#3876c2 0,#385380 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380', GradientType=0 );box-shadow:#111927 0 0 1px 0;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:-moz-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#9d9d9d),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8', GradientType=0 )}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:none;height:1pc;width:1pc;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:#fff solid 1px;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:1pc;width:1pc;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:rgba(136,183,213,0);border-left-color:rgba(57,76,89,.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0);border-left-color:#f2faff;border-width:9pt;margin-top:-9pt}.vis-timeline{position:relative;border:1px solid #bfbfbf;margin:0}.vis-panel{position:absolute;margin:0}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right,.vis-panel.vis-top{border:1px #bfbfbf}.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right{border-top-style:solid;border-bottom-style:solid;overflow:hidden}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-top{border-left-style:solid;border-right-style:solid}.vis-panel>.vis-content{position:relative}.vis-panel .vis-shadow{position:absolute;width:100%;height:1px;box-shadow:0 0 10px rgba(0,0,0,.8)}.vis-itemset,.vis-labelset,.vis-labelset .vis-label{position:relative;box-sizing:border-box}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-labelset .vis-label{left:0;top:0;width:100%;color:#4d4d4d;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label.draggable{cursor:pointer}.vis-labelset .vis-label:last-child{border-bottom:none}.vis-labelset .vis-label .vis-inner{display:inline-block;padding:5px}.vis-labelset .vis-label .vis-inner.vis-hidden{padding:0}.vis-itemset{padding:0;margin:0}.vis-itemset .vis-background,.vis-itemset .vis-foreground{position:absolute;width:100%;height:100%;overflow:visible}.vis-axis{position:absolute;width:100%;height:0;left:0;z-index:1}.vis-foreground .vis-group{position:relative;box-sizing:border-box;border-bottom:1px solid #bfbfbf}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-item{position:absolute;color:#1A1A1A;border-color:#97B0F8;border-width:1px;background-color:#D5DDF6;display:inline-block}.vis-item.vis-point.vis-selected,.vis-item.vis-selected{background-color:#FFF785}.vis-item.vis-selected{border-color:#FFC200;z-index:2}.vis-editable.vis-selected{cursor:move}.vis-item.vis-box{text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-point{background:0 0}.vis-item.vis-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis-item.vis-range{border-style:solid;border-radius:2px;box-sizing:border-box}.vis-item.vis-background{border:none;background-color:rgba(213,221,246,.4);box-sizing:border-box;padding:0;margin:0}.vis-item .vis-item-overflow{position:relative;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.vis-item.vis-range .vis-item-content{position:relative;display:inline-block}.vis-item.vis-background .vis-item-content{position:absolute;display:inline-block}.vis-item.vis-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item .vis-item-content{white-space:nowrap;box-sizing:border-box;padding:5px}.vis-item .vis-delete{background:url(img/timeline/delete.png) center no-repeat;position:absolute;width:24px;height:24px;top:-4px;right:-24px;cursor:pointer}.vis-item.vis-range .vis-drag-left{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;left:-4px;cursor:w-resize}.vis-item.vis-range .vis-drag-right{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;right:-4px;cursor:e-resize}.vis-time-axis{position:relative;overflow:hidden}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;overflow:hidden;box-sizing:border-box;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-current-time{background-color:#FF7F6E;width:2px;z-index:1}.vis-custom-time{background-color:#6E94FF;width:2px;cursor:move;z-index:1}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{position:absolute;width:100%;height:0;border-bottom:1px solid}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor{border-color:#e5e5e5}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major{border-color:#bfbfbf}.vis-data-axis .vis-y-axis.vis-major{width:100%;position:absolute;color:#4d4d4d;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-major.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{position:absolute;width:100%;color:#bebebe;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{position:absolute;color:#4d4d4d;white-space:nowrap;bottom:20px;text-align:center}.vis-data-axis .vis-y-axis.vis-title.vis-measure{padding:0;margin:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left bottom;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;-webkit-transform-origin:right bottom;-moz-transform-origin:right bottom;-ms-transform-origin:right bottom;-o-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.vis-legend{background-color:rgba(247,252,255,.65);padding:5px;border:1px solid #b3b3b3;box-shadow:2px 2px 10px rgba(154,154,154,.55)}.vis-legend-text{white-space:nowrap;display:inline-block}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}div.vis-network div.vis-manipulation{border-width:0;border-bottom:1px;border-style:solid;border-color:#d6d9d8;background:#fff;background:-moz-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(48%,#fcfcfc),color-stop(50%,#fafafa),color-stop(100%,#fcfcfc));background:-webkit-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-o-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-ms-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:linear-gradient(to bottom,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc', GradientType=0 );position:absolute;left:0;top:0;width:100%;height:30px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:15px;height:30px}div.vis-network div.vis-close{position:absolute;right:0;top:0;width:30px;height:30px;background-position:20px 3px;background-repeat:no-repeat;background-image:url(img/network/cross.png);cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-close:hover{opacity:.6}div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{position:relative;top:-7px;font-family:verdana;font-size:9pt;-moz-border-radius:15px;border-radius:15px;display:inline-block;background-position:0 0;background-repeat:no-repeat;height:24px;margin:0 0 0 10px;vertical-align:middle;cursor:pointer;padding:0 8px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-manipulation div.vis-button:hover{box-shadow:1px 1px 8px rgba(0,0,0,.2)}div.vis-network div.vis-manipulation div.vis-button:active{box-shadow:1px 1px 8px rgba(0,0,0,.5)}div.vis-network div.vis-manipulation div.vis-button.vis-back{background-image:url(img/network/backIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-none:hover{box-shadow:1px 1px 8px transparent;cursor:default}div.vis-network div.vis-manipulation div.vis-button.vis-none:active{box-shadow:1px 1px 8px transparent}div.vis-network div.vis-manipulation div.vis-button.vis-none{padding:0}div.vis-network div.vis-manipulation div.notification{margin:2px;font-weight:700}div.vis-network div.vis-manipulation div.vis-button.vis-add{background-image:url(img/network/addNodeIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit,div.vis-network div.vis-manipulation div.vis-button.vis-edit{background-image:url(img/network/editIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode{background-color:#fcfcfc;border:1px solid #ccc}div.vis-network div.vis-manipulation div.vis-button.vis-connect{background-image:url(img/network/connectIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-delete{background-image:url(img/network/deleteIcon.png)}div.vis-network div.vis-edit-mode div.vis-label,div.vis-network div.vis-manipulation div.vis-label{margin:0 0 0 23px;line-height:25px}div.vis-network div.vis-manipulation div.vis-separator-line{display:inline-block;width:1px;height:20px;background-color:#bdbdbd;margin:5px 7px 0 15px}div.vis-network-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;font-color:#000;background-color:#f5f4ed;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px rgba(0,0,0,.2);pointer-events:none}div.vis-network div.vis-navigation div.vis-button{width:34px;height:34px;-moz-border-radius:17px;border-radius:17px;position:absolute;display:inline-block;background-position:2px 2px;background-repeat:no-repeat;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-navigation div.vis-button:hover{box-shadow:0 0 3px 3px rgba(56,207,21,.3)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,.95)}div.vis-network div.vis-navigation div.vis-button.vis-up{background-image:url(img/network/upArrow.png);bottom:50px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-down{background-image:url(img/network/downArrow.png);bottom:10px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-left{background-image:url(img/network/leftArrow.png);bottom:10px;left:15px}div.vis-network div.vis-navigation div.vis-button.vis-right{background-image:url(img/network/rightArrow.png);bottom:10px;left:95px}div.vis-network div.vis-navigation div.vis-button.vis-zoomIn{background-image:url(img/network/plus.png);bottom:10px;right:15px}div.vis-network div.vis-navigation div.vis-button.vis-zoomOut{background-image:url(img/network/minus.png);bottom:10px;right:55px}div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends{background-image:url(img/network/zoomExtends.png);bottom:50px;right:15px}div.vis-color-picker{position:absolute;margin-top:-140px;margin-left:30px;width:293px;height:425px;padding:10px;border-radius:15px;background-color:#fff;display:none;box-shadow:rgba(0,0,0,.5) 0 0 10px 0}div.vis-color-picker div.vis-arrow{position:absolute;top:147px;left:5px}div.vis-color-picker div.vis-arrow:after,div.vis-color-picker div.vis-arrow:before{right:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.vis-color-picker div.vis-arrow:after{border-color:rgba(255,255,255,0);border-right-color:#fff;border-width:30px;margin-top:-30px}div.vis-color-picker div.vis-color{position:absolute;width:289px;height:289px;cursor:pointer}div.vis-color-picker div.vis-brightness{position:absolute;top:313px}div.vis-color-picker div.vis-opacity{position:absolute;top:350px}div.vis-color-picker div.vis-selector{position:absolute;top:137px;left:137px;width:15px;height:15px;border-radius:15px;border:1px solid #fff;background:#4c4c4c;background:-moz-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4c4c4c),color-stop(12%,#595959),color-stop(25%,#666),color-stop(39%,#474747),color-stop(50%,#2c2c2c),color-stop(51%,#000),color-stop(60%,#111),color-stop(76%,#2b2b2b),color-stop(91%,#1c1c1c),color-stop(100%,#131313));background:-webkit-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-o-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-ms-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:linear-gradient(to bottom,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313', GradientType=0 )}div.vis-color-picker div.vis-initial-color,div.vis-color-picker div.vis-new-color{width:140px;height:20px;top:380px;font-size:10px;color:rgba(0,0,0,.4);line-height:20px;position:absolute;vertical-align:middle}div.vis-color-picker div.vis-new-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:159px;text-align:right;padding-right:2px}div.vis-color-picker div.vis-initial-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:10px;text-align:left;padding-left:2px}div.vis-color-picker div.vis-label{position:absolute;width:300px;left:10px}div.vis-color-picker div.vis-label.vis-brightness{top:300px}div.vis-color-picker div.vis-label.vis-opacity{top:338px}div.vis-color-picker div.vis-button{position:absolute;width:68px;height:25px;border-radius:10px;vertical-align:middle;text-align:center;line-height:25px;top:410px;border:2px solid #d9d9d9;background-color:#f7f7f7;cursor:pointer}div.vis-color-picker div.vis-button.vis-cancel{left:5px}div.vis-color-picker div.vis-button.vis-load{left:82px}div.vis-color-picker div.vis-button.vis-apply{left:159px}div.vis-color-picker div.vis-button.vis-save{left:236px}div.vis-color-picker input.vis-range{width:290px;height:20px}
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 | 1532078811048
318 |
319 |
320 | 1532078811048
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
--------------------------------------------------------------------------------
/news_spider/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 | 1531534963210
366 |
367 |
368 | 1531534963210
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
--------------------------------------------------------------------------------
/event_graph/VIS/dist/vis.css:
--------------------------------------------------------------------------------
1 | .vis .overlay {
2 | position: absolute;
3 | top: 0;
4 | left: 0;
5 | width: 100%;
6 | height: 100%;
7 |
8 | /* Must be displayed above for example selected Timeline items */
9 | z-index: 10;
10 | }
11 |
12 | .vis-active {
13 | box-shadow: 0 0 10px #86d5f8;
14 | }
15 |
16 | /* override some bootstrap styles screwing up the timelines css */
17 |
18 | .vis [class*="span"] {
19 | min-height: 0;
20 | width: auto;
21 | }
22 |
23 | div.vis-configuration {
24 | position:relative;
25 | display:block;
26 | float:left;
27 | font-size:12px;
28 | }
29 |
30 | div.vis-configuration-wrapper {
31 | display:block;
32 | width:700px;
33 | }
34 |
35 |
36 | div.vis-configuration.vis-config-option-container{
37 | display:block;
38 | width:495px;
39 | background-color: #ffffff;
40 | border:2px solid #f7f8fa;
41 | border-radius:4px;
42 | margin-top:20px;
43 | left:10px;
44 | padding-left:5px;
45 | }
46 |
47 | div.vis-configuration.vis-config-button{
48 | display:block;
49 | width:495px;
50 | height:25px;
51 | vertical-align: middle;
52 | line-height:25px;
53 | background-color: #f7f8fa;
54 | border:2px solid #ceced0;
55 | border-radius:4px;
56 | margin-top:20px;
57 | left:10px;
58 | padding-left:5px;
59 | cursor: pointer;
60 | margin-bottom:30px;
61 | }
62 |
63 | div.vis-configuration.vis-config-button.hover{
64 | background-color: #4588e6;
65 | border:2px solid #214373;
66 | color:#ffffff;
67 | }
68 |
69 | div.vis-configuration.vis-config-item{
70 | display:block;
71 | float:left;
72 | width:495px;
73 | height:25px;
74 | vertical-align: middle;
75 | line-height:25px;
76 | }
77 |
78 |
79 | div.vis-configuration.vis-config-item.vis-config-s2{
80 | left:10px;
81 | background-color: #f7f8fa;
82 | padding-left:5px;
83 | border-radius:3px;
84 | }
85 | div.vis-configuration.vis-config-item.vis-config-s3{
86 | left:20px;
87 | background-color: #e4e9f0;
88 | padding-left:5px;
89 | border-radius:3px;
90 | }
91 | div.vis-configuration.vis-config-item.vis-config-s4{
92 | left:30px;
93 | background-color: #cfd8e6;
94 | padding-left:5px;
95 | border-radius:3px;
96 | }
97 |
98 | div.vis-configuration.vis-config-header{
99 | font-size:18px;
100 | font-weight: bold;
101 | }
102 |
103 | div.vis-configuration.vis-config-label{
104 | width:120px;
105 | height:25px;
106 | line-height: 25px;
107 | }
108 |
109 | div.vis-configuration.vis-config-label.vis-config-s3{
110 | width:110px;
111 | }
112 | div.vis-configuration.vis-config-label.vis-config-s4{
113 | width:100px;
114 | }
115 |
116 | div.vis-configuration.vis-config-colorBlock{
117 | top:1px;
118 | width:30px;
119 | height:19px;
120 | border:1px solid #444444;
121 | border-radius:2px;
122 | padding:0px;
123 | margin:0px;
124 | cursor:pointer;
125 | }
126 |
127 | input.vis-configuration.vis-config-checkbox {
128 | left:-5px;
129 | }
130 |
131 |
132 | input.vis-configuration.vis-config-rangeinput{
133 | position:relative;
134 | top:-5px;
135 | width:60px;
136 | height:13px;
137 | padding:1px;
138 | margin:0;
139 | pointer-events:none;
140 | }
141 |
142 | input.vis-configuration.vis-config-range{
143 | /*removes default webkit styles*/
144 | -webkit-appearance: none;
145 |
146 | /*fix for FF unable to apply focus style bug */
147 | border: 0px solid white;
148 | background-color:rgba(0,0,0,0);
149 |
150 | /*required for proper track sizing in FF*/
151 | width: 300px;
152 | height:20px;
153 | }
154 | input.vis-configuration.vis-config-range::-webkit-slider-runnable-track {
155 | width: 300px;
156 | height: 5px;
157 | background: #dedede; /* Old browsers */
158 | background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */
159 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */
160 | background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */
161 | background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */
162 | background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */
163 | background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */
164 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */
165 |
166 | border: 1px solid #999999;
167 | box-shadow: #aaaaaa 0px 0px 3px 0px;
168 | border-radius: 3px;
169 | }
170 | input.vis-configuration.vis-config-range::-webkit-slider-thumb {
171 | -webkit-appearance: none;
172 | border: 1px solid #14334b;
173 | height: 17px;
174 | width: 17px;
175 | border-radius: 50%;
176 | background: #3876c2; /* Old browsers */
177 | background: -moz-linear-gradient(top, #3876c2 0%, #385380 100%); /* FF3.6+ */
178 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3876c2), color-stop(100%,#385380)); /* Chrome,Safari4+ */
179 | background: -webkit-linear-gradient(top, #3876c2 0%,#385380 100%); /* Chrome10+,Safari5.1+ */
180 | background: -o-linear-gradient(top, #3876c2 0%,#385380 100%); /* Opera 11.10+ */
181 | background: -ms-linear-gradient(top, #3876c2 0%,#385380 100%); /* IE10+ */
182 | background: linear-gradient(to bottom, #3876c2 0%,#385380 100%); /* W3C */
183 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380',GradientType=0 ); /* IE6-9 */
184 | box-shadow: #111927 0px 0px 1px 0px;
185 | margin-top: -7px;
186 | }
187 | input.vis-configuration.vis-config-range:focus {
188 | outline: none;
189 | }
190 | input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track {
191 | background: #9d9d9d; /* Old browsers */
192 | background: -moz-linear-gradient(top, #9d9d9d 0%, #c8c8c8 99%); /* FF3.6+ */
193 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9d9d9d), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */
194 | background: -webkit-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */
195 | background: -o-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* Opera 11.10+ */
196 | background: -ms-linear-gradient(top, #9d9d9d 0%,#c8c8c8 99%); /* IE10+ */
197 | background: linear-gradient(to bottom, #9d9d9d 0%,#c8c8c8 99%); /* W3C */
198 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */
199 | }
200 |
201 | input.vis-configuration.vis-config-range::-moz-range-track {
202 | width: 300px;
203 | height: 10px;
204 | background: #dedede; /* Old browsers */
205 | background: -moz-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* FF3.6+ */
206 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dedede), color-stop(99%,#c8c8c8)); /* Chrome,Safari4+ */
207 | background: -webkit-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* Chrome10+,Safari5.1+ */
208 | background: -o-linear-gradient(top, #dedede 0%, #c8c8c8 99%); /* Opera 11.10+ */
209 | background: -ms-linear-gradient(top, #dedede 0%,#c8c8c8 99%); /* IE10+ */
210 | background: linear-gradient(to bottom, #dedede 0%,#c8c8c8 99%); /* W3C */
211 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8',GradientType=0 ); /* IE6-9 */
212 |
213 | border: 1px solid #999999;
214 | box-shadow: #aaaaaa 0px 0px 3px 0px;
215 | border-radius: 3px;
216 | }
217 | input.vis-configuration.vis-config-range::-moz-range-thumb {
218 | border: none;
219 | height: 16px;
220 | width: 16px;
221 |
222 | border-radius: 50%;
223 | background: #385380;
224 | }
225 |
226 | /*hide the outline behind the border*/
227 | input.vis-configuration.vis-config-range:-moz-focusring{
228 | outline: 1px solid white;
229 | outline-offset: -1px;
230 | }
231 |
232 | input.vis-configuration.vis-config-range::-ms-track {
233 | width: 300px;
234 | height: 5px;
235 |
236 | /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */
237 | background: transparent;
238 |
239 | /*leave room for the larger thumb to overflow with a transparent border */
240 | border-color: transparent;
241 | border-width: 6px 0;
242 |
243 | /*remove default tick marks*/
244 | color: transparent;
245 | }
246 | input.vis-configuration.vis-config-range::-ms-fill-lower {
247 | background: #777;
248 | border-radius: 10px;
249 | }
250 | input.vis-configuration.vis-config-range::-ms-fill-upper {
251 | background: #ddd;
252 | border-radius: 10px;
253 | }
254 | input.vis-configuration.vis-config-range::-ms-thumb {
255 | border: none;
256 | height: 16px;
257 | width: 16px;
258 | border-radius: 50%;
259 | background: #385380;
260 | }
261 | input.vis-configuration.vis-config-range:focus::-ms-fill-lower {
262 | background: #888;
263 | }
264 | input.vis-configuration.vis-config-range:focus::-ms-fill-upper {
265 | background: #ccc;
266 | }
267 |
268 | .vis-configuration-popup {
269 | position: absolute;
270 | background: rgba(57, 76, 89, 0.85);
271 | border: 2px solid #f2faff;
272 | line-height:30px;
273 | height:30px;
274 | width:150px;
275 | text-align:center;
276 | color: #ffffff;
277 | font-size:14px;
278 | border-radius:4px;
279 | -webkit-transition: opacity 0.3s ease-in-out;
280 | -moz-transition: opacity 0.3s ease-in-out;
281 | transition: opacity 0.3s ease-in-out;
282 | }
283 | .vis-configuration-popup:after, .vis-configuration-popup:before {
284 | left: 100%;
285 | top: 50%;
286 | border: solid transparent;
287 | content: " ";
288 | height: 0;
289 | width: 0;
290 | position: absolute;
291 | pointer-events: none;
292 | }
293 |
294 | .vis-configuration-popup:after {
295 | border-color: rgba(136, 183, 213, 0);
296 | border-left-color: rgba(57, 76, 89, 0.85);
297 | border-width: 8px;
298 | margin-top: -8px;
299 | }
300 | .vis-configuration-popup:before {
301 | border-color: rgba(194, 225, 245, 0);
302 | border-left-color: #f2faff;
303 | border-width: 12px;
304 | margin-top: -12px;
305 | }
306 |
307 | .vis-timeline {
308 | position: relative;
309 | border: 1px solid #bfbfbf;
310 |
311 | overflow: hidden;
312 | padding: 0;
313 | margin: 0;
314 |
315 | box-sizing: border-box;
316 | }
317 |
318 |
319 | .vis-panel {
320 | position: absolute;
321 |
322 | padding: 0;
323 | margin: 0;
324 |
325 | box-sizing: border-box;
326 | }
327 |
328 | .vis-panel.vis-center,
329 | .vis-panel.vis-left,
330 | .vis-panel.vis-right,
331 | .vis-panel.vis-top,
332 | .vis-panel.vis-bottom {
333 | border: 1px #bfbfbf;
334 | }
335 |
336 | .vis-panel.vis-center,
337 | .vis-panel.vis-left,
338 | .vis-panel.vis-right {
339 | border-top-style: solid;
340 | border-bottom-style: solid;
341 | overflow: hidden;
342 | }
343 |
344 | .vis-panel.vis-center,
345 | .vis-panel.vis-top,
346 | .vis-panel.vis-bottom {
347 | border-left-style: solid;
348 | border-right-style: solid;
349 | }
350 |
351 | .vis-background {
352 | overflow: hidden;
353 | }
354 |
355 | .vis-panel > .vis-content {
356 | position: relative;
357 | }
358 |
359 | .vis-panel .vis-shadow {
360 | position: absolute;
361 | width: 100%;
362 | height: 1px;
363 | box-shadow: 0 0 10px rgba(0,0,0,0.8);
364 | /* TODO: find a nice way to ensure vis-shadows are drawn on top of items
365 | z-index: 1;
366 | */
367 | }
368 |
369 | .vis-panel .vis-shadow.vis-top {
370 | top: -1px;
371 | left: 0;
372 | }
373 |
374 | .vis-panel .vis-shadow.vis-bottom {
375 | bottom: -1px;
376 | left: 0;
377 | }
378 |
379 | .vis-labelset {
380 | position: relative;
381 |
382 | overflow: hidden;
383 |
384 | box-sizing: border-box;
385 | }
386 |
387 | .vis-labelset .vis-label {
388 | position: relative;
389 | left: 0;
390 | top: 0;
391 | width: 100%;
392 | color: #4d4d4d;
393 |
394 | box-sizing: border-box;
395 | }
396 |
397 | .vis-labelset .vis-label {
398 | border-bottom: 1px solid #bfbfbf;
399 | }
400 |
401 | .vis-labelset .vis-label.draggable {
402 | cursor: pointer;
403 | }
404 |
405 | .vis-labelset .vis-label:last-child {
406 | border-bottom: none;
407 | }
408 |
409 | .vis-labelset .vis-label .vis-inner {
410 | display: inline-block;
411 | padding: 5px;
412 | }
413 |
414 | .vis-labelset .vis-label .vis-inner.vis-hidden {
415 | padding: 0;
416 | }
417 |
418 |
419 | .vis-itemset {
420 | position: relative;
421 | padding: 0;
422 | margin: 0;
423 |
424 | box-sizing: border-box;
425 | }
426 |
427 | .vis-itemset .vis-background,
428 | .vis-itemset .vis-foreground {
429 | position: absolute;
430 | width: 100%;
431 | height: 100%;
432 | overflow: visible;
433 | }
434 |
435 | .vis-axis {
436 | position: absolute;
437 | width: 100%;
438 | height: 0;
439 | left: 0;
440 | z-index: 1;
441 | }
442 |
443 | .vis-foreground .vis-group {
444 | position: relative;
445 | box-sizing: border-box;
446 | border-bottom: 1px solid #bfbfbf;
447 | }
448 |
449 | .vis-foreground .vis-group:last-child {
450 | border-bottom: none;
451 | }
452 |
453 | .vis-overlay {
454 | position: absolute;
455 | top: 0;
456 | left: 0;
457 | width: 100%;
458 | height: 100%;
459 | z-index: 10;
460 | }
461 |
462 | .vis-item {
463 | position: absolute;
464 | color: #1A1A1A;
465 | border-color: #97B0F8;
466 | border-width: 1px;
467 | background-color: #D5DDF6;
468 | display: inline-block;
469 | /*overflow: hidden;*/
470 | }
471 |
472 | .vis-item.vis-selected {
473 | border-color: #FFC200;
474 | background-color: #FFF785;
475 |
476 | /* z-index must be higher than the z-index of custom time bar and current time bar */
477 | z-index: 2;
478 | }
479 |
480 | .vis-editable.vis-selected {
481 | cursor: move;
482 | }
483 |
484 | .vis-item.vis-point.vis-selected {
485 | background-color: #FFF785;
486 | }
487 |
488 | .vis-item.vis-box {
489 | text-align: center;
490 | border-style: solid;
491 | border-radius: 2px;
492 | }
493 |
494 | .vis-item.vis-point {
495 | background: none;
496 | }
497 |
498 | .vis-item.vis-dot {
499 | position: absolute;
500 | padding: 0;
501 | border-width: 4px;
502 | border-style: solid;
503 | border-radius: 4px;
504 | }
505 |
506 | .vis-item.vis-range {
507 | border-style: solid;
508 | border-radius: 2px;
509 | box-sizing: border-box;
510 | }
511 |
512 | .vis-item.vis-background {
513 | border: none;
514 | background-color: rgba(213, 221, 246, 0.4);
515 | box-sizing: border-box;
516 | padding: 0;
517 | margin: 0;
518 | }
519 |
520 | .vis-item .vis-item-overflow {
521 | position: relative;
522 | width: 100%;
523 | height: 100%;
524 | padding: 0;
525 | margin: 0;
526 | overflow: hidden;
527 | }
528 |
529 | .vis-item.vis-range .vis-item-content {
530 | position: relative;
531 | display: inline-block;
532 | }
533 |
534 | .vis-item.vis-background .vis-item-content {
535 | position: absolute;
536 | display: inline-block;
537 | }
538 |
539 | .vis-item.vis-line {
540 | padding: 0;
541 | position: absolute;
542 | width: 0;
543 | border-left-width: 1px;
544 | border-left-style: solid;
545 | }
546 |
547 | .vis-item .vis-item-content {
548 | white-space: nowrap;
549 | box-sizing: border-box;
550 | padding: 5px;
551 | }
552 |
553 | .vis-item .vis-delete {
554 | background: url('img/timeline/delete.png') no-repeat center;
555 | position: absolute;
556 | width: 24px;
557 | height: 24px;
558 | top: -4px;
559 | right: -24px;
560 | cursor: pointer;
561 | }
562 |
563 | .vis-item.vis-range .vis-drag-left {
564 | position: absolute;
565 | width: 24px;
566 | max-width: 20%;
567 | min-width: 2px;
568 | height: 100%;
569 | top: 0;
570 | left: -4px;
571 |
572 | cursor: w-resize;
573 | }
574 |
575 | .vis-item.vis-range .vis-drag-right {
576 | position: absolute;
577 | width: 24px;
578 | max-width: 20%;
579 | min-width: 2px;
580 | height: 100%;
581 | top: 0;
582 | right: -4px;
583 |
584 | cursor: e-resize;
585 | }
586 |
587 | .vis-time-axis {
588 | position: relative;
589 | overflow: hidden;
590 | }
591 |
592 | .vis-time-axis.vis-foreground {
593 | top: 0;
594 | left: 0;
595 | width: 100%;
596 | }
597 |
598 | .vis-time-axis.vis-background {
599 | position: absolute;
600 | top: 0;
601 | left: 0;
602 | width: 100%;
603 | height: 100%;
604 | }
605 |
606 | .vis-time-axis .vis-text {
607 | position: absolute;
608 | color: #4d4d4d;
609 | padding: 3px;
610 | overflow: hidden;
611 | box-sizing: border-box;
612 |
613 | white-space: nowrap;
614 | }
615 |
616 | .vis-time-axis .vis-text.vis-measure {
617 | position: absolute;
618 | padding-left: 0;
619 | padding-right: 0;
620 | margin-left: 0;
621 | margin-right: 0;
622 | visibility: hidden;
623 | }
624 |
625 | .vis-time-axis .vis-grid.vis-vertical {
626 | position: absolute;
627 | border-left: 1px solid;
628 | }
629 |
630 | .vis-time-axis .vis-grid.vis-minor {
631 | border-color: #e5e5e5;
632 | }
633 |
634 | .vis-time-axis .vis-grid.vis-major {
635 | border-color: #bfbfbf;
636 | }
637 |
638 | .vis-current-time {
639 | background-color: #FF7F6E;
640 | width: 2px;
641 | z-index: 1;
642 | }
643 | .vis-custom-time {
644 | background-color: #6E94FF;
645 | width: 2px;
646 | cursor: move;
647 | z-index: 1;
648 | }
649 | .vis-timeline {
650 | /*
651 | -webkit-transition: height .4s ease-in-out;
652 | transition: height .4s ease-in-out;
653 | */
654 | }
655 |
656 | .vis-panel {
657 | /*
658 | -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;
659 | transition: height .4s ease-in-out, top .4s ease-in-out;
660 | */
661 | }
662 |
663 | .vis-axis {
664 | /*
665 | -webkit-transition: top .4s ease-in-out;
666 | transition: top .4s ease-in-out;
667 | */
668 | }
669 |
670 | /* TODO: get animation working nicely
671 |
672 | .vis-item {
673 | -webkit-transition: top .4s ease-in-out;
674 | transition: top .4s ease-in-out;
675 | }
676 |
677 | .vis-item.line {
678 | -webkit-transition: height .4s ease-in-out, top .4s ease-in-out;
679 | transition: height .4s ease-in-out, top .4s ease-in-out;
680 | }
681 | /**/
682 |
683 | .vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal {
684 | position: absolute;
685 | width: 100%;
686 | height: 0;
687 | border-bottom: 1px solid;
688 | }
689 |
690 | .vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor {
691 | border-color: #e5e5e5;
692 | }
693 |
694 | .vis-panel.vis-background.vis-horizontal .vis-grid.vis-major {
695 | border-color: #bfbfbf;
696 | }
697 |
698 |
699 | .vis-data-axis .vis-y-axis.vis-major {
700 | width: 100%;
701 | position: absolute;
702 | color: #4d4d4d;
703 | white-space: nowrap;
704 | }
705 |
706 | .vis-data-axis .vis-y-axis.vis-major.vis-measure {
707 | padding: 0;
708 | margin: 0;
709 | border: 0;
710 | visibility: hidden;
711 | width: auto;
712 | }
713 |
714 |
715 | .vis-data-axis .vis-y-axis.vis-minor {
716 | position: absolute;
717 | width: 100%;
718 | color: #bebebe;
719 | white-space: nowrap;
720 | }
721 |
722 | .vis-data-axis .vis-y-axis.vis-minor.vis-measure {
723 | padding: 0;
724 | margin: 0;
725 | border: 0;
726 | visibility: hidden;
727 | width: auto;
728 | }
729 |
730 | .vis-data-axis .vis-y-axis.vis-title {
731 | position: absolute;
732 | color: #4d4d4d;
733 | white-space: nowrap;
734 | bottom: 20px;
735 | text-align: center;
736 | }
737 |
738 | .vis-data-axis .vis-y-axis.vis-title.vis-measure {
739 | padding: 0;
740 | margin: 0;
741 | visibility: hidden;
742 | width: auto;
743 | }
744 |
745 | .vis-data-axis .vis-y-axis.vis-title.vis-left {
746 | bottom: 0;
747 | -webkit-transform-origin: left top;
748 | -moz-transform-origin: left top;
749 | -ms-transform-origin: left top;
750 | -o-transform-origin: left top;
751 | transform-origin: left bottom;
752 | -webkit-transform: rotate(-90deg);
753 | -moz-transform: rotate(-90deg);
754 | -ms-transform: rotate(-90deg);
755 | -o-transform: rotate(-90deg);
756 | transform: rotate(-90deg);
757 | }
758 |
759 | .vis-data-axis .vis-y-axis.vis-title.vis-right {
760 | bottom: 0;
761 | -webkit-transform-origin: right bottom;
762 | -moz-transform-origin: right bottom;
763 | -ms-transform-origin: right bottom;
764 | -o-transform-origin: right bottom;
765 | transform-origin: right bottom;
766 | -webkit-transform: rotate(90deg);
767 | -moz-transform: rotate(90deg);
768 | -ms-transform: rotate(90deg);
769 | -o-transform: rotate(90deg);
770 | transform: rotate(90deg);
771 | }
772 |
773 | .vis-legend {
774 | background-color: rgba(247, 252, 255, 0.65);
775 | padding: 5px;
776 | border: 1px solid #b3b3b3;
777 | box-shadow: 2px 2px 10px rgba(154, 154, 154, 0.55);
778 | }
779 |
780 | .vis-legend-text {
781 | /*font-size: 10px;*/
782 | white-space: nowrap;
783 | display: inline-block
784 | }
785 | .vis-graph-group0 {
786 | fill:#4f81bd;
787 | fill-opacity:0;
788 | stroke-width:2px;
789 | stroke: #4f81bd;
790 | }
791 |
792 | .vis-graph-group1 {
793 | fill:#f79646;
794 | fill-opacity:0;
795 | stroke-width:2px;
796 | stroke: #f79646;
797 | }
798 |
799 | .vis-graph-group2 {
800 | fill: #8c51cf;
801 | fill-opacity:0;
802 | stroke-width:2px;
803 | stroke: #8c51cf;
804 | }
805 |
806 | .vis-graph-group3 {
807 | fill: #75c841;
808 | fill-opacity:0;
809 | stroke-width:2px;
810 | stroke: #75c841;
811 | }
812 |
813 | .vis-graph-group4 {
814 | fill: #ff0100;
815 | fill-opacity:0;
816 | stroke-width:2px;
817 | stroke: #ff0100;
818 | }
819 |
820 | .vis-graph-group5 {
821 | fill: #37d8e6;
822 | fill-opacity:0;
823 | stroke-width:2px;
824 | stroke: #37d8e6;
825 | }
826 |
827 | .vis-graph-group6 {
828 | fill: #042662;
829 | fill-opacity:0;
830 | stroke-width:2px;
831 | stroke: #042662;
832 | }
833 |
834 | .vis-graph-group7 {
835 | fill:#00ff26;
836 | fill-opacity:0;
837 | stroke-width:2px;
838 | stroke: #00ff26;
839 | }
840 |
841 | .vis-graph-group8 {
842 | fill:#ff00ff;
843 | fill-opacity:0;
844 | stroke-width:2px;
845 | stroke: #ff00ff;
846 | }
847 |
848 | .vis-graph-group9 {
849 | fill: #8f3938;
850 | fill-opacity:0;
851 | stroke-width:2px;
852 | stroke: #8f3938;
853 | }
854 |
855 | .vis-timeline .vis-fill {
856 | fill-opacity:0.1;
857 | stroke: none;
858 | }
859 |
860 |
861 | .vis-timeline .vis-bar {
862 | fill-opacity:0.5;
863 | stroke-width:1px;
864 | }
865 |
866 | .vis-timeline .vis-point {
867 | stroke-width:2px;
868 | fill-opacity:1.0;
869 | }
870 |
871 |
872 | .vis-timeline .vis-legend-background {
873 | stroke-width:1px;
874 | fill-opacity:0.9;
875 | fill: #ffffff;
876 | stroke: #c2c2c2;
877 | }
878 |
879 |
880 | .vis-timeline .vis-outline {
881 | stroke-width:1px;
882 | fill-opacity:1;
883 | fill: #ffffff;
884 | stroke: #e5e5e5;
885 | }
886 |
887 | .vis-timeline .vis-icon-fill {
888 | fill-opacity:0.3;
889 | stroke: none;
890 | }
891 |
892 | div.vis-network div.vis-manipulation {
893 | border-width: 0;
894 | border-bottom: 1px;
895 | border-style:solid;
896 | border-color: #d6d9d8;
897 | background: #ffffff; /* Old browsers */
898 | background: -moz-linear-gradient(top, #ffffff 0%, #fcfcfc 48%, #fafafa 50%, #fcfcfc 100%); /* FF3.6+ */
899 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(48%,#fcfcfc), color-stop(50%,#fafafa), color-stop(100%,#fcfcfc)); /* Chrome,Safari4+ */
900 | background: -webkit-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Chrome10+,Safari5.1+ */
901 | background: -o-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Opera 11.10+ */
902 | background: -ms-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* IE10+ */
903 | background: linear-gradient(to bottom, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* W3C */
904 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */
905 |
906 | position: absolute;
907 | left: 0;
908 | top: 0;
909 | width: 100%;
910 | height: 30px;
911 | }
912 |
913 | div.vis-network div.vis-edit-mode {
914 | position:absolute;
915 | left: 0;
916 | top: 15px;
917 | height: 30px;
918 | }
919 |
920 | /* FIXME: shouldn't the vis-close button be a child of the vis-manipulation div? */
921 |
922 | div.vis-network div.vis-close {
923 | position:absolute;
924 | right: 0;
925 | top: 0;
926 | width: 30px;
927 | height: 30px;
928 |
929 | background-position: 20px 3px;
930 | background-repeat: no-repeat;
931 | background-image: url("img/network/cross.png");
932 | cursor: pointer;
933 | -webkit-touch-callout: none;
934 | -webkit-user-select: none;
935 | -khtml-user-select: none;
936 | -moz-user-select: none;
937 | -ms-user-select: none;
938 | user-select: none;
939 | }
940 |
941 | div.vis-network div.vis-close:hover {
942 | opacity: 0.6;
943 | }
944 |
945 | div.vis-network div.vis-manipulation div.vis-button,
946 | div.vis-network div.vis-edit-mode div.vis-button {
947 | position:relative;
948 | top:-7px;
949 | font-family: verdana;
950 | font-size: 12px;
951 | -moz-border-radius: 15px;
952 | border-radius: 15px;
953 | display:inline-block;
954 | background-position: 0px 0px;
955 | background-repeat:no-repeat;
956 | height:24px;
957 | margin: 0px 0px 0px 10px;
958 | vertical-align:middle;
959 | cursor: pointer;
960 | padding: 0px 8px 0px 8px;
961 | -webkit-touch-callout: none;
962 | -webkit-user-select: none;
963 | -khtml-user-select: none;
964 | -moz-user-select: none;
965 | -ms-user-select: none;
966 | user-select: none;
967 | }
968 |
969 | div.vis-network div.vis-manipulation div.vis-button:hover {
970 | box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.20);
971 | }
972 |
973 | div.vis-network div.vis-manipulation div.vis-button:active {
974 | box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.50);
975 | }
976 |
977 | div.vis-network div.vis-manipulation div.vis-button.vis-back {
978 | background-image: url("img/network/backIcon.png");
979 | }
980 |
981 | div.vis-network div.vis-manipulation div.vis-button.vis-none:hover {
982 | box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0);
983 | cursor: default;
984 | }
985 | div.vis-network div.vis-manipulation div.vis-button.vis-none:active {
986 | box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0);
987 | }
988 | div.vis-network div.vis-manipulation div.vis-button.vis-none {
989 | padding: 0;
990 | }
991 | div.vis-network div.vis-manipulation div.notification {
992 | margin: 2px;
993 | font-weight: bold;
994 | }
995 |
996 | div.vis-network div.vis-manipulation div.vis-button.vis-add {
997 | background-image: url("img/network/addNodeIcon.png");
998 | }
999 |
1000 | div.vis-network div.vis-manipulation div.vis-button.vis-edit,
1001 | div.vis-network div.vis-edit-mode div.vis-button.vis-edit {
1002 | background-image: url("img/network/editIcon.png");
1003 | }
1004 |
1005 | div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode {
1006 | background-color: #fcfcfc;
1007 | border: 1px solid #cccccc;
1008 | }
1009 |
1010 | div.vis-network div.vis-manipulation div.vis-button.vis-connect {
1011 | background-image: url("img/network/connectIcon.png");
1012 | }
1013 |
1014 | div.vis-network div.vis-manipulation div.vis-button.vis-delete {
1015 | background-image: url("img/network/deleteIcon.png");
1016 | }
1017 | /* top right bottom left */
1018 | div.vis-network div.vis-manipulation div.vis-label,
1019 | div.vis-network div.vis-edit-mode div.vis-label {
1020 | margin: 0 0 0 23px;
1021 | line-height: 25px;
1022 | }
1023 | div.vis-network div.vis-manipulation div.vis-separator-line {
1024 | display:inline-block;
1025 | width:1px;
1026 | height:20px;
1027 | background-color: #bdbdbd;
1028 | margin: 5px 7px 0 15px;
1029 | }
1030 |
1031 | /* TODO: is this redundant?
1032 | div.network-navigation_wrapper {
1033 | position: absolute;
1034 | left: 0;
1035 | top: 0;
1036 | width: 100%;
1037 | height: 100%;
1038 | }
1039 | */
1040 | div.vis-network-tooltip {
1041 | position: absolute;
1042 | visibility: hidden;
1043 | padding: 5px;
1044 | white-space: nowrap;
1045 |
1046 | font-family: verdana;
1047 | font-size:14px;
1048 | font-color:#000000;
1049 | background-color: #f5f4ed;
1050 |
1051 | -moz-border-radius: 3px;
1052 | -webkit-border-radius: 3px;
1053 | border-radius: 3px;
1054 | border: 1px solid #808074;
1055 |
1056 | box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
1057 | pointer-events: none;
1058 | }
1059 | div.vis-network div.vis-navigation div.vis-button {
1060 | width:34px;
1061 | height:34px;
1062 | -moz-border-radius: 17px;
1063 | border-radius: 17px;
1064 | position:absolute;
1065 | display:inline-block;
1066 | background-position: 2px 2px;
1067 | background-repeat:no-repeat;
1068 | cursor: pointer;
1069 | -webkit-touch-callout: none;
1070 | -webkit-user-select: none;
1071 | -khtml-user-select: none;
1072 | -moz-user-select: none;
1073 | -ms-user-select: none;
1074 | user-select: none;
1075 | }
1076 |
1077 | div.vis-network div.vis-navigation div.vis-button:hover {
1078 | box-shadow: 0 0 3px 3px rgba(56, 207, 21, 0.30);
1079 | }
1080 |
1081 | div.vis-network div.vis-navigation div.vis-button:active {
1082 | box-shadow: 0 0 1px 3px rgba(56, 207, 21, 0.95);
1083 | }
1084 |
1085 | div.vis-network div.vis-navigation div.vis-button.vis-up {
1086 | background-image: url("img/network/upArrow.png");
1087 | bottom:50px;
1088 | left:55px;
1089 | }
1090 | div.vis-network div.vis-navigation div.vis-button.vis-down {
1091 | background-image: url("img/network/downArrow.png");
1092 | bottom:10px;
1093 | left:55px;
1094 | }
1095 | div.vis-network div.vis-navigation div.vis-button.vis-left {
1096 | background-image: url("img/network/leftArrow.png");
1097 | bottom:10px;
1098 | left:15px;
1099 | }
1100 | div.vis-network div.vis-navigation div.vis-button.vis-right {
1101 | background-image: url("img/network/rightArrow.png");
1102 | bottom:10px;
1103 | left:95px;
1104 | }
1105 | div.vis-network div.vis-navigation div.vis-button.vis-zoomIn {
1106 | background-image: url("img/network/plus.png");
1107 | bottom:10px;
1108 | right:15px;
1109 | }
1110 | div.vis-network div.vis-navigation div.vis-button.vis-zoomOut {
1111 | background-image: url("img/network/minus.png");
1112 | bottom:10px;
1113 | right:55px;
1114 | }
1115 | div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends {
1116 | background-image: url("img/network/zoomExtends.png");
1117 | bottom:50px;
1118 | right:15px;
1119 | }
1120 |
1121 | div.vis-color-picker {
1122 | position:absolute;
1123 | margin-top:-140px;
1124 | margin-left:30px;
1125 | width:293px;
1126 | height:425px;
1127 | padding: 10px;
1128 | border-radius:15px;
1129 | background-color:#ffffff;
1130 | display:none;
1131 | box-shadow: rgba(0,0,0,0.5) 0px 0px 10px 0px;
1132 | }
1133 |
1134 | div.vis-color-picker div.vis-arrow {
1135 | position: absolute;
1136 | top:147px;
1137 | left:5px;
1138 | }
1139 |
1140 | div.vis-color-picker div.vis-arrow:after,
1141 | div.vis-color-picker div.vis-arrow:before {
1142 | right: 100%;
1143 | top: 50%;
1144 | border: solid transparent;
1145 | content: " ";
1146 | height: 0;
1147 | width: 0;
1148 | position: absolute;
1149 | pointer-events: none;
1150 | }
1151 |
1152 | div.vis-color-picker div.vis-arrow:after {
1153 | border-color: rgba(255, 255, 255, 0);
1154 | border-right-color: #ffffff;
1155 | border-width: 30px;
1156 | margin-top: -30px;
1157 | }
1158 |
1159 | div.vis-color-picker div.vis-color {
1160 | position:absolute;
1161 | width: 289px;
1162 | height: 289px;
1163 | cursor: pointer;
1164 | }
1165 |
1166 |
1167 |
1168 | div.vis-color-picker div.vis-brightness {
1169 | position: absolute;
1170 | top:313px;
1171 | }
1172 |
1173 | div.vis-color-picker div.vis-opacity {
1174 | position:absolute;
1175 | top:350px;
1176 | }
1177 |
1178 | div.vis-color-picker div.vis-selector {
1179 | position:absolute;
1180 | top:137px;
1181 | left:137px;
1182 | width:15px;
1183 | height:15px;
1184 | border-radius:15px;
1185 | border:1px solid #ffffff;
1186 | background: #4c4c4c; /* Old browsers */
1187 | background: -moz-linear-gradient(top, #4c4c4c 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #000000 51%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%); /* FF3.6+ */
1188 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(12%,#595959), color-stop(25%,#666666), color-stop(39%,#474747), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(60%,#111111), color-stop(76%,#2b2b2b), color-stop(91%,#1c1c1c), color-stop(100%,#131313)); /* Chrome,Safari4+ */
1189 | background: -webkit-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Chrome10+,Safari5.1+ */
1190 | background: -o-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Opera 11.10+ */
1191 | background: -ms-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* IE10+ */
1192 | background: linear-gradient(to bottom, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* W3C */
1193 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */
1194 | }
1195 |
1196 |
1197 |
1198 | div.vis-color-picker div.vis-new-color {
1199 | position:absolute;
1200 | width:140px;
1201 | height:20px;
1202 | border:1px solid rgba(0,0,0,0.1);
1203 | border-radius:5px;
1204 | top:380px;
1205 | left:159px;
1206 | text-align:right;
1207 | padding-right:2px;
1208 | font-size:10px;
1209 | color:rgba(0,0,0,0.4);
1210 | vertical-align:middle;
1211 | line-height:20px;
1212 |
1213 | }
1214 |
1215 | div.vis-color-picker div.vis-initial-color {
1216 | position:absolute;
1217 | width:140px;
1218 | height:20px;
1219 | border:1px solid rgba(0,0,0,0.1);
1220 | border-radius:5px;
1221 | top:380px;
1222 | left:10px;
1223 | text-align:left;
1224 | padding-left:2px;
1225 | font-size:10px;
1226 | color:rgba(0,0,0,0.4);
1227 | vertical-align:middle;
1228 | line-height:20px;
1229 | }
1230 |
1231 | div.vis-color-picker div.vis-label {
1232 | position:absolute;
1233 | width:300px;
1234 | left:10px;
1235 | }
1236 |
1237 | div.vis-color-picker div.vis-label.vis-brightness {
1238 | top:300px;
1239 | }
1240 |
1241 | div.vis-color-picker div.vis-label.vis-opacity {
1242 | top:338px;
1243 | }
1244 |
1245 | div.vis-color-picker div.vis-button {
1246 | position:absolute;
1247 | width:68px;
1248 | height:25px;
1249 | border-radius:10px;
1250 | vertical-align: middle;
1251 | text-align:center;
1252 | line-height: 25px;
1253 | top:410px;
1254 | border:2px solid #d9d9d9;
1255 | background-color: #f7f7f7;
1256 | cursor:pointer;
1257 | }
1258 |
1259 | div.vis-color-picker div.vis-button.vis-cancel {
1260 | /*border:2px solid #ff4e33;*/
1261 | /*background-color: #ff7761;*/
1262 | left:5px;
1263 | }
1264 | div.vis-color-picker div.vis-button.vis-load {
1265 | /*border:2px solid #a153e6;*/
1266 | /*background-color: #cb8dff;*/
1267 | left:82px;
1268 | }
1269 | div.vis-color-picker div.vis-button.vis-apply {
1270 | /*border:2px solid #4588e6;*/
1271 | /*background-color: #82b6ff;*/
1272 | left:159px;
1273 | }
1274 | div.vis-color-picker div.vis-button.vis-save {
1275 | /*border:2px solid #45e655;*/
1276 | /*background-color: #6dff7c;*/
1277 | left:236px;
1278 | }
1279 |
1280 |
1281 | div.vis-color-picker input.vis-range {
1282 | width: 290px;
1283 | height:20px;
1284 | }
1285 |
1286 | /* TODO: is this redundant?
1287 | div.vis-color-picker input.vis-range-brightness {
1288 | width: 289px !important;
1289 | }
1290 |
1291 |
1292 | div.vis-color-picker input.vis-saturation-range {
1293 | width: 289px !important;
1294 | }*/
--------------------------------------------------------------------------------
/event_graph/travel_event_graph.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
49 |
50 |
51 |
--------------------------------------------------------------------------------