![]() |
Baby Language Lab Scripts
A collection of data processing tools.
|
This class represents a LENA-defined speaker. More...
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | is_type |
Checks if this speaker has a particular speaker type. More... | |
def | is_distance |
Checks if this speaker has particular distance (near/far) More... | |
def | has_property |
Checks if this speaker has a particular property (properties include being media, being overlapping, or being non-verbal noise) More... | |
def | get_codeinfo |
Accessor method for codeinfo attribute. More... | |
![]() | |
def | __str__ |
Builds a nicely formatted string containing all attributes of this object (except those in omit_attr_names), for debugging purposes. More... | |
Public Attributes | |
speaker_id | |
speaker_codeinfo | |
This class represents a LENA-defined speaker.
Every speaker has a LENA speaker code (e.g. MAN, FAN, CHF).
Definition at line 8 of file speaker.py.
def data_structs.speaker.Speaker.__init__ | ( | self, | |
speaker_id, | |||
speaker_codeinfo | |||
) |
Constructor.
self | |
speaker_id | (string) this is the 'id' name given to the speaker in the TRS file (eg. 'spk1', 'spk2', etc.) |
speaker_codeinfo | (CodeInfo) A CodeInfo object (code-encapsulating object with info from the DB speaker_codes table) corresponding to this Speaker's LENA speaker code |
Definition at line 13 of file speaker.py.
def data_structs.speaker.Speaker.get_codeinfo | ( | self | ) |
Accessor method for codeinfo attribute.
self |
Definition at line 40 of file speaker.py.
def data_structs.speaker.Speaker.has_property | ( | self, | |
prop | |||
) |
Checks if this speaker has a particular property (properties include being media, being overlapping, or being non-verbal noise)
self | |
prop | (int) the property to check for. This should be one of the options from the enum DBConstants.SPEAKER_PROPS. See BLLDatabase._get_speaker_props_enum() for possible options. |
Definition at line 34 of file speaker.py.
def data_structs.speaker.Speaker.is_distance | ( | self, | |
distance | |||
) |
Checks if this speaker has particular distance (near/far)
self | |
distance | (int) the distance to check for - this should be one of the options from the enum DBCONSTANTS.SPEAKER_DISTANCES |
Definition at line 28 of file speaker.py.
def data_structs.speaker.Speaker.is_type | ( | self, | |
speaker_type | |||
) |
Checks if this speaker has a particular speaker type.
self | |
speaker_type | (int) the type to check for - this should be one of the options from the enum DBConstants.SPEAKER_TYPES |
Definition at line 21 of file speaker.py.
data_structs.speaker.Speaker.speaker_codeinfo |
Definition at line 15 of file speaker.py.
data_structs.speaker.Speaker.speaker_id |
Definition at line 14 of file speaker.py.