public void initialize(UimaContext aContext){
  annotate_tokens=(Boolean)aContext.getConfigParameterValue(PARAM_ANNOTATE_TOKENS);
  annotate_sentences=(Boolean)aContext.getConfigParameterValue(PARAM_ANNOTATE_SENTENCES);
  annotate_partofspeech=(Boolean)aContext.getConfigParameterValue(PARAM_ANNOTATE_PARTOFSPEECH);
  sentModelPath=(String)aContext.getConfigParameterValue(PARAM_SENTSEGMODEL_PATH);
  wordModelPath=(String)aContext.getConfigParameterValue(PARAM_WORDSEGMODEL_PATH);
  posModelPath=(String)aContext.getConfigParameterValue(PARAM_POSMODEL_PATH);
  if (sentModelPath != null)   if (!vnSenSegmenter.init(sentModelPath)) {
    Logger.printError(component,"Error initializing the sentence segmenter model: " + sentModelPath);
    System.exit(-1);
  }
  if (wordModelPath != null)   try {
    vnSegmenter.init(wordModelPath);
  }
 catch (  Exception e) {
    Logger.printError(component,"Error initializing the word segmenter model: " + wordModelPath);
    System.exit(-1);
  }
  if (posModelPath != null)   try {
    dataTagger.addContextGenerator(new POSContextGenerator(posModelPath + File.separator + "featuretemplate.xml"));
    classifier=new Classification(posModelPath);
  }
 catch (  Exception e) {
    Logger.printError(component,"Error initializing the POS tagging model: " + posModelPath);
    System.exit(-1);
  }
}

public void initialize ( UimaContext aContext ) { annotate_tokens = ( Boolean ) aContext . getConfigParameterValue ( PARAM_ANNOTATE_TOKENS ) ; annotate_sentences = ( Boolean ) aContext . getConfigParameterValue ( PARAM_ANNOTATE_SENTENCES ) ; annotate_partofspeech = ( Boolean ) aContext . getConfigParameterValue ( PARAM_ANNOTATE_PARTOFSPEECH ) ; sentModelPath = ( String ) aContext . getConfigParameterValue ( PARAM_SENTSEGMODEL_PATH ) ; wordModelPath = ( String ) aContext . getConfigParameterValue ( PARAM_WORDSEGMODEL_PATH ) ; posModelPath = ( String ) aContext . getConfigParameterValue ( PARAM_POSMODEL_PATH ) ; if ( sentModelPath != null ) if ( ! vnSenSegmenter . init ( sentModelPath ) ) { Logger . printError ( component , "Error initializing the sentence segmenter model: " + sentModelPath ) ; System . exit ( - 1 ) ; } if ( wordModelPath != null ) try { vnSegmenter . init ( wordModelPath ) ; } catch ( Exception e ) { Logger . printError ( component , "Error initializing the word segmenter model: " + wordModelPath ) ; System . exit ( - 1 ) ; } if ( posModelPath != null ) try { dataTagger . addContextGenerator ( new POSContextGenerator ( posModelPath + File . separator + "featuretemplate.xml" ) ) ; classifier = new Classification ( posModelPath ) ; } catch ( Exception e ) { Logger . printError ( component , "Error initializing the POS tagging model: " + posModelPath ) ; System . exit ( - 1 ) ; } }
initialization method where we fill configuration values and check some prerequisites
