protected void annotatePhrase(PhraseMatcher.Phrase phrase, Query query, int traceLevel) {
        for (StringTokenizer tokens = new StringTokenizer(phrase.getData(), "|", false); tokens.hasMoreTokens(); ) {
            String token = tokens.nextToken();
            int semicolonIndex = token.indexOf(";");
            String annotation = token;
            String value = "";
            if (semicolonIndex > 0) {
                annotation = token.substring(0, semicolonIndex);
                value = token.substring(semicolonIndex + 1);
            }

            // Annotate all matched items
            phrase.getItem(0).addAnnotation(annotation, phrase);
            if (traceLevel >= 4)
                query.trace("   Annotating '" + phrase + "' as " + annotation +
                            (value.equals("") ? "" :"=" + value),false,1);
        }
    }
Analyzes a query over this rule base

@param query the query to analyze
@param traceLevel the level of tracing to add to the query
@return the error caused by analyzing the query, or null if there was no error
        If there is an error, this query is destroyed (unusable)
container-search/src/main/java/com/yahoo/prelude/semantics/RuleBase.java