Skip to content

Getting started

You will need a computer, some time and focus, and maybe some coffee. Ideally, you'll also have an existing database you would like to work with.

Requirements

Setup

It is recommended that you create a directory for this tutorial, and store all data and execute all commands in that directory (cd /path/to/your/grammar-tutorial).

Virtual environment

If you use python, it is highly recommended that you create a virtual environment and then run all commands from this tutorial in that environment.

  1. Create virtual environment in folder env:
    python -m venv env
    
  2. Activate environment from folder:
    source env/bin/activate
    
  1. Install virtualenv:
    pip install virtualenv
    
  2. Create virtual environment in folder env:
    virtualenv env
    
  3. Activate environment from folder:
    source env/bin/activate
    

Python packages

The following packages are required for this guide:

  • pylingdocs for combining dataset and markdown
  • cldflex for extracting FLEx databases
  • unboxer for extracting *box databases

Install them with:

pip install pylingdocs cldflex unboxer

Set up the glottolog catalog

If you want to automatically recognize the language in your database, you will need to download the glottolog catalog with cldfbench to look up language metadata. To do so, run the following command and say y to installing the glottolog catalog. cldfbench will tell you where the catalog is stored so you can delete it if you don't want to keep it.

cldfbench catconfig

Alternatively, you can use --corpus your_languages.csv with cldflex or unboxer (minimal example for file).


Last update: October 2, 2023