inspect_directory

polyglotdb.io.helper.inspect_directory(directory)[source]

Function to inspect a directory and return the most likely type of files within it.

Searches currently for ‘textgrid’, ‘text’, ‘buckeye’, ‘timit’, and ‘partitur’ file types.

Parameters:
directorystr

Full path to the directory

Returns:
str

Most likely type of files

dict

Dictionary of the found files separated by the types searched for