Adding/Editing Tiers/Controlled Vocabularies
You may do this if you want to annotate a new type of information not already captured by the ACLEW annotation scheme.
ELAN terms
Controlled vocabulary (CV) - a set of values that a segment can take. It is a property of the tier. In ELAN, when you click on a segment, there is a dropdown menu with all the possible values. You can't directly create a new segment with a value that isn't in the vocabulary. If a tier didn't use a CV and it was added later, values not from the CV will be preserved. For example, tier "lex" uses a CV that is also called "lex" that has two values: "W" and "0" for 1+ words and 0 words respectively.
Creating a New Controlled Vocabulary
So that all EAFs use the same CV definitions, we store CVs in .ecv
files in the bergelsonlab/public-files
GitHub repo. When we need to create a new CV, we first create it in one file using ELAN, export it and upload it to GitHub, and then refer to that file in all EAFs.
First file
Create your working copy of the recording folder using VIHI Parallel Annotation.
Open the EAF in ELAN.
Create a new controlled vocabulary(ies)
Go to "Edit Controlled Vocabularies" (Ctrl-Shift-C).
Type new name and description. For consistency with other CVs, use three lower-case letters for the name.
Click "Add".
In the lower half, add possible values and their descriptions one by one.
Add tiers
Create a new tier type that uses your new CV.
Type
->New Tier Type
(Ctrl-Shift-T). (note: the steps below are for annotation tiers that will be children of other tiers)Use the same name you used for the CV, optionally capitalize it.
For "Stereotype", select "Symbolic Assocation".
Select your CV in "Use Controlled Vocabulary".
Make sure "Time alignable" is not checked.
Create new tiers. (note: the steps below are for annotation tiers that will be children of other tiers)
Go to
Tier
->Add New Tier...
(Ctrl-T).Select the parent tier. It doesn't have to be the participant tier, it is often one of its descendants.
Select the tier type you created in the previous step.
Fill in "Participant". This should be the same as for tha parent tier.
Fill in the name in the following format: <lower-case-cv-name>@<PARTICIPANT>.
Go back to the "Edit Controlled Vocabularies" if you need to add more entries or edit existing ones.
Once you are satisfied, commit you annotation-in-progress copy and push to the main repo. See VIHI Parallel Annotation
Move the CV from the EAF to GitHub.
Export the CV to a file:
Go to "Edit Controlled Vocabularies" (Ctrl-Shift-C).
Click "Export .ecv".
Choose only the CV(s) that you added.
Save anywhere. Use a descriptive name.
Upload the file to GitHub at bergelsonlab/public-files.
Click on the file in the repo, then click "Raw". Once the page reloads and shows just the text content of the file (no GitHub UI), copy the URL from the address bar.
Add as external CV:
Go to "Edit Controlled Vocabularies" (Ctrl-Shift-C).
Click "External CV".
Paste the URL you copied.
ELAN will ask what to do with the CVs that are already in the file. Choose "Replace" for each of the new CVs. If you see a CV that isn't one of yours, that means you exported some CVs you shouldn't have.
git restore
the EAF and start again from "Export the CV to a file:".
Save, commit, push.
Second and further files
Add the
.ecv
file as "External CV". The steps are the same as above, except there won't be any CVs to ovewrite.Add tiers. The steps are the same as above except you won't be able to edit the CV.
Edit the
.ecv
file on GitHub:The file is in XML format but it should be nevertheless simple to edit it keeping the formatting.
Use https://jsonformatter.org/xml-validator to check that the result is still valid XML before committing.
Commit and push. Or just commit if you used GitHub web UI to edit the file.
Once committed, test that the changes have propagated to the EAF file. There are a few things that can create a delay.
Go the
raw.githubusercontent.com...
URL of the.ecv
file. Sometimes, it will take GitHub a minute to update the file.Completely close ELAN, then reopen the file.
(for the lab technician) Adding new tiers
Add/check reference to the external CV file.
Add/check linguistic type that uses that CV.
For each participant than needs this descendant tier, add one.
For each transcription, create an empty segment in the added tier.
See:
README.md
andadd-tiers.py
in one_time_scripts.This commit that added two new ters.
Module
blabpy.eaf
, specificallyadd_*
functions.
Last updated