ToolsForFieldLinguistics
This is a collection of scripts and recipes for fieldlinguistics and RAs in data heavy labs. The examples in this project were used for workshops at McGill and Concordia Universities as well as self paced tutorials for fieldlinguistics RAs.
One of the biggest challenge of working as an RA isn't necessarily learning the language of the scripts you use, but rather how you can build maintainable scripts that future RAs can also use and maintain. Building scripts that are user friendly and get the job done quickly and correctly actually has only a little to do with programming languages or "Computer Science." The keyword you need is "Software Engineering." If you want to augment your RA tasks with coursework, don't take a course in beginning programming; you will spend a lot of time on small details that are already easy for you to grasp if you have taken courses in Syntax and Semantics. Instead, take a course in Software Engineering, or follow slides and screencasts about "Behavior Driven Testing" on YouTube if your university wont permit non-majors to take SOEN courses. If you approach your RAship not as a task of learning the syntax of a programming language, but rather as the aquiring sociolinguistics of software developers, you will have better luck and have more fun building tools for your lab, and of course you will also learn the syntax and vocabulary of various dialects of programming languages too.
Most of the User Interface (UI) code in this project is in Javascript, so you can use colors and animations to have fun with your tool building... Other tasks are written in other languages (python, groovy, perl, java, C++, C, bash, praat) depending on what is often a popular language for that sort of data crunching.
Getting Started
The first step is most likely to fork this project, and download the code to your computer and start exploring either by language (src folder), or by task (test folder). However, if you already have a task at hand and you know the recipe is in this project, you can simply include the production version of the recipes in your project. (See below)
Play/practice with the code
- Fork the repo [WATCHME]
- Download the repo to your computer [WATCHME]
- Run the dev tools (linter and tests so you can see what is available in the javascript recipes)
$ cd ToolsForFieldLinguistics && npm install && npm run lint && npm test
- Make your modifications (you can look at the FieldDB milestones for ideas of what can be done, or the docs and examples below.) (YouTube Playlist)
- Commit your changes [WATCHME]
$ git commit -m "added some more regex to the text cleaner"
- Push to your GitHub [WATCHME]
$ git push origin master
Using the code in a browser
Download the development version
In your web page:
<script src="dist/tools-for-field-linguistics.js"></script>
<script>
init(); // "init"
</script>
In your code, you can attach ToolsForFieldLinguistics's methods to any object.
<script>
var exports = Stuff.utils;
</script>
<script src="dist/tools-for-field-linguistics.js"></script>
<script>
Stuff.utils.init(); // "init"
</script>
Using the code on a server
Install the module with: $ npm install git://github.com/cesine/ToolsForFieldLinguistics.git
var ToolsForFieldLinguistics = require('ToolsForFieldLinguistics');
ToolsForFieldLinguistics.init(); // "init"
Documentation
The Tests and specs (short for tests which are written as "it should do x" specifications) are a popular and pragmatic way in BDD/TDD (Behaviour/Test driven development) to document code by making docs that are concrete and always up-to-date, and compile.
The JSDocs can show you how to use the javascript examples, if you like looking at formal docs.
The Slides can give you the big picture and ease you into the project's raison d'etre in a more academic context.
The Windows WATCHMEs might help if you use windows. We made some screencasts a few years ago for how to use GitHub for project management on Windows since we expected most workshop participants would have windows...
Examples
Tutorials and quizes: see the specs and tests. You can read the spec, and try to write the code your self which would make that spec pass.
We also have some screencasts from the 2011 workshop: YouTube playlist tutorial for finding Quechua morphemes in context with Groovy and GATE
Contributing
While playing with the code you probably found something that you wanted to modify or add. If you want, GitHub makes it very easy to "code socially" so that others like you can find your modifications and build upon them too.
Contributing Examples
Want to contribute? (easy for new GitHub users)
- Click on Edit on any of the code recipe pages on GitHub
- Edit the code, and commit your changes saying what you changed (eg "added some more regex to the text cleaner"). GitHub will create an Issue for you which asks us to bring in your changes
Want to contribute? (advanced for GitHub users)
- Fork the repo if you haven't already
- Create a branch which describes your change
$ git checkout -b more_regex
- Make your modifications
- Run the dev tools (linter and tests if you modified the javascript)
$ npm install && npm run lint && npm test
- Commit your changes
$ git commit -m "added some more regex to the text cleaner"
- Push to the branch
$ git push origin more_regex
- Create a Pull Request (adding more details if necessary) [WATCHME]
JavaScript Syntax highlighting using Sublime
- Download the source code
- Open the entire folder
- Install jsbeautifier package
Groovy Syntax highlighting using Eclipse
- Download the source code
- Create a Groovy project and import the source files