public function decision($string)
    {
        // Do not call functions so that we'll compute only one time
        $dominantClass = $this->sentiment->categorise($string);

        switch ($dominantClass) {
            case 'neg':
                return self::NEGATIVE;

            case 'neu':
                return self::NEUTRAL;

            case 'pos':
                return self::POSITIVE;
        }
    }
public function decision($string)
    {
        // Do not call functions so that we'll compute only one time
        $dominantClass = $this->sentiment->categorise($string);

        switch ($dominantClass) {
            case 'neg':
                return self::NEGATIVE;

            case 'neu':
                return self::NEUTRAL;

            case 'pos':
                return self::POSITIVE;
        }
    }
public function decision ( $ string ) { // Do not call functions so that we'll compute only one time $ dominantClass = $ this -> sentiment -> categorise ( $ string ) ; switch ( $ dominantClass ) { case 'neg' : return self :: NEGATIVE ; case 'neu' : return self :: NEUTRAL ; case 'pos' : return self :: POSITIVE ; } }
Get the sentiment of a phrase.

@param string $string The given sentence

@return string Possible values: negative|neutral|positive
Get the sentiment of a phrase .