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);
}
phrase.getItem(0).addAnnotation(annotation,phrase);
if (traceLevel>=4)
query.trace(" Annotating '" + phrase + "' as " + annotation +
(value.equals("") ? "" :"=" + value),false,1);
}
}