Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
a6448ec
Merge pull request #1 from CreativeCodingLab/master
ZechyW Sep 27, 2018
576cc2c
Maintenance/Architectural changes
ZechyW Oct 3, 2018
c2d980d
Build: Updated and streamlined build process
ZechyW Oct 24, 2018
136c6ff
WIP: Re-structure as library
ZechyW Oct 31, 2018
a9d22ae
Checkpoint: Repackaging as library
ZechyW Nov 1, 2018
9d93504
More porting progress
ZechyW Nov 1, 2018
a5814c7
Updated README, architectural changes
ZechyW Nov 5, 2018
8a0e2d8
Modified build process, added test
ZechyW Nov 5, 2018
44b7f48
WIP: New demo page
ZechyW Nov 5, 2018
e6bdb08
Enhancements, fixes, demo work
ZechyW Nov 6, 2018
5f18c9c
Bugfixes and improvements
ZechyW Nov 8, 2018
b6e2de4
README: Corrections
ZechyW Nov 8, 2018
4898928
Demo: Added port config option to server.js
ZechyW Nov 8, 2018
4352baa
Demo: Options modal with "show syntax" option
ZechyW Nov 9, 2018
8598434
Demo: "Show links on move" option
ZechyW Nov 9, 2018
6a423a1
Taxonomy: Scaffolding
ZechyW Nov 16, 2018
8d2b4f6
Taxonomy: On-the-fly editor for taxonomy YAML
ZechyW Nov 19, 2018
c6387f4
Taxonomy: Collapsible tree view for taxonomic labels
ZechyW Nov 21, 2018
65fe32f
Taxonomy: Colour picker functionality
ZechyW Nov 28, 2018
8485993
Taxonomy: Adjusted colour picker
ZechyW Nov 28, 2018
c302525
WIP: Link drag anchor bug
ZechyW Nov 29, 2018
7a26fa7
SVG: Corrected bug when dragging nested Links
ZechyW Nov 29, 2018
3df4a22
Link: Fixed handle dragging bug
ZechyW Dec 3, 2018
e1983a0
Draggable WIP: Handling for nested Links
ZechyW Dec 3, 2018
31877f6
WIP: Word spacing/movement fixes and enhancements
ZechyW Dec 5, 2018
bbbc1fb
SVG: Trigger relations now drawn
ZechyW Dec 6, 2018
30d064b
Fixes and enhancements
ZechyW Dec 11, 2018
2e098f5
Fixes and enhancements
ZechyW Dec 13, 2018
fa305d1
Fixes and enhancements
ZechyW Dec 13, 2018
b9ab2b0
Links: Trigger relations now drawn properly
ZechyW Dec 13, 2018
9fffbce
WordClusters now work properly; other fixes
ZechyW Dec 14, 2018
125f694
Links: Minimised crossings for Link Handles
ZechyW Dec 15, 2018
67bd759
Links/Clusters: Fixed WordCluster Links
ZechyW Dec 17, 2018
128a607
Parser: First pass of Processors parser
ZechyW Dec 17, 2018
ce18897
Links: Bugfix
ZechyW Dec 17, 2018
556aac4
Bugfixes and cleanup
ZechyW Dec 19, 2018
b975472
Fixes and enhancements
ZechyW Dec 21, 2018
d863da2
Odin: Ensure that Relation labels are ordered
ZechyW Dec 21, 2018
7029e59
Scaffolding for adding new labels to Links
ZechyW Jan 1, 2019
2fccea7
Deprecated Reach parser
ZechyW Jan 1, 2019
60c207b
Odin: Bugfix
ZechyW Jan 1, 2019
a0241bf
More scaffolding for Link label displays
ZechyW Jan 1, 2019
aa6e622
Link: Relations drawn correctly
ZechyW Jan 2, 2019
b14154c
Links: All labels drawn properly
ZechyW Jan 2, 2019
4623a17
Row: Better spacing when no Links are active
ZechyW Jan 2, 2019
0bffe6c
TAG: Default options can be overridden on init
ZechyW Jan 2, 2019
eee857a
Demo: Updated sample code
ZechyW Jan 2, 2019
24704ca
Links: Bugfix
ZechyW Jan 2, 2019
b3b1b91
Fix for Firefox compatibility
ZechyW Jan 2, 2019
5ee0c32
Demo: Pre-load fonts so that SVG Text dimensions are accurate
ZechyW Jan 3, 2019
596cb85
Demo: More display options
ZechyW Jan 4, 2019
436d224
Words: Added categories for token-level annotations
ZechyW Jan 7, 2019
89d27c0
Docs: Added document generation system
ZechyW Jan 8, 2019
7c86299
Readme: Fixes to README.md text
ZechyW Jan 8, 2019
2bf34af
Test Travis CI
myedibleenso Jan 8, 2019
1929ef1
Test "odin" json format
myedibleenso Jan 8, 2019
2e71c76
Added TaxonomyManager test (stub)
myedibleenso Jan 8, 2019
37dbcaf
Removed snapshot file
myedibleenso Jan 8, 2019
4a2cb4c
Tests: Changed taxonomy manager test to use full sample file
ZechyW Jan 9, 2019
11d9438
SVG: Fixed download functionality
ZechyW Jan 9, 2019
061c72f
Demo: "Reach" -> "Odin" on upload dialog
ZechyW Jan 9, 2019
c38c225
Parser: Fix file loading for Odin parser
ZechyW Jan 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
{ "presets": ["es2015"] }
{
"presets": ["@babel/env"],
"plugins": [
"@babel/plugin-transform-runtime",
["@babel/plugin-proposal-decorators", { "legacy": true }]
]
}
43 changes: 43 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"env": {
"node": true,
"es6": true,
"browser": true,
"jest": true
},
"extends": "eslint:recommended",
"rules": {
"no-console": "off",
"indent": [
"error",
2,
{
"FunctionDeclaration": {
"parameters": "first"
},
"FunctionExpression": {
"parameters": "first"
},
"CallExpression": {
"arguments": 1
},
"SwitchCase": 1
}
],
"quotes": [
"error",
"double",
{
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"always"
]
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2017
}
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ Session.vim
.netrwhist
*~

# IntelliJ
.idea
19 changes: 19 additions & 0 deletions .jsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"plugins": [
"plugins/markdown"
],
"templates": {
"referenceTitle": "TextAnnotationGraphs",
"disableSort": true,
"collapse": false,
"resources": {
"SVG Path Spec<br>": "https://www.w3.org/TR/SVG/paths.html#PathData",
"SVG Cubic Bézier Curve Generator": "https://codepen.io/explosion/pen/YGApwd"
}
},
"opts": {
"encoding": "utf8",
"recurse": true,
"template": "src/jsdoc-template"
}
}
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dist: trusty
language: node_js
node_js:
- "8"

install:
- npm install
63 changes: 55 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# TextAnnotationGraphs (TAG)
A modular annotation system that supports complex, interactive annotation graphs embedded on top of sequences of text. An additional view displays a subgraph of selected connections between words/phrases using an interactive network layout.

![TAG](/figs/OneRow.png)
![TAG](figs/OneRow.png)

---

![TAG](/figs/taxonomyColors.png)
![TAG](figs/taxonomyColors.png)

---

![TAG](/figs/TwoRows.png)
![TAG](figs/TwoRows.png)

---

![TAG](/figs/trees.png)
![TAG](figs/trees.png)


## Development
TAG was developed by Angus Forbes (UC Santa Cruz) and Kristine Lee (University of Illinios at Chicago), in collaboration with Gus Hahn-Powell, Marco Antonio Valenzuela Escárcega, and Mihai Surdeanu (University of Arizona). Contact angus@ucsc.edu for more information.
TAG was developed by Angus Forbes (UC Santa Cruz) and Kristine Lee (University of Illinios at Chicago), in collaboration with Gus Hahn-Powell, Marco Antonio Valenzuela Escárcega, Zechy Wong, and Mihai Surdeanu (University of Arizona). Contact angus@ucsc.edu for more information.

# Citing TAG

Expand Down Expand Up @@ -51,17 +51,64 @@ TAG can be built and installed using [`npm`](https://docs.npmjs.com/getting-star
npm install git+https://github.com/CreativeCodingLab/TextAnnotationGraphs.git
```

## Usage

To use TAG with your own applications, first include the library in your script:

#### Browserify (CommonJS)

```
const TAG = require("text-annotation-graphs");
```

#### ES6

```
import TAG from "text-annotation-graphs";
```

Then initialise the visualisation on an element, optionally specifying the initial data set to load and any overrides to the default options. For more details, consult the full API documentation.

```
const graph = TAG.tag({
container: $container,
data: {...},
format: "odin",
options: {...}
});
```

## Development

Tasks are managed with [`npm` scripts](https://docs.npmjs.com/misc/scripts).
Tasks are managed via [`npm` scripts](https://docs.npmjs.com/misc/scripts) and the [`runjs` build tool](https://github.com/pawelgalazka/runjs). The most commonly used tasks are listed in `package.json`, and details for the various sub-tasks can be found in `runfile.js`.

### Demo

After cloning the repository and installing the project dependencies via `npm install`, you can run the interactive demo using `npm run demo` and directing your browser to `localhost:8080`.

To run the demo on a different port, set the `PORT` environmental variable. For example, running `PORT=9000 npm run demo` will start the demo server on `localhost:9000` instead.


### Building the source
Assuming you've cloned the repository, simply run `npm run all` to install dependencies and transpile the source to ES2015.

TAG is written in ES6, and uses [Sass](https://sass-lang.com/) for its styles.

Assuming you've cloned the repository, simply run `npm install && npm run build` to install dependencies and transpile the source to ES2015.

### Live monitoring of changes

For convience, you can monitor changes to the library's source (css + js) with the following `npm` task:
For convenience, you can monitor changes to the library's sources (css + js) with the following `npm` task:

```
npm run watch
```

### Generating documentation

TAG uses [JSDoc](http://usejsdoc.org/) to generate its documentation. By default, the documentation is generated using the template in `src/jsdoc-template` (adapted from the [Braintree JSDoc Template](https://github.com/braintree/jsdoc-template)) and stored in the `docs` folder.

To regenerate the documentation, use the following `npm` task:

```
npm run generate-docs
```
6 changes: 6 additions & 0 deletions __mocks__/svg.draggable.js.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* svg.draggable.js doesn't play nice with Jest, for some reason. (Probably
* because it expects `SVG` to be available as a bare global)
* We don't need its functionality in testing, so we're replacing it
* completely with this mock that does nothing.
*/
Loading