#K82222. Customer Sentiment Classification
Customer Sentiment Classification
Customer Sentiment Classification
You have been tasked with classifying customer service interactions based on given keyword sets. Each interaction should be classified as Positive if it contains any word from the positive keyword set, Negative if it does not include any positive keyword but contains at least one negative keyword, and Neutral if it contains neither.
Formally, given an integer \( n \) specifying the number of interactions, a space‐separated string of positive keywords, a space‐separated string of negative keywords, and \( n \) subsequent lines each representing an interaction, output the sentiment category for each interaction on a new line.
Note: If an interaction contains both positive and negative keywords, classify it as Positive. The keywords are matched exactly by splitting the interaction text on whitespace.
inputFormat
The first line contains an integer \( n \) representing the number of interactions. The second line is a space-separated list of positive keywords. The third line is a space-separated list of negative keywords. The next \( n \) lines each contain a customer interaction string.
outputFormat
Output \( n \) lines. Each line should be the sentiment category for the respective interaction: either Positive, Negative, or Neutral.
## sample1
great excellent amazing
bad terrible awful
The product is great and amazing
Positive
</p>