code: public static void fixNoSentences(JCas jCas) {
          Collection<Sentence> sentences = select(jCas, Sentence.class);
          if (sentences.size() == 0) {
              String text = jCas.getDocumentText();
              Sentence sentence = new Sentence(jCas, 0, text.length());
              sentence.addToIndexes();
          }
      }
docs: If this cas has no Sentence annotation, creates one with the whole cas
  text