public static class InMemoryPhrase.Builder
extends java.lang.Object
InMemoryPhrase
instances.Constructor and Description |
---|
InMemoryPhrase.Builder(java.lang.String label)
Constructs a builder with the specified label.
|
Modifier and Type | Method and Description |
---|---|
InMemoryPhrase.Builder |
add(java.lang.CharSequence text)
|
InMemoryPhrase.Builder |
add(PhraseElement child)
Appends a
PhraseElement (either another Phrase or a LeafElement ) to the end of the children list contained by this builder. |
InMemoryPhrase |
build()
Builds an
InMemoryPhrase representing the data in this builder. |
public InMemoryPhrase.Builder(java.lang.String label)
label
- a String
that describes the syntactical function that the phrase to build would have.public InMemoryPhrase.Builder add(PhraseElement child)
PhraseElement
(either another Phrase
or a LeafElement
) to the end of the children list contained by this builder.child
- the child to add.public InMemoryPhrase.Builder add(java.lang.CharSequence text)
Token
s and Space
s to the end of the children list contained by this builder.text
- the text to tokenize and add.public InMemoryPhrase build()
InMemoryPhrase
representing the data in this builder.InMemoryPhrase
representing the data in this builder.