GithubHelp home page GithubHelp logo

nlp-tlp / redcoat Goto Github PK

View Code? Open in Web Editor NEW
23.0 3.0 12.0 27.99 MB

A lightweight web-based annotation tool for labelling entity recognition data.

License: Apache License 2.0

HTML 0.62% JavaScript 77.30% CSS 6.43% Dockerfile 0.01% SCSS 12.44% Pug 2.31% Less 0.89%
named-entity-recognition entity-recognition annotator annotation annotation-tool tagger tagging taggingtools

redcoat's Introduction

Redcoat - Collaborative Annotation Tool for Hierarchical Entity Typing

Redcoat is a lightweight web-based annotation tool for labelling entity recognition data.

Dependencies

  • NodeJS (v16.16.0) and NPM (v8.11.0)
  • MongoDB v4.2.24

Note that later versions of the above packages may work, but have not been tested.

How to install

First, ensure Mongodb is installed. On the Community Server page, download version 4.2.24 for your operating system (Windows x64, MSI for most users). Once it has been installed, open a new terminal window, and run Mongodb:

$ mongod

You'll need to keep this terminal window open while running Redcoat.

Then, in a new terminal window, clone this repository into a folder and navigate there by running the commands:

$ git clone https://github.com/Michael-Stewart-Webdev/redcoat.git
$ cd redcoat

If you are running Redcoat for the first time, navigate to the tagging_interface folder, install the required dependencies, and build the interface:

$ cd tagging_interface
$ npm install
$ npm run build

Next, navigate back to the root directory of this repository and install Redcoat's dependencies using npm*:

$ cd ..
$ npm install

The Redcoat server may be run using the command:

$ npm run production

You may then visit the server in your browser by visiting http://localhost:5000.

Note for Windows users - possible problems

If you attempt to run 'mongod' in your terminal and Windows does not recognise the command, navigate to the location in which mongod.exe is installed (for me it was C:\Program Files\MongoDB\Server\4.2\bin), open a power shell window, and run mongod. If that doesn't work, try .\mongod.

When attempting to run mongod in your terminal, you may receive an error message along the lines of "NonExistentPath: Data directory C:\data\db not found". If this happens, you'll need to create an empty folder in your C drive called "data" and a folder called "db" inside that folder.

If you are using Windows and encounter many errors when attempting npm install, it may be necessary to install the Windows Build Tools by running the command in an administrative power shell terminal:

$ npm install --global --production [email protected]

After installing the build tools, run npm install again followed by npm start. If an error appears again during npm install, I found that npm start still works. (will need to look into this, but it is specific to Windows at least)

(Optional) using Sendgrid to manage emails

If you have a Sendgrid account, and would like the server to be able to use your Sendgrid account to send out automated emails upon the creation of an annotation project, you must first export your sendgrid api key as an environment variable. For example:

$ export SENDGRID_API_KEY="<your sendgrid api key>"

You'll then need to restart Redcoat (terminate the process and run npm run production again) for the changes to take effect.

Using Docker

You can deploy the application using the provided docker-compose file. First, build the redcoat image, from the redcoat folder:

docker build -t redcoat:latest .

Then:

docker-compose up -d

redcoat's People

Contributors

michael-stewart-webdev avatar omanintz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

redcoat's Issues

Write Test Cases

Write test cases to ensure the tool works as expected.

Note: There are some old test cases (for the express app) but probably don't work anymore.

Installation and running

Hello,

I tried to install and run your tool, but I got the message "Error: ENOENT: no such file or directory, stat '/Users/../redcoat/tagging_interface/build/index.html'".
index.html does not exist.
Could you help me in solving this problem?
I am running it on MacOS.

Thanks in advance.

Best regards,
Sefika

Separate Dev and Prod Environments

Figure out how to properly separate the 'dev' and 'prod' environments.

  • Each environment should have its own separate MongoDB database
  • The 'dev' environment should ideally have a 'test' user the developer can log in to
  • The development environment should run the front-end via node (so that it can be modified during development) as opposed to building it into a html file via npm run build.

Tidy-up Source Code

General tidy up of the source code (remove any unnecessary console.logs in the react interface, lint everything, etc).

Set up GitHub actions

Set up GitHub actions to run the tests automatically when pushing to the main branch.

See Puggle or Mudlark for an example

Update Node Packages

Update all the node packages to the latest versions (and make sure it still works).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.