Skip to content

Editor for normalising learner texts (error annotation and tagging.)

License

Notifications You must be signed in to change notification settings

spraakbanken/swell-editor

Repository files navigation

SweLL normalization editor

This is an editor for pseudonymizing, normalising, and correction annotating learner texts.

Actually it is a glorified diff editor which makes a word-aligned parallel text, like this:

This tool is in active development, and described further here:

Slides, change slides with up and down arrows:

Build status

Running the tool

yarn
yarn run serve

Testing

yarn run test

End to end:

yarn run serve # start server on port 1234
yarn run test:e2e

Coverage:

yarn run coverage

While developing:

yarn run doctest:watch

Deployment

SB-specific:

yarn run deploy

Updating the taxonomy

The intent is that the taxonomy should come from the backend. However, it can also be updated in src/Editor/Config.ts and then deployed (see above).

Backend connection

The url hash contains two fields for talking to a backend: backend and essay. The backend should a base64 encoded url. You can set this from the developer console like this:

store.update({
  backend: 'https://spraakbanken.gu.se/swell/dev-backend/annotation/essay/',
  essay: 'K0Rv',
})

The store is only fetched on page load, so you'll need to reload the page after setting this.

The start_mode flag can be anon, norm or corr and will start the editor in that mode.

Note that while there is a backend connected it is not possible to change mode (anonymisation or normalisation) or edit the source text.

The backurl will add a back link to an url (base64-encoded).

Images of Spaghetti as a Service

There is also a web-service that takes a compact description of a parallell corpus sentence and renders it as a png, like this:

This is run with

yarn run iosaas

The frontend and backend dependencies are shared in one big package.json for convenience.

SB-specific: The web service is run on kork using supervisord on port 8003 and its htaccess file is on k2 at /export/htdocs_sbws/ws/swell.