Table

korus.db_util.table.create_annotation_table(conn)[source]

Create annotation table according to Korus schema.

TODO: Change tentative_label_id type from INTEGER to JSON ? (to allow for lists)

Or add another column named label_list_id (or similar)

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_deployment_table(conn)[source]

Create deployment table according to Korus schema.

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_file_job_relation_table(conn)[source]

Create file-job relation table according to Korus schema.

Also creates an index on (job_id) for faster querying.

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_file_table(conn)[source]

Create file table according to Korus schema.

Also creates an index on (deployment_id, filename) for faster querying.

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_granularity_table(conn)[source]

Create granularity table according to Korus schema.

Also adds entries for the standard Korus granularities: unit, window, file, batch, encounter

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_job_table(conn)[source]

Create job table according to Korus schema.

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_label_table(conn)[source]

Create label table according to Korus schema.

Also creates an index on (taxonomy_id, sound_source_tag, sound_type_tag) for faster querying.

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_model_table(conn)[source]

Create model table according to Korus schema.

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_storage_table(conn)[source]

Create data-storage table according to Korus schema.

@address can be an IP address or a URL

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_tag_table(conn)[source]

Create tag table according to Korus schema.

Also adds an entry for auto-generated negatives.

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_taxonomy_created_node_table(conn)[source]

Create taxonomy_created_node table according to Korus schema.

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_taxonomy_removed_node_table(conn)[source]

Create taxonomy_removed_node table according to Korus schema.

Args:
conn: sqlite3.Connection

Database connection

korus.db_util.table.create_taxonomy_table(conn)[source]

Create taxonomy table according to Korus schema.

Args:
conn: sqlite3.Connection

Database connection