Package com.mta.tehreer.unicode
Class ScriptClassifier
java.lang.Object
com.mta.tehreer.unicode.ScriptClassifier
This class implements UAX #24 available at
http://www.unicode.org/reports/tr24.
-
Constructor Summary
ConstructorDescriptionScriptClassifier
(String text) Constructs a script classifier object for the specified text. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list containing the resolved scripts of all characters in source text.Returns an iterable of resolved script runs in source text.getScriptRuns
(int charStart, int charEnd) Returns an iterator of resolved script runs within the specified range of source text.getText()
Returns the text that the script classifier object was created for.toString()
-
Constructor Details
-
ScriptClassifier
Constructs a script classifier object for the specified text.- Parameters:
text
- The text whose script classification is desired.
-
-
Method Details
-
getText
Returns the text that the script classifier object was created for.- Returns:
- The text that the script classifier object was created for.
-
getCharScripts
Returns a list containing the resolved scripts of all characters in source text. The valid script values are available inScript
class as static constants.- Returns:
- A list containing the resolved scripts of all characters in source text.
-
getScriptRuns
Returns an iterable of resolved script runs in source text.- Returns:
- An iterable of resolved script runs in source text.
-
getScriptRuns
Returns an iterator of resolved script runs within the specified range of source text.- Parameters:
charStart
- The index to the first character in source text.charEnd
- The index after the last character in source text.- Returns:
- An iterator of script runs within the specified range of source text.
-
toString
-