private function determineCase($word)
    {
        $ret = -1;
        $trimmedword = trim($word);
        /*We need this variable. Without the next of would not work
        (trim changes the variable automatically to a string!)*/
        if (\is_string($word) && (mb_strlen($trimmedword) > 0)) {
            $i = 0;
            $found = false;
            $openbrace = 0;
            while (!$found && ($i <= mb_strlen($word))) {
                $letter = mb_substr($trimmedword, $i, 1);
                $ord = \ord($letter);
                if (123 === $ord) { //Open brace
                    ++$openbrace;
                }
                if (125 === $ord) { //Closing brace
                    --$openbrace;
                }
                if (($ord >= 65) && ($ord <= 90) && (0 === $openbrace)) { //The first character is uppercase
                    $ret = 1;
                    $found = true;
                } elseif (($ord >= 97) && ($ord <= 122) && (0 === $openbrace)) { //The first character is lowercase
                    $ret = 0;
                    $found = true;
                } else { //Not yet found
                    ++$i;
                }
            }
        } else {
            throw new ProcessorException('Could not determine case on word: '.$word);
        }

        return $ret;
    }