Keywords List - Python Code Explanation

Goal of the Script

This Python module defines keyword dictionaries used for incident classification of YouTube videos after retrieval. The keyword lists provide the terms used to identify different types of incidents and support automated classification.

Code Description

The script organizes classification terms into separate keyword lists. Each list represents an incident category and contains words and phrases that may appear in video titles, descriptions, or related text.

Incident Keyword Categories

The module defines keyword groups for the following categories:

Category Mapping

The CATEGORY_MAP dictionary connects each incident category with its corresponding keyword list. This structure allows classification programs to loop through categories and apply consistent keyword matching.

Category Weights

The CATEGORY_WEIGHTS dictionary assigns importance scores to incident categories. These weights can be used by classification programs when multiple categories are identified or when prioritizing incident types.

Use in the Classification Workflow

This module is designed to be imported by other Python programs, such as YouTube API search and classification scripts. The importing program uses the keyword lists and category mappings to classify retrieved videos.

Summary

This script provides a reusable keyword-based classification framework. By separating keywords, category mappings, and weights into a dedicated module, the classification workflow becomes easier to maintain, expand, and apply to new datasets.