Global-signbank icon indicating copy to clipboard operation
Global-signbank copied to clipboard

Improve variable names related to morphology

Open Woseseltops opened this issue 7 years ago • 4 comments

The gloss detail view clearly organizes the morphology of glosses: you have sequential morphology, which is about glueing full glosses together, and simultaneous morphology, which is about smaller more abstract morphemes that do not have meaning on their own.

The underlying code does not mirror this clear structure, mostly because it emerged so gradually. Now we can see the full picture, I propose the following name changes:

Type Old name New name Reason
Model MorphologyDefinition SequentialMorphologyDefinition There also exists a SimultaneousMorphologyDefinition
Attribute MorphologyDefinition.morpheme .child This is not a morpheme, this is a full gloss; 'morpheme' refers to the Morpheme model within Signbank
Related name MorphologyDefinition.parent_gloss : parent_glosses sequential_morphology Related names are for searching the relation backwards, so instead of starting with a (sequential) morph def to get the parent gloss, you can search from a particular gloss to see whether it consists of any parts . It seems more elegant to do this with gloss.sequential_morphology than with gloss.parent_glosses.
Related name MorphologyDefinition.morpheme : morphemes compound_parents Related names are for searching the relation backwards, so instead of starting with a (sequential) morph def to get the child gloss, you can search from a particular gloss to whether it's part of a compound. It seems more elegant to do this with gloss.compound_parent than with gloss.morphemes.

Also, Gloss.morphemePart will be removed in #350 .

Hard part about this issue: the names of various things in the database need to change too.

Woseseltops avatar Jun 29 '17 14:06 Woseseltops