Skip to content

Maas Translator built with the Open Multilingual Wordnet and SpaCy

Notifications You must be signed in to change notification settings

egginabucket/grove

Repository files navigation

Grove

A translator for English and other languages into the musical language Maas, built with SpaCy and the Open Multilingual Wordnet.


Maas

Maas (formerly known as Moss) is a constructed musical language, like Solresol. Created by Jackson Moore of the "Bruce High Quality Foundation University", what little information of it that remains online is preserved on the Wayback Machine.

Installation

Grove is still in very early development. Hopefully there will be an actual site to visit soon, but until then, I might make a dockerfile if somebody bugs me enough.

To install you need a Python 3 virtualenv, a Postgres database, and some storage space. The Celery and Redis stuff isn't done so don't worry about that.

Install requirements:

pip install --require-virtualenv -r requirements.txt

Next, set the DATABASE_URL environment variable with the format postgres://USER:PASSWORD@HOST:PORT/NAME

Migrate database:

python manage.py migrate

Load jangle (language tags) data:

python manage.py loadjangledata

Load the Maas lexicon:

python manage.py loadlexicon --native-to-en (use -h for more info)

Download the WordNet:

python
>>> import nltk
>>> nltk.download(['omw-1.4', 'wordnet', 'wordnet2021'])

Next, go to your nltk_data folder (usually in your home folder) and extract corpora/wordnet2021.zip into corpora, and corpora/wordnet.zip into corpora and the new corpora/wordnet2021 folder. Unfortunately the new fix for this (see this issue) in NLTK 3.8 doesn't seem to work with OMW :(

Register the dictionary:

python manage.py loaddictionary (use -h for more info)

Load some fixtures:

python manage.py loaddata translator/fixtures/spacy.yaml

Download SpaCy packages:

python manage.py loadspacymodels dev -d (use -h for more info)

Feel free to replace dev with any of the files in translator/spacy-models or the given directory, just be wary of storage use.

Make a superuser:

python manage.py createsuperuser

Run server:

Set the WEB_CONCURRENCY, DJANGO_SECRET_KEY, M21_OUT_DIR, CSRF_ALLOWED_ORIGINS, and CORS_ALLOWED_ORIGINS environment variables and ./runserver.sh

Or python manage.py runserver for dev.

Note: English is currently the only language with lexeme translations written, so for other languages write some (please!) in maas/lexicon or disable lexeme lyrics in the translator's advanced settings.

Some Software Used

All libraries and programs used are FOSS (free open-source software), with the exception of Google Translate, used for languages unsupported by SpaCy or the Open Multilingual Wordnet. (WIP)

REFERENCES COMING SOON

Celery

Django

Gunicorn

music21

Natural Language Toolkit (NLTK)

Open English WordNet

Open Multilingual Wordnet

Redis

SpaCy

Uvicorn

xml2abc

xmlplay


A product of The Null Identity.

About

Maas Translator built with the Open Multilingual Wordnet and SpaCy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages