Write a checker that accepts only well-formed tasks. Standard input: a line columns: date district pm25 … (the data abstraction), then one task per line: ACTION TARGET ATTRIBUTE [ATTRIBUTE…].
Vocabulary — actions and their branch: discover, present, enjoy → analyze/consume; annotate, record, derive → analyze/produce; lookup, locate, browse, explore → search; identify, compare, summarize → query. Targets and their scope: trends, outliers, features → all data; distribution, extremes → one attribute; dependency, correlation, similarity → many attributes; topology, paths → network; shape → spatial.
For each task print OK <task> [<branch> | <scope>] (OK followed by 5 spaces) or REJECT <task>: followed by all problems joined with ; , in this order: unknown action, unknown target, unknown attribute(s), no attribute named, and (for many-attribute targets) fewer than two attributes. Messages: 'show' is not an action in the vocabulary, 'everything' is not a target in the vocabulary, unknown attribute(s): ozone, no attribute named, 'dependency' needs at least two attributes. Finish with 4 task(s) well formed.