(self)
return tiers
Splits the textgrid file into substrings corresponding to tiers.
Splits the textgrid file into substrings corresponding to tiers.
Splits the textgrid file into substrings corresponding to tiers .
def _find_tiers(self):
    """
        Splits the textgrid file into substrings corresponding to tiers. 
        """

    if self.text_type == "ooTextFile":
      m = OOTEXTFILE
      header = " +item \["
    elif self.text_type == "ChronTextFile":
      m = CHRONTEXTFILE
      header = "\"\S+\" \".*\" \d+\.?\d* \d+\.?\d*"
    elif self.text_type == "OldooTextFile":
      m = OLDOOTEXTFILE
      header = "\".*\"[\r\n]+\".*\""

    file_info = m.findall(self.read_file)[0]
    self.xmin = float(file_info[0])
    self.xmax = float(file_info[1])
    self.t_time = self.xmax - self.xmin
    self.size = int(file_info[2])
    tiers = self._load_tiers(header)
    return tiers
def _find_tiers ( self ) : if self . text_type == "ooTextFile" : m = OOTEXTFILE header = " +item \[" elif self . text_type == "ChronTextFile" : m = CHRONTEXTFILE header = "\"\S+\" \".*\" \d+\.?\d* \d+\.?\d*" elif self . text_type == "OldooTextFile" : m = OLDOOTEXTFILE header = "\".*\"[\r\n]+\".*\"" file_info = m . findall ( self . read_file ) [ 0 ] self . xmin = float ( file_info [ 0 ] ) self . xmax = float ( file_info [ 1 ] ) self . t_time = self . xmax - self . xmin self . size = int ( file_info [ 2 ] ) tiers = self . _load_tiers ( header ) return tiers