├── .babelrc ├── .clang-format ├── .gitignore ├── AUTHORS ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── gulpfile.js ├── index.html ├── package-lock.json ├── package.json ├── resources ├── logos │ └── README.md ├── poster │ ├── Makefile │ ├── poster.pdf │ └── poster.svg └── screenshot.png ├── scripts ├── compile-ejs.js ├── compress-fa.sh ├── install.sh └── rebuild-tree.sh ├── src ├── client │ ├── app.ts │ ├── collaboration │ │ ├── index.ts │ │ └── user.ts │ ├── config.ts │ ├── corpus.ts │ ├── favicon.png │ ├── graph │ │ ├── config.ts │ │ ├── index.ts │ │ ├── tree.ts │ │ ├── utils.ts │ │ └── visualiser.ts │ ├── gui │ │ ├── chat.ts │ │ ├── config.ts │ │ ├── graph-menu.ts │ │ ├── index.ts │ │ ├── keyboard.ts │ │ ├── labeler.ts │ │ ├── menu.ts │ │ ├── modals │ │ │ ├── help.ts │ │ │ ├── index.ts │ │ │ ├── upload-file.ts │ │ │ └── upload-url.ts │ │ ├── selfcomplete.ts │ │ ├── status.ts │ │ ├── table.ts │ │ └── textarea.ts │ ├── index.ts │ ├── server.ts │ ├── socket.ts │ ├── undo-manager.ts │ └── utils │ │ ├── export.ts │ │ ├── funcs.ts │ │ ├── index.ts │ │ ├── local-storage.ts │ │ └── validate.ts ├── notatrix │ ├── README.md │ ├── base.ts │ ├── detector.ts │ ├── formats │ │ ├── apertium-stream │ │ │ ├── detector.ts │ │ │ ├── fields.ts │ │ │ ├── generator.ts │ │ │ ├── get-loss.ts │ │ │ ├── index.ts │ │ │ ├── parser.ts │ │ │ └── splitter.ts │ │ ├── brackets │ │ │ ├── detector.ts │ │ │ ├── fields.ts │ │ │ ├── generator.ts │ │ │ ├── get-loss.ts │ │ │ ├── index.ts │ │ │ └── parser.ts │ │ ├── cg3 │ │ │ ├── detector.ts │ │ │ ├── fields.ts │ │ │ ├── generator.ts │ │ │ ├── get-loss.ts │ │ │ ├── index.ts │ │ │ └── parser.ts │ │ ├── conllu │ │ │ ├── detector.ts │ │ │ ├── fields.ts │ │ │ ├── generator.ts │ │ │ ├── get-loss.ts │ │ │ ├── index.ts │ │ │ └── parser.ts │ │ ├── default-splitter.ts │ │ ├── index.ts │ │ ├── notatrix-serial │ │ │ ├── detector.ts │ │ │ ├── fields.ts │ │ │ ├── generator.ts │ │ │ ├── get-loss.ts │ │ │ ├── index.ts │ │ │ ├── parser.ts │ │ │ └── splitter.ts │ │ ├── params │ │ │ ├── detector.ts │ │ │ ├── fields.ts │ │ │ ├── generator.ts │ │ │ ├── get-loss.ts │ │ │ ├── index.ts │ │ │ ├── parser.ts │ │ │ └── splitter.ts │ │ ├── plain-text │ │ │ ├── detector.ts │ │ │ ├── fields.ts │ │ │ ├── generator.ts │ │ │ ├── get-loss.ts │ │ │ ├── index.ts │ │ │ ├── parser.ts │ │ │ └── splitter.ts │ │ └── sd │ │ │ ├── detector.ts │ │ │ ├── fields.ts │ │ │ ├── generator.ts │ │ │ ├── get-loss.ts │ │ │ ├── index.ts │ │ │ └── parser.ts │ ├── generator.ts │ ├── index.ts │ ├── nx │ │ ├── analysis.ts │ │ ├── base-class.ts │ │ ├── base-token.ts │ │ ├── comment.ts │ │ ├── corpus.ts │ │ ├── label.ts │ │ ├── labeler.ts │ │ ├── options.ts │ │ ├── relation-set.ts │ │ ├── root-token.ts │ │ ├── sentence.ts │ │ ├── sub-token.ts │ │ └── token.ts │ ├── parser.ts │ ├── splitter.ts │ └── utils │ │ ├── constants.ts │ │ ├── errors.ts │ │ ├── funcs.ts │ │ ├── index.ts │ │ └── regex.ts └── server │ ├── app.ts │ ├── config.ts │ ├── errors.ts │ ├── list-treebanks.ts │ ├── models │ ├── corpus-json.ts │ ├── sanitize.ts │ ├── treebank.ts │ └── users.ts │ ├── public │ ├── css │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ ├── fontawesome.all.min.css │ │ ├── jquery.autocomplete.css │ │ └── style.css │ ├── favicon.png │ ├── fonts │ │ ├── Liberation_Sans-Regular.ttf │ │ └── PT_Sans-Caption-Web-Regular.ttf │ ├── html │ │ ├── annotatrix.html │ │ ├── help.html │ │ ├── index.html │ │ └── webfonts │ │ │ ├── fa-brands-400.eot │ │ │ ├── fa-brands-400.svg │ │ │ ├── fa-brands-400.ttf │ │ │ ├── fa-brands-400.woff │ │ │ ├── fa-brands-400.woff2 │ │ │ ├── fa-regular-400.eot │ │ │ ├── fa-regular-400.svg │ │ │ ├── fa-regular-400.ttf │ │ │ ├── fa-regular-400.woff │ │ │ ├── fa-regular-400.woff2 │ │ │ ├── fa-solid-900.eot │ │ │ ├── fa-solid-900.svg │ │ │ ├── fa-solid-900.ttf │ │ │ ├── fa-solid-900.woff │ │ │ └── fa-solid-900.woff2 │ ├── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.min.js │ │ ├── bundle.js │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ ├── jquery.min.map │ │ └── main.js │ ├── logo.png │ └── logo.svg │ ├── room.ts │ ├── routes.ts │ ├── sockets.ts │ ├── upload.ts │ └── views │ ├── annotatrix.ejs │ ├── help.ejs │ ├── index.ejs │ ├── modals │ ├── github-fork.ejs │ ├── help.ejs │ ├── upload-file.ejs │ └── upload-url.ejs │ └── settings.ejs ├── test └── notatrix │ ├── combine.js │ ├── data │ ├── cg3.js │ ├── conllu.js │ └── index.js │ ├── detector.js │ ├── enhance.js │ ├── examples.js │ ├── generator.js │ ├── index.js │ ├── loss.js │ ├── merge.js │ ├── parser.js │ ├── relation-sets.js │ ├── sentence.js │ ├── setEmpty.js │ ├── split.js │ ├── splitter.js │ └── utils.js └── tsconfig.json /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env"], 3 | "plugins": ["transform-es5-property-mutators"] 4 | } 5 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | # vim: syntax=yaml 2 | Language: JavaScript 3 | BasedOnStyle: LLVM 4 | TabWidth: 2 5 | IndentWidth: 2 6 | UseTab: Never 7 | SpacesInContainerLiterals: false 8 | IndentCaseLabels: false 9 | JavaScriptQuotes: Double 10 | JavaScriptWrapImports: true 11 | AlignAfterOpenBracket: true 12 | ColumnLimit: 120 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # environment stuff 2 | .env 3 | ud-env 4 | 5 | # python compiled files 6 | __pycache__ 7 | *.pyc 8 | 9 | # db files 10 | corpora 11 | .users.db 12 | 13 | # log stuff 14 | logs 15 | 16 | # vim swap files 17 | *.swp 18 | 19 | # node stuff 20 | node_modules 21 | build 22 | .nyc_output 23 | 24 | # ubuntu process files 25 | .nfs* 26 | 27 | # OS files 28 | .DS_Store 29 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Original UD annotatrix by Jonathan North Washington 2 | jonorthwash.github.io/visualise.html 3 | Google Summer of Code (2017, 2018, 2019) 4 | Mariya Sheyanova (@maryszmary) 5 | Kevin Murphy (@keggsmurph21) 6 | Alyaxey Yaskevich (@yaskevich) 7 | GCI 2016 and 2017 students 8 | Grzegorz Stark (@gstark0) 9 | Jonathan Pan (@JPJPJPOPOP) 10 | Suresh Michael Peiris (@tsuresh) 11 | Diogo Fernandes (@diogoscf) 12 | Robin Richtsfeld (@Androbin) 13 | Ethan Yang (@thatprogrammer1) 14 | Other contributors 15 | Francis Tyers (@ftyers) 16 | Sushain Cherivirala (@sushain97) 17 | Kevin Brubeck Unhammer (@unhammer) 18 | Tai Vongsathorn Warner (@midasdoas) 19 | Daniel Swanson (@mr-martian) 20 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Greetings! 2 | 3 | Hi, if you're reading this file you probably like Annotatrix and want to contribute. 4 | That's great! We are always looking for people who want to join us in making a great 5 | tool for annotating Universal Dependencies. In this file we'll give some advice 6 | for how to contribute and some norms in the project. 7 | 8 | # General stuff 9 | 10 | * Find a bug? Submit an issue! We'll try and get to it as quickly as possible. This also 11 | goes for feature requests. 12 | * Pull requests wanted! If you fork the repo and want to make a pull request, that's great, 13 | just do it, no need to ask. 14 | * Getting direct commit access... if you think direct commit access would be easier, then 15 | contact us, we're very open to new contributions. 16 | 17 | # Coding style 18 | 19 | Right now the code is a bit... diverse, but in the future we're planning to follow these 20 | guidelines. 21 | 22 | * We use four-space indentation 23 | * Global variables are all in capitals, with underscores for spacing 24 | * For other variables and functions we use camelCase 25 | * Spaces between binary operators and operands 26 | * Each function should be documented in JSDoc style 27 | * Braces go on the same line 28 | * Use semicolons at the end of statements 29 | * Use var for local variables 30 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | const gulp = require("gulp"); 2 | const browserify = require("browserify"); 3 | const source = require("vinyl-source-stream"); 4 | const buffer = require("vinyl-buffer"); 5 | const babelify = require("babelify"); 6 | const rename = require("gulp-rename"); 7 | const sourcemaps = require("gulp-sourcemaps"); 8 | const compileEJS = require("./scripts/compile-ejs"); 9 | const terser = require("gulp-terser"); 10 | const size = require("gulp-size"); 11 | const tsify = require("tsify"); 12 | require("dotenv").config(); 13 | 14 | const gulp_mode = process.env.GULP_ENV || "development"; 15 | console.log("Gulp runs in " + gulp_mode + " mode"); 16 | 17 | gulp.task("js", function() { 18 | let stream = browserify({entries: ["src/client/index.ts"], debug: true}) 19 | .plugin(tsify) 20 | .transform(babelify, {global: true}) 21 | .bundle() 22 | .on("error", function(err) { console.error(err); }) 23 | .pipe(source("bundle.js")) 24 | .pipe(buffer()) 25 | .pipe(size()); 26 | 27 | if (gulp_mode == "production") { 28 | stream = stream.pipe(terser({keep_fnames: true, mangle: false, compress: {drop_console: true}})).pipe(size()) 29 | } 30 | return stream.pipe(gulp.dest("src/server/public/js")); 31 | }); 32 | 33 | gulp.task("html", function(done) { 34 | compileEJS(); 35 | done(); 36 | }); 37 | 38 | gulp.task("ico", function() { return gulp.src(["./src/client/favicon.png"]).pipe(gulp.dest("./src/server/public")); }); 39 | 40 | gulp.task("watch", () => { 41 | gulp.watch(["src/**/*.ts", "src/server/views/**/*.ejs"], gulp.parallel("js", "html")); 42 | }); 43 | 44 | gulp.task("default", gulp.parallel("js", "html", "ico")); 45 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 |