- Install Git : http://git-scm.com/downloads
- Install Node.js : http://nodejs.org/ (Make sure add node to PATH option is checked)
- Create '$HOME/npm' folder (Where $HOME is c:\Users<username>\AppData\Roaming).
- Open node command prompt and run
npm install -g bower grunt-cli - Start Git bash
- Type: "git clone https://github.com/NLeSC/UncertaintyVisualization"
- Type: "cd UncertaintyVisualization"
- Type: "npm install -g grunt grunt-cli"
- Type: "npm install"
- Type: "bower install"
- Type: "bower update"
- Type: "grunt serve"
- (this should happen automatically) Open browser, go to "http://localhost:9000"
- nodejs, http://nodejs.org/
- bower, http://bower.io
- Java Development Kit, https://www.java.com/
Follow instructions at joyents github website: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions
Install bower and grunt-cli globally
sudo npm install -g bower grunt-cli
git clone https://github.com/NLeSC/UncertaintyVisualization.git
cd UncertaintyVisualization
npm install
bower install
If you already have a installed the bower packages before, but need to update them for a new version of the code, run
bower update
grunt serve
Changes made to code will automatically reload web page.
grunt test
Generates test report and coverage inside test/reports folder.
Tests in Chrome can be run with
grunt e2e-local
Run end-to-end tests on sauce labs
To connnect to Sauce Labs use sauce connect program. Here you can find the details on how to install and run it.
Before tests can be run the sauce labs credentials must be setup
export SAUCE_USERNAME=<your sauce labs username>
export SAUCE_ACCESS_KEY=<your sauce labs access key>
Tests in Chrome, Firefox on Windows, Linux and OSX can be run with
grunt e2e-sauce
Travis-ci also runs end-to-end tests on sauce labs.
Note! Running grunt e2e-sauce will undo all changes in app/ folder.
grunt build
The dist folder has production ready distribution.
grunt jsdoc
API documentation is generated in doc/ directory.
The data format is as follows. The data file should contain a JSON object that specifies timeline. timeline contains an arrays of objects, events.
{
"timeline": {
"events": [...]
}
}
The events array contains events. An event looks like:
{
"actors": {
"actor:": [
"dbp:European_Union",
"dbp:United_Kingdom",
"dbp:The_Times",
"dbp:Government_of_the_United_Kingdom"
]
},
"climax": 89,
"event": "ev9",
"group": "100:[\"sell\"]",
"groupName": "[\"sell\"]",
"groupScore": "100",
"labels": [
"stop",
"difficulty",
"pressure"
],
"mentions": [...],
"prefLabel": ["stop"],
"time": "20060620"
}
actorsare the participants.climaxis the climax score.eventis the event id.groupis the group, which consists of agroupNameand agroupScore, separated by a colon.labelsis an array of words from the source text that refer to the eventmentionsis an array of mentions, which are specified below.prefLabelis the prefered label (currently not used).timeis the date of the event. This must be a complete date in the format YYYYmmdd.
The mentions array contains mentions and perspectives:
{
"mentions": [{
"char": ["5665","5673"],
"snippet": [" Sunday Times, said they were extremely concerned about the UK's difficulties in stopping the EU from introducing measures that continue to erode Britain's competitiveness"],
"snippet_char": [ 81, 89 ],
"uri": ["http://www.ft.com/thing/f2bc1380-fa32-11e3-a328-00144feab7de"]
"perspective": [...]
}
char: character offsets of the original text that refers to the event.snippet: a snippet of text mentioning the event.snippet_char: an array denoting the exact position of the event in the snippet text. Used for highlighting.uriis the link to the source text.perspective: an array of 0 or more perspectives on the event, as described below.
"perspective": [
{
"attribution": {
"belief": "confirm",
"certainty": "certain",
"possibility": "likely",
"sentiment": "positive",
"when": "future"
},
"source": "cite:Chris_Giles"
},
{
"attribution": {
"belief": "denial",
"certainty": "uncertain",
"possibility": "unlikely",
"sentiment": "negative",
"when": "past"
},
"source": "author:Emily_Cadman"
}
],
source: The perrspective's source. can be eithercite:****orauthor:****to denote citations and/or article authors.attribution: an object holding the following values:belief: Is the sourceconfirming or indenialof the event?.certaintyIs the sourcecertainoruncertainin the event?.possibility: Is the source denoting the event aslikelyorunlikely?.sentiment: Is the sourcenegative,neutralorpositiveabout the event?.when: Is the source talking about thepast, present(now) orfuture?
Examples of data files can be found in app/data/.