Package opennlp.tools.tokenize
Klasse TokenSample
java.lang.Object
opennlp.tools.tokenize.TokenSample
- Alle implementierten Schnittstellen:
Serializable,Sample
A
TokenSample is text with token spans.- Siehe auch:
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungTokenSample(String text, Span[] tokenSpans) Initializes ainstance.TokenSample(Detokenizer detokenizer, String[] tokens) Initializes ainstancevia aDetokenizer. -
Methodenübersicht
-
Felddetails
-
DEFAULT_SEPARATOR_CHARS
- Siehe auch:
-
-
Konstruktordetails
-
TokenSample
Initializes ainstance.- Parameter:
text- The text which contains the tokens. Must not benull.tokenSpans- The spans which mark the start and end of the tokens. Must not benull.
-
TokenSample
Initializes ainstancevia aDetokenizer.- Parameter:
detokenizer- The text which contains the tokens. Must not benull.tokens- The tokens to be processed. Must not benull.
-
-
Methodendetails
-
getText
- Gibt zurück:
- Retrieves the text.
-
getTokenSpans
- Gibt zurück:
- Retrieves the token
spans.
-
toString
-
parse
Parses a string sample.- Parameter:
sampleString- The sample to be parsed. Must not benull.separatorChars- The characters to be considered separators. SeeDEFAULT_SEPARATOR_CHARS. Must not benull.- Gibt zurück:
- A valid
TokenSampleinstance.
-
hashCode
public int hashCode() -
equals
-