Baby Language Lab Scripts
A collection of data processing tools.
 All Classes Namespaces Files Functions Variables Pages
data_structs.speaker.Speaker Class Reference

This class represents a LENA-defined speaker. More...

Inheritance diagram for data_structs.speaker.Speaker:

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...
 
- Public Member Functions inherited from data_structs.base_objects.BLLObject
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
 

Detailed Description

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.

Constructor & Destructor Documentation

def data_structs.speaker.Speaker.__init__ (   self,
  speaker_id,
  speaker_codeinfo 
)

Constructor.

Parameters
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.

Member Function Documentation

def data_structs.speaker.Speaker.get_codeinfo (   self)

Accessor method for codeinfo attribute.

Parameters
self
Returns
(CodeInfo) A CodeInfo object (parsers.codeinfo.py)

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)

Parameters
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)

Parameters
self
distance(int) the distance to check for - this should be one of the options from the enum DBCONSTANTS.SPEAKER_DISTANCES
Returns
(boolean) True if this speaker has the specified distance, False otherwise

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.

Parameters
self
speaker_type(int) the type to check for - this should be one of the options from the enum DBConstants.SPEAKER_TYPES
Returns
(boolean) True if this speaker is of type 'speaker_type', False otherwise

Definition at line 21 of file speaker.py.

Member Data Documentation

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.


The documentation for this class was generated from the following file: