code: public CAS process(String text) {
          CAS cas = retrieve();
  
          cas.setDocumentText(text);
          try {
              analysisEngine.process(cas);
          } catch (AnalysisEngineProcessException e) {
              if (text != null && !text.isEmpty())
                  return process(text);
              throw new RuntimeException(e);
          }
  
          return cas;
  
  
      }
docs: Use the given analysis engine and process the given text
  You must release the return cas yourself
  @param text the text to rpocess
  @return the processed cas