#K57592. Sentiment Analysis Challenge

    ID: 30454 Type: Default 1000ms 256MiB

Sentiment Analysis Challenge

Sentiment Analysis Challenge

Your task is to develop a simple sentiment analysis program. The program should read a review text from standard input and classify its sentiment as either positive, negative, or neutral.

The classification is based on the occurrence of specific keywords in the review text. The following rules apply:

  • If the review text (case-insensitive) contains any of the positive keywords: \(love\), \(amazing\), \(great\), \(excellent\), or \(fantastic\), then output positive.
  • If the review text contains any of the negative keywords: \(disappointing\), \(broke\), \(not satisfied\), \(terrible\), or \(bad\), then output negative.
  • If none of these keywords are found, output neutral.

Note that if both positive and negative keywords are present, the program should prioritize negative sentiment and output negative.

Input is provided via stdin and output should be printed to stdout.

inputFormat

A single review text provided as standard input. The review text may consist of one or more lines.

outputFormat

A single word that is the sentiment classification: positive, negative, or neutral.

## sample
I love the new features, amazing experience!
positive