Grammar Engineering Frequently Asked Questions
What should I know about documenting my grammar?
Documentation is key to creating maintainable grammars. Current best practice recommendations are as follows:
- Documentation consists, in the first instance, of comments in your .tdl files.
- Comments should begin with an identifier of the author (e.g., your initials) and a date.
- Comments should include a statement of why a type was created, or, in the case where you are changing an existing type, a statement of what was changed (what it looked like before and after).
- Wherever possible, comments should include an example sentence illustrating the phenomenon which motivated the change, in IGT format.
- Comments should be placed immediately above the type the refer to.
- Old comments should not be deleted.
- When there are multiple comments regarding the same type, the older comments should come first (above) and the newer comments later, with the most recent comment immediately above the type in question.
- Often, a change in the requires making related changes to multiple types. It is important to leave a comment documenting that change at each type (or above each block of types), but it is fine to have a longer explanatory comment in just one place (with examples, etc), and shorter comments elsewhere. In this case, the shorter comments should point to the longer one.
If these practices are followed, the result is a narrative that will allow you (or some future developer of the grammar) to reconstruct why each type is the way it is, avoid re-exploring analyses that were found not to work, and generally maintain the grammar over time.
Back to FAQs page
Back to main course page
-- Main.ebender - 07 Jan 2009
Topic revision: r2 - 2009-01-11 - 23:07:07 - ebender