- class corpustools.corpus.classes.lexicon.Inventory(update=False)¶
Inventories contain information about a Corpus’ segmental inventory. This class exists mainly for the purposes of saving and loading user data. When a user loads a corpus into PCT, the Inventory is passed to the constructor of an InventoryModel (corpustoolsguimodels). The InventoryModel is what the user will interact with, and it has several useful functions for analyzing, modifying and sorting the contents of an inventory. The InventoryModel is also connected with an InventoryView (corpustoolsgui
iews) for the purposes of displaying inventory charts in PCT.
User data is saved using Python’s built-in pickle module. However, Qt objects (like the InventoryModel) cannot be pickled. Instead, the data from the model is copied to this Inventory class, which is a native Python object and can be properly pickled.
- datadict, optional
Mapping from segment symbol to Segment objects
List of all _features used as specifications for segments
Set of values that segments use for _features
Mapping of stress values to segments that bear that stress
Mapping from place of articulation labels to sets of segments
Mapping from manner of articulation labels to sets of segments
Mapping from vowel height labels to sets of segments
Mapping from vowel backness labels to sets of segments
Feature value (i.e., ‘+voc’) that separates vowels from consonants
Feature value (i.e., ‘+voice’) that codes voiced obstruents
Feature value (i.e., ‘+diphthong’ or ‘.high’) that separates diphthongs from monophthongs
Feature value (i.e., ‘+round’) that codes rounded vowels
Given a feature description, return the segments in the inventory that match that feature description
Takes an InventoryModel as input, and updates attributes.
Get all combinations of