FeatureMatrix

class corpustools.corpus.classes.lexicon.FeatureMatrix(name, feature_entries)[source]

An object that stores feature values for segments

Parameters
namestr

Name to give the FeatureMatrix

feature_entrieslist

List of dict with one dictionary per segment, requires the key of symbol which identifies the segment

Attributes
namestr

An informative identifier for the feature matrix

featureslist

Get a list of _features that are used in this feature system

possible_valuesset

Set of values used in the FeatureMatrix

default_valuestr

Default feature value, usually corresponding to unspecified _features

stressesdict

Mapping of stress values to segments that bear that stress

placesdict

Mapping from place of articulation labels to a feature specification

mannersdict

Mapping from manner of articulation labels to a feature specification

heightdict

Mapping from vowel height labels to a feature specification

backnessdict

Mapping from vowel backness labels to a feature specification

vowel_featuresstr

Feature value (i.e., ‘+voc’) that separates vowels from consonants

voice_featurestr

Feature value (i.e., ‘+voice’) that codes voiced obstruents

diph_featurestr

Feature value (i.e., ‘+diphthong’ or ‘.high’) that separates diphthongs from monophthongs

rounded_featurestr

Feature value (i.e., ‘+round’) that codes rounded vowels

Methods

__init__(name, feature_entries)

add_feature(feature[, default])

Add a feature to the feature system

add_segment(seg, feat_spec)

Add a segment with a feature specification to the feature system

categorize(seg)

Categorize a segment into consonant/vowel, place of articulation, manner of articulation, voicing, vowel height, vowel backness, and vowel rounding.

default_fill(seg_list)

feature_match(features_to_match, ...)

param features_to_match

a list of strings representing features, e.g. ['+voice','-nasal']

features_to_segments(feature_description)

Given a feature description, return the segments in the inventory that match that feature description

seg_to_feat_line(symbol)

Get a list of feature values for a given segment in the order that features are return in get_feature_list

set_major_class_features(source)

specify(seg[, assign_defaults])

valid_feature_strings()

Get all combinations of possible_values and _features

validate()

Make sure that all segments in the matrix have all the features.