|
Joshua
open source statistical hierarchical phrase-based machine translation system
|
Public Member Functions | |
| int[] | getWordIDs () |
| int | getWordID (int position) |
| int | size () |
| List< Phrase > | getSubPhrases () |
| List< Phrase > | getSubPhrases (int maxLength) |
| Phrase | subPhrase (int start, int end) |
| int | compareTo (Phrase other) |
| String | toString () |
Representation of a sequence of tokens.
| int joshua.corpus.Phrase.compareTo | ( | Phrase | other | ) |
Compares the two strings based on the lexicographic order of words defined in the Vocabulary.
| other | the object to compare to |
Implemented in joshua.corpus.AbstractPhrase.
| List<Phrase> joshua.corpus.Phrase.getSubPhrases | ( | ) |
Gets all possible subphrases of this phrase, up to and including the phrase itself. For example, the phrase "I like cheese ." would return the following:
Implemented in joshua.corpus.ContiguousPhrase, and joshua.corpus.BasicPhrase.
| List<Phrase> joshua.corpus.Phrase.getSubPhrases | ( | int | maxLength | ) |
Returns a list of subphrases only of length maxLength or smaller.
| maxLength | the maximum length phrase to return. |
Implemented in joshua.corpus.ContiguousPhrase, and joshua.corpus.BasicPhrase.
| int joshua.corpus.Phrase.getWordID | ( | int | position | ) |
Returns the integer word id of the word at the specified position.
| position | Index of a word in this phrase. |
Implemented in joshua.corpus.BasicPhrase, and joshua.corpus.ContiguousPhrase.
| int [] joshua.corpus.Phrase.getWordIDs | ( | ) |
This method gets the integer IDs of the phrase as an array of ints.
Implemented in joshua.corpus.ContiguousPhrase, and joshua.corpus.BasicPhrase.
| int joshua.corpus.Phrase.size | ( | ) |
Returns the number of words in this phrase.
Implemented in joshua.corpus.ContiguousPhrase, and joshua.corpus.BasicPhrase.
| Phrase joshua.corpus.Phrase.subPhrase | ( | int | start, |
| int | end | ||
| ) |
creates a new phrase object from the indexes provided.
NOTE: subList merely creates a "view" of the existing Phrase object. Memory taken up by other Words in the Phrase is not freed since the underlying subList object still points to the complete Phrase List.
Implemented in joshua.corpus.ContiguousPhrase, and joshua.corpus.BasicPhrase.
| String joshua.corpus.Phrase.toString | ( | ) |
Returns a human-readable String representation of the phrase.
Implemented in joshua.corpus.AbstractPhrase, and joshua.corpus.BasicPhrase.