Generate a compact tag from a video caption by selecting the most relevant words using simple text-processing rules.
You are given a video caption as a string. Generate a tag for the video by extracting the most relevant words from the caption and combining them into a compact identifier.
A typical solution involves normalizing the caption, splitting it into words, counting or selecting important tokens, and producing a final tag string according to the rules of the problem.
Since the exact platform statement is unavailable, treat this as a string-processing interview problem focused on careful parsing and deterministic formatting.
Example 1
Input
"Leetcode daily challenge: generate tag for video caption"
Output
"leetcode-daily-challenge"
Explanation
This illustrative example keeps the most relevant normalized words and joins them into a compact tag. Exact selection rules may differ in the original problem.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.