public static function unserializeAnnotations($annotations)
    {
        $returnValue = array();

        $reg = "/\s*@(subject|predicate|sourceLanguage|targetLanguage|source)[\t ]+(.+)(?:\s*|$)/u";
        $matches = array();
        if (false !== preg_match_all($reg, $annotations, $matches)){
            // No problems with $reg.
            if (isset($matches[1])){
                // We got some annotations.
                for ($i = 0; $i < count($matches[1]); $i++){
                    // Annotation name $i processing. Do we have a value for it?
                    $name = $matches[1][$i];
                    if (isset($matches[2][$i])){
                        // We have an annotation with a name and a value.
                        // Do not forget to unescape '--' that is not accepted in XML comments (see spec).
                        // (str_replace is unicode safe ;)!)
                        $value = $matches[2][$i];
                        $value = str_replace("\\-\\-", '--', $value);
                        $value = str_replace("\\\\", "\\", $value);
                        $returnValue[$name] = $value;
                    }
                }
            }
        }else{
            throw new tao_helpers_translation_TranslationException("A fatal error occured while parsing annotations '${annotations}.'");
        }

        return (array) $returnValue;
    }