@Test public void testCreateTextAnnotationFromTokens() throws Exception { TextAnnotation ta = BasicTextAnnotationBuilder.createTextAnnotationFromTokens(tokenizedSentences); assertTrue(ta.hasView(ViewNames.SENTENCE)); assertTrue(ta.hasView(ViewNames.TOKENS)); List<Constituent> sentences = ta.getView(ViewNames.SENTENCE).getConstituents(); assertEquals(3, sentences.size()); Constituent secondSent = sentences.get(1); String newB = secondSent.getTokenizedSurfaceForm(); assertEquals(sentB, newB); List<Constituent> tokens = ta.getView(ViewNames.TOKENS).getConstituents(); assertEquals(29, tokens.size()); List<Constituent> tokensCovering = ta.getView(ViewNames.TOKENS).getConstituentsCoveringToken(6); assertEquals(1, tokensCovering.size()); assertEquals("pre-tokenized", tokensCovering.get(0).getTokenizedSurfaceForm()); assertEquals("pre-tokenized", tokensCovering.get(0).getSurfaceForm()); int sentStart = sentences.get(1).getStartSpan(); tokensCovering = ta.getView(ViewNames.TOKENS).getConstituentsCoveringToken(sentStart + 6); assertEquals(1, tokensCovering.size()); assertEquals(",", tokensCovering.get(0).getTokenizedSurfaceForm()); }
public static TextAnnotation createTextAnnotationFromTokens(List<String[]> tokenizedSentences) { return createTextAnnotationFromTokens("", "", tokenizedSentences); }
BasicTextAnnotationBuilder implements TextAnnotationBuilder { public static TextAnnotation createTextAnnotationFromTokens(List<String[]> tokenizedSentences) { return createTextAnnotationFromTokens("", "", tokenizedSentences); } }
BasicTextAnnotationBuilder implements TextAnnotationBuilder { public static TextAnnotation createTextAnnotationFromTokens(List<String[]> tokenizedSentences) { return createTextAnnotationFromTokens("", "", tokenizedSentences); }  }
BasicTextAnnotationBuilder implements TextAnnotationBuilder { public static TextAnnotation createTextAnnotationFromTokens(List<String[]> tokenizedSentences) { return createTextAnnotationFromTokens("", "", tokenizedSentences); }  static TextAnnotation createTextAnnotationFromTokens(List<String[]> tokenizedSentences); static TextAnnotation createTextAnnotationFromListofListofTokens(List<List<Object>> tokenizedSentences); static TextAnnotation createTextAnnotationFromTokens(String corpusId, String textId,
            List<String[]> tokenizedSentences); @Override TextAnnotation createTextAnnotation(String text); @Override TextAnnotation createTextAnnotation(String corpusId, String textId, String text); @Override TextAnnotation createTextAnnotation(String corpusId, String textId, String text,
            Tokenization tokenization); String getName(); }
BasicTextAnnotationBuilder implements TextAnnotationBuilder { public static TextAnnotation createTextAnnotationFromTokens(List<String[]> tokenizedSentences) { return createTextAnnotationFromTokens("", "", tokenizedSentences); }  static TextAnnotation createTextAnnotationFromTokens(List<String[]> tokenizedSentences); static TextAnnotation createTextAnnotationFromListofListofTokens(List<List<Object>> tokenizedSentences); static TextAnnotation createTextAnnotationFromTokens(String corpusId, String textId,
            List<String[]> tokenizedSentences); @Override TextAnnotation createTextAnnotation(String text); @Override TextAnnotation createTextAnnotation(String corpusId, String textId, String text); @Override TextAnnotation createTextAnnotation(String corpusId, String textId, String text,
            Tokenization tokenization); String getName();  }