public void process(JCas aJCas) throws AnalysisEngineProcessException {
    int MAX_N_BEST_CHUNKS = 5; // the number of most similar words
    JCas jcas = aJCas;
    String Str = jcas.getDocumentText();
    String line = Str.substring(0, 14); // extrate the lineID
    char cha[] = Str.toCharArray();
    ConfidenceChunker chunker = null; // lingpipe unit
    double confidence = 0; // confidence for whether a word/phrase is the target

    Str = Str.substring(15, Str.length());// extrate the file part
    cha = Str.toCharArray();
    URL base = ClassLoader.getSystemClassLoader().getResource("");
    File modelFile = new File(base+"\ne-en-bio-genetag.HmmChunker");
    InputStream in = this.getClass().getResourceAsStream(modelFile.toString());
    try {
      // from lingpipe
      // import the trained data, biogenetag data
      chunker = (ConfidenceChunker) AbstractExternalizable.readObject(new File(
              "ne-en-bio-genetag.HmmChunker"));
    } catch (IOException e) {
      e.printStackTrace();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    }
    // from lingpipe
    // for each input string, generate the five words most likely to be the target words.
    Iterator<Chunk> it = (Iterator) chunker.nBestChunks(cha, 0, cha.length, MAX_N_BEST_CHUNKS);
    while (it.hasNext()) {
      Chunk c = it.next();
      // organize the confidence for the words
      confidence = Math.pow(2.0, c.score());
      type annotation = new type(aJCas);
      // only generate the words with the confidence greater than the threshold, i.e. 0.6
      if (confidence > 0.6) {
        annotation.setGeneDoc(Str);
        annotation.setLineID(line);
        annotation.setStartOffSet(c.start());
        annotation.setEndOffSet(c.end());
        annotation.addToIndexes();
      }
    }
  }