Package de.l3s.boilerpipe.document
Class TextDocumentStatistics
java.lang.Object
de.l3s.boilerpipe.document.TextDocumentStatistics
Provides shallow statistics on a given TextDocument
- Author:
- Christian Kohlschuetter
-
Constructor Summary
ConstructorsConstructorDescriptionTextDocumentStatistics(TextDocument doc, boolean contentOnly) Computes statistics on a givenTextDocument. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the average number of words at block-level (= overall number of words divided by the number of blocks).intReturns the overall number of words in all blocks.
-
Constructor Details
-
TextDocumentStatistics
Computes statistics on a givenTextDocument.- Parameters:
doc- TheTextDocument.contentOnly- if true then o
-
-
Method Details
-
avgNumWords
public float avgNumWords()Returns the average number of words at block-level (= overall number of words divided by the number of blocks).- Returns:
- Average
-
getNumWords
public int getNumWords()Returns the overall number of words in all blocks.- Returns:
- Sum
-