ailiaTokenizerGetCharStarts method
- Pointer<
AILIATokenizer> net, - Pointer<
Int> char_starts, - int count
Gets the Char start positions.
Parameters:
net: A tokenizer instance pointerchar_starts: Character start positioncount: Token count
Returns:
If this function is successful, it returns AILIA_STATUS_SUCCESS , or an error code otherwise.
If ailiaTokenizerEncode() is not run at all, the function returns AILIA_STATUS_INVALID_STATE . This is valid only for AILIA_TOKENIZER_TYPE_ROBERTA and AILIA_TOKENIZER_TYPE_BERT. The character start positions in UTF-32 units corresponding to each token are returned.
Implementation
int ailiaTokenizerGetCharStarts(
ffi.Pointer<AILIATokenizer> net,
ffi.Pointer<ffi.Int> char_starts,
int count,
) {
return _ailiaTokenizerGetCharStarts(
net,
char_starts,
count,
);
}