|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Static Public Member Functions | |
| static boolean | isNonterminal (String token) |
| static String | cleanNonterminal (String nt) |
| static String | cleanIndexedNonterminal (String nt) |
| static String | stripNt (String nt) |
| static int | getNonterminalIndex (String nt) |
| static String | markup (String nt) |
| static String | markup (String nt, int index) |
| static boolean | isNumber (String string) |
| static boolean | useUTF8 () |
Static Package Functions | |
| [static initializer] | |
Static Private Attributes | |
| static Map< String, String > | cache |
Utility class for format issues.
| joshua.util.FormatUtils.[static initializer] | ( | ) | [static, package] |
| static String joshua.util.FormatUtils.cleanIndexedNonterminal | ( | String | nt | ) | [static] |
| static String joshua.util.FormatUtils.cleanNonterminal | ( | String | nt | ) | [static] |
Nonterminals are stored in the vocabulary in square brackets. This removes them when you just want the raw nonterminal word.
| nt | the nonterminal, e.g., "[GOAL]" |
| static int joshua.util.FormatUtils.getNonterminalIndex | ( | String | nt | ) | [static] |
| static boolean joshua.util.FormatUtils.isNonterminal | ( | String | token | ) | [static] |
Determines whether the string is a nonterminal by checking that the first character is [ and the last character is ].
| token |
| static boolean joshua.util.FormatUtils.isNumber | ( | String | string | ) | [static] |
Returns true if the String parameter represents a valid number.
The body of this method is taken from the Javadoc documentation for the Java Double class.
| string |
true if the string represents a valid number, false otherwise | static String joshua.util.FormatUtils.markup | ( | String | nt | ) | [static] |
Ensures that a string looks like what the system considers a nonterminal to be.
| nt | the nonterminal string |
| static String joshua.util.FormatUtils.markup | ( | String | nt, |
| int | index | ||
| ) | [static] |
| static String joshua.util.FormatUtils.stripNt | ( | String | nt | ) | [static] |
| static boolean joshua.util.FormatUtils.useUTF8 | ( | ) | [static] |
Set System.out and System.err to use the UTF8 character encoding.
true if both System.out and System.err were successfully set to use UTF8, false otherwise. Map<String, String> joshua.util.FormatUtils.cache [static, private] |