question: public static JCas runTest ( String aDocumentId , AnalysisEngine aEngine , String aLanguage , String aDocument ) throws UIMAException { if ( offline ) { System . setProperty ( ResourceObjectProviderBase . PROP_REPO_OFFLINE , "true" ) ; } offline = true ; JCas jcas = aEngine . newJCas ( ) ; if ( aDocumentId != null ) { DocumentMetaData meta = DocumentMetaData . create ( jcas ) ; meta . setDocumentId ( aDocumentId ) ; } jcas . setDocumentLanguage ( aLanguage ) ; TokenBuilder < Token , Sentence > tb = new TokenBuilder < Token , Sentence > ( Token . class , Sentence . class ) ; tb . buildTokens ( jcas , aDocument ) ; aEngine . process ( jcas ) ; AssertAnnotations . assertValid ( jcas ) ; return jcas ; }
target:  Run an analysis engine using a document. The document is automatically split into tokens based on spaces and into sentences based on newline. Make sure the punctuation is surrounded by spaces!