private String getAnnotations ( Annotate annotator , String stringFromClient ) throws JDOMException , IOException { // get a breader from the string coming from the client BufferedReader clientReader = new BufferedReader ( new StringReader ( stringFromClient ) ) ; KAFDocument kaf = KAFDocument . createFromStream ( clientReader ) ; KAFDocument . LinguisticProcessor newLp = kaf . addLinguisticProcessor ( "entities" , "ixa-pipe-nerc-" + Files . getNameWithoutExtension ( model ) , version + "-" + commit ) ; newLp . setBeginTimestamp ( ) ; annotator . annotateNEsToKAF ( kaf ) ; // get outputFormat String kafToString = null ; if ( outputFormat . equalsIgnoreCase ( "conll03" ) ) { kafToString = annotator . annotateNEsToCoNLL2003 ( kaf ) ; } else if ( outputFormat . equalsIgnoreCase ( "conll02" ) ) { kafToString = annotator . annotateNEsToCoNLL2002 ( kaf ) ; } else { newLp . setEndTimestamp ( ) ; kafToString = kaf . toString ( ) ; } return kafToString ; }
Named Entity annotator .