org.geonames.wikipedia
Class TextSummaryExtractor
java.lang.Object
org.geonames.wikipedia.TextSummaryExtractor
public class TextSummaryExtractor
- extends Object
- Author:
- marc
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextSummaryExtractor
public TextSummaryExtractor()
extractSummary
public static String extractSummary(String pText,
int length)
- extract a text summary from a wikipedia article. The wikipedia markup is
removed. The length of the summary is equal or lower the length of the
parameter. The extractor tries to end the summary at a fullstop.
- Parameters:
pText - length -
- Returns:
removeWhiteSpace
public static String removeWhiteSpace(String pString)
- removes sequences of whitespace and keeps only one whitespace character
- Parameters:
pString -
- Returns:
removeBold
public static String removeBold(String pString)
removeItalic
public static String removeItalic(String pString)