public function classify(array $classes, DocumentInterface $d)
    {
        $maxclass = current($classes);
        $maxvote = $this->getVote($maxclass,$d);
        while ($class = next($classes)) {
            $v = $this->getVote($class,$d);
            if ($v>$maxvote) {
                $maxclass = $class;
                $maxvote = $v;
            }
        }

        return $maxclass;
    }
public function classify(array $classes, DocumentInterface $d)
    {
        $maxclass = current($classes);
        $maxvote = $this->getVote($maxclass,$d);
        while ($class = next($classes)) {
            $v = $this->getVote($class,$d);
            if ($v>$maxvote) {
                $maxclass = $class;
                $maxvote = $v;
            }
        }

        return $maxclass;
    }
public function classify ( array $ classes , DocumentInterface $ d ) { $ maxclass = current ( $ classes ) ; $ maxvote = $ this -> getVote ( $ maxclass , $ d ) ; while ( $ class = next ( $ classes ) ) { $ v = $ this -> getVote ( $ class , $ d ) ; if ( $ v > $ maxvote ) { $ maxclass = $ class ; $ maxvote = $ v ; } } return $ maxclass ; }
Compute the vote for every class. Return the class that
receive the maximum vote.

@param  array             $classes A set of classes
@param  DocumentInterface $d       A Document
@return string            A class
Compute the vote for every class . Return the class that receive the maximum vote .