public class StringUtilRegular extends Object
Constructor and Description |
---|
StringUtilRegular() |
Modifier and Type | Method and Description |
---|---|
static String |
encodeRussianToLatinitsa(String text,
String enc_from,
String enc_to)
Encodes the text to latinitsa, e.g.: женьшень -> zhen'shen' (Russian)
|
static int |
getFirstEmptyLinePosition(int start_pos,
String text)
Gets position of first header in text from start_pos,
e.g.
|
static int |
getFirstHeaderPosition(int start_pos,
String text)
Gets position of first header in text from start_pos,
e.g.
|
static String |
getLettersTillHyphen(String text)
Gets first letters till first hyphen "-".
|
static String |
getLettersTillSpace(String text)
Gets first letters till space.
|
static String |
getLettersTillSpaceHyphenOrPipe(String text)
Gets first letters till space " ", ...
|
static String |
getTextTillFirstHeaderOrEmptyLine(int start_pos,
String text)
Gets text from 'start_pos' position till the nearest position:
(1) of first header text, or (2) of first empty line,
(3) or till the end of text (if header and empty lines are absent).
|
static String |
getTextTillFirstHeaderPosition(int start_pos,
String text)
Gets text from 'start_pos' position till position of first header
in text, or till the end of text (if header is absent).
|
static String |
replaceComplexSpacesByTrivialSpaces(String text)
Replaces special spaces by usual whitespace, e.g.
|
static void |
stripNonWordLetters(String[] words)
Strips non-word letters in source array "words".
|
static String |
substringAndchopLastNewline(String text,
int start_pos,
int end_pos)
Gets text substring from 'start_pos' position till 'end_pos' position
and chop last symbol if it is newline \n symbol.
|
public static void stripNonWordLetters(String[] words)
public static String getLettersTillSpace(String text)
public static String getLettersTillSpaceHyphenOrPipe(String text)
public static String replaceComplexSpacesByTrivialSpaces(String text)
public static String getLettersTillHyphen(String text)
public static String encodeRussianToLatinitsa(String text, String enc_from, String enc_to)
public static int getFirstHeaderPosition(int start_pos, String text)
public static int getFirstEmptyLinePosition(int start_pos, String text)
public static String getTextTillFirstHeaderPosition(int start_pos, String text)
public static String getTextTillFirstHeaderOrEmptyLine(int start_pos, String text)
Copyright © 2011-2016 Ubiquitous Knowledge Processing (UKP) Lab. All Rights Reserved.