if (textSize > contentSizeLimit )
doc.setContents( (new StringBuffer( doc.getContents().substring(0, contentSizeLimit ) ) ) );
LingpipeTools sentTools = new LingpipeTools();
sentTools.buildSentences(doc.getContents().toString()); String sentence; int i = 0;
while ( (sentence = sentTools.nextSentence()) != null)
{ System.out.println(" " + i + "( " + sentence.length() + " ) : " + sentence); i++; }
System.out.println("Ended testPdfFile");
}