Skip to main content

Mother Tongues Dictionaries dictionary creation tool

Project description

Mother Tongues Dictionaries (MTD)

This repo is under construction and could change drastically in the coming months with breaking changes.

Coverage Status Build Status Documentation Status PyPI package license standard-readme compliant

MTD is the first of two open-source tools that allow language communities and developers to quickly and inexpensively make their dictionary data digitally accessible. MTD is a tool that parses and prepares your data for being used with an MTD UI.

Please visit the website or docs for more information.

Table of Contents

Background

This project started as just a single dictionary for Gitxsan - a language spoken in Northern British Columbia, but it became quickly apparent that many communities also had the same problem. That is, they had some dictionary data but all of the options for sharing that data online were prohibitively expensive. MTD aims to make it easier to create online digital dictionary resources.

Note - Just because you can make an online dictionary does not mean you should. Before making a dictionary, you must have clear consent from the language community in order to publish a dictionary. For some background on why this is important, please read sections 1 and 2.1 here

Install

It is recommended to install mothertongues using pip. The package name is mothertongues, but it is imported as mtd and the CLI can be run using either mothertongues or mtd.

pip install mothertongues

Usage

In order to create a Mother Tongues Dictionary you will need at least two things:

  • A configuration file for you language/dictionary
  • A configuration file for each source of data

You can find out more about how to create these files against the MTD configuration schema by visiting the docs

Once you have those files, you can either create a dictionary programatically or using the command line interface.

Using Python directly

from mtd import create_dictionary

dictionary = create_dictionary(PATH_TO_LANGUAGE_CONFIG)

# write a file containing configuration information
config_js = dictionary.return_formatted_config(form='js')
with open('config.js', 'w', encoding='utf8') as f:
    f.write(config_js)

# write a file containing lexical data
dict_cached_js = dictionary.return_formatted_data(form='js')
with open('dict_cached.js', 'w', encoding='utf8') as f:
    f.write(dict_cached_js)

The two files that are then created above (config.js and dict_cached.js) can be dropped into any MTD-UI to build a dictionary.

Using the CLI

You can either export your dictionary as a static site:

mtd export <PATH_TO_LANGUAGE_CONFIG> web <OUTPUT_DIR>

Or, you can build it first:

mtd prepare <PATH_TO_LANGUAGE_CONFIG>

And then serve it locally:

mtd run

Contributing

If something is not working, or you'd like to see another feature added, feel free to dive in! Open an issue or submit PRs. Help writing and clarifying documentation is also very welcome.

This repo follows the Contributor Covenant Code of Conduct.

Acknowledgements

Thank you to both Patrick Littell & Mark Turin for their contributions, guidance and support as well as institutional support from the First Peoples' Cultural Council and SSHRC Insight Grant 435-2016-1694, ‘Enhancing Lexical Resources for BC First Nations Languages’.

Thank you to all other contributors for support with improving MotherTongues, finding bugs and writing documentation.

Contributors

This project exists thanks to all the people who contribute.

@littell. @markturin. @eddieantonio. @kavonjon.

License

AGPL-3 © Aidan Pine.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mothertongues-0.18.20200711.tar.gz (756.0 kB view details)

Uploaded Source

Built Distribution

mothertongues-0.18.20200711-py3-none-any.whl (6.7 MB view details)

Uploaded Python 3

File details

Details for the file mothertongues-0.18.20200711.tar.gz.

File metadata

  • Download URL: mothertongues-0.18.20200711.tar.gz
  • Upload date:
  • Size: 756.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

File hashes

Hashes for mothertongues-0.18.20200711.tar.gz
Algorithm Hash digest
SHA256 53d7f40ad3c5c9426986bc8df70cbb1e4983e0cc526638050ffa5e68c2dfda47
MD5 a3f98414d1faa9c1a50c62946f704c37
BLAKE2b-256 8c4baf30dc19c18f32a1368a5c4552b98b21a7d79e6f04ad3de86ac769a88f35

See more details on using hashes here.

File details

Details for the file mothertongues-0.18.20200711-py3-none-any.whl.

File metadata

  • Download URL: mothertongues-0.18.20200711-py3-none-any.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.7

File hashes

Hashes for mothertongues-0.18.20200711-py3-none-any.whl
Algorithm Hash digest
SHA256 45cee581d0a81f7cb645095dfb99596c602641f9324d88a268104b66729eaf2e
MD5 76091e377c5be75a8d9ca3d3cb53880f
BLAKE2b-256 97f1093f9bcb1d7681b586e63763de301041a38563e696225faaea68b36bbe3c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page