-
Notifications
You must be signed in to change notification settings - Fork 4
MatrixDevConventions
EmilyBender edited this page May 2, 2011
·
9 revisions
This page is intended to provide a catalogue of global variables and other information of use to Matrix developers. These global variables should be used rather than repeating the information (for maintainability).
In gmcs.linglib.lexbase:
# all types of lexical items (on lexicon page)
ALL_LEX_TYPES = ['noun', 'verb', 'det', 'aux', 'adj']
# types used for lexical rules (verb and aux are merged)
LEXICAL_CATEGORIES = ['noun', 'verb', 'det', 'adj']
In gmcs.choices, in the definition of the class ChoicesFile:
######################################################################
# Conversion methods: each of these functions assumes the choices
# file has already been loaded, then converts an older version into
# a newer one, updating both old key names and old value names.
# These methods can be called in a chain: to update from version 2
# to 5, call convert_2_to_3, convert_3_to_4, and convert_4_to_5, in
# that order.
#
# The mehods should consist of a sequence of calls to
# convert_value(), followed by a sequence of calls to convert_key().
# That way the calls always contain an old name and a new name.
def current_version(self):
return 23
Home | Forum | Discussions | Events