#C6591. Feedback Classification

    ID: 50368 Type: Default 1000ms 256MiB

Feedback Classification

Feedback Classification

You are given a series of feedback messages. Your task is to automatically classify each feedback into one of four categories: Positive, Negative, Mixed, or Neutral.

For each feedback, check for the presence of keywords from two lists:

  • Positive keywords: good, great, satisfactory, excellent, positive, fantastic
  • Negative keywords: bad, poor, terrible, negative, horrible, awful

The classification rules are as follows:

  • If both a positive and a negative keyword appear in the feedback, classify it as Mixed.
  • If only a positive keyword is found, classify it as Positive.
  • If only a negative keyword is found, classify it as Negative.
  • If none of the keywords appear, classify the feedback as Neutral.
  • </p>

    Note: The keyword check should be case-insensitive and the search for keywords should be done on the entire feedback message.

    In this problem, the input is taken from stdin and the output must be written to stdout.

    inputFormat

    The first line of input contains an integer N denoting the number of feedback messages. Each of the following N lines contains a single feedback string.

    outputFormat

    For each feedback message, output the classification on a separate line. The classification must be one of Positive, Negative, Mixed, or Neutral.

    ## sample
    4
    The product is absolutely fantastic and works great
    Poor performance for the price I paid
    Quite satisfactory but could be better
    No comments on the horrible experience
    
    Positive
    

    Negative Positive Negative

    </p>