Package com.knuddels.jtokkit.api
Class EncodingResult
java.lang.Object
com.knuddels.jtokkit.api.EncodingResult
The result of encoding operation.
-
Constructor Summary
ConstructorsConstructorDescriptionEncodingResult(IntArrayList tokens, boolean truncated) EncodingResult(IntArrayList tokens, boolean truncated, int lastProcessedCharacterIndex) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index of the last processed character in the input stringReturns the list of token idsbooleanReturns true if the token list was truncated because the maximum token length was exceededtoString()
-
Constructor Details
-
EncodingResult
-
EncodingResult
-
-
Method Details
-
getTokens
Returns the list of token ids- Returns:
- the list of token ids
-
isTruncated
public boolean isTruncated()Returns true if the token list was truncated because the maximum token length was exceeded- Returns:
- true if the token list was truncated because the maximum token length was exceeded
-
getLastProcessedCharacterIndex
public int getLastProcessedCharacterIndex()Returns the index of the last processed character in the input string- Returns:
- the index of the last processed character in the input string, is -1 if text was null or empty
-
toString
-