![]() |
Baby Language Lab Scripts
A collection of data processing tools.
|
This class provides the ability to export data for the WH-Frequency App. More...
Public Member Functions | |
def | __init__ |
Constructor. More... | |
def | write_header_row |
Writes the column headings to the spreadsheet file. More... | |
def | write_count_row |
Writes a row of data to the spreadsheet file. More... | |
def | finish |
Writes a final 'Totals' row to the spreadsheet file. More... | |
Public Attributes | |
logger | |
filename | |
trs_filename | |
csv_file | |
csv_writer | |
This class provides the ability to export data for the WH-Frequency App.
Note: 'Count Columns' are columns that the user has added to the main window. These columns count user-specified (regex) patterns.
Definition at line 9 of file freq_exporter.py.
def parsers.freq_exporter.FreqExporter.__init__ | ( | self, | |
filename, | |||
trs_filename | |||
) |
Constructor.
self | |
filename | (string) full path to the CSV spreadsheet file to write to |
trs_filename | (string) full path to the trs file being used by the WH-Frequency App |
Definition at line 14 of file freq_exporter.py.
def parsers.freq_exporter.FreqExporter.finish | ( | self, | |
total_whq, | |||
count_col_totals | |||
) |
Writes a final 'Totals' row to the spreadsheet file.
This row contains the sum of the 'WH count" column, in addition to the sums of the user-defined 'count columns'.
self | |
total_whq | (int) the sum of the 'WH Counts' across all rows that have been written to the spreadsheet. |
count_col_totals | (list) list of integers - each representing the sum of a particular 'count-column'. |
Definition at line 59 of file freq_exporter.py.
def parsers.freq_exporter.FreqExporter.write_count_row | ( | self, | |
time_str, | |||
phrase, | |||
speakers_str, | |||
targets_str, | |||
num_whq, | |||
count_col_vals | |||
) |
Writes a row of data to the spreadsheet file.
This includes the values for the user-specified 'count columns'.
self | |
time_str | (string) a string containing the start and end times of the utterance this row corresponds to (eg. '00:01:00 - 00:02:00') |
phrase | (string) the transcription phrase for the utterance this row corresponds to |
speakers_str | (string) a string containing a description of the speakers for the utterance this row corresponds to |
targets_str | (string) a string containing a description of the target listenders for the utterance this row corresponds to |
num_whq | (int) an integer representing the number of WH Questions conatined in the utterance this row corresponds to |
count_col_vals | (list) list of the values for the user-defined 'count columns' |
Definition at line 49 of file freq_exporter.py.
def parsers.freq_exporter.FreqExporter.write_header_row | ( | self, | |
count_col_headers | |||
) |
Writes the column headings to the spreadsheet file.
self | |
count_col_headers | (list) list of strings, each representing the headers for any 'count columns' the user has added |
Definition at line 32 of file freq_exporter.py.
parsers.freq_exporter.FreqExporter.csv_file |
Definition at line 26 of file freq_exporter.py.
parsers.freq_exporter.FreqExporter.csv_writer |
Definition at line 27 of file freq_exporter.py.
parsers.freq_exporter.FreqExporter.filename |
Definition at line 22 of file freq_exporter.py.
parsers.freq_exporter.FreqExporter.logger |
Definition at line 16 of file freq_exporter.py.
parsers.freq_exporter.FreqExporter.trs_filename |
Definition at line 23 of file freq_exporter.py.