sktalk.corpus.write.writer

Classes

Writer

Helper class that provides a standard way to create an ABC using

Module Contents

class sktalk.corpus.write.writer.Writer[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

abstract asdict()[source]
write_json(path: str = './file.json')[source]

Write an object to a JSON file.

Parameters:

path (str) – The path to the output file.

write_csv(path: str = './file.csv')[source]

Write the object to CSV files.

Multiple csv files are created: one for the the utterances, and one for the collected metadata. The filename is used for the utterance csv file. The metadata csv file is named with the same filename, but with “_metadata” appended; thus: - file.csv (contains utterances) - file_metadata.csv (contains all metadata)

Parameters:

path (str, optional) – Base name of csv output files. Defaults to “./file.csv”.

_specify_path(path: pathlib.Path, specifier: str)[source]
classmethod _metadata_to_df(metadata: dict)[source]
property metadata_df[source]
property utterance_df[source]