Some checks failed
CodeQL / Analyze (go) (push) Successful in 6m28s
Docker Image / build-docker (push) Failing after 13m26s
Lint and Testing / lint (push) Successful in 11m17s
Lint and Testing / test (push) Successful in 11m17s
Lint and Testing / golangci (push) Successful in 2m40s
22 lines
479 B
C
22 lines
479 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct SPProcessor SPProcessor;
|
|
|
|
SPProcessor *sp_load(const char *path, char **err);
|
|
void sp_free(SPProcessor *p);
|
|
|
|
int sp_bos_id(const SPProcessor *p);
|
|
int sp_eos_id(const SPProcessor *p);
|
|
int sp_pad_id(const SPProcessor *p);
|
|
|
|
int sp_encode(const SPProcessor *p, const char *text, int **out_ids, int *out_len, char **err);
|
|
char *sp_id_to_piece(const SPProcessor *p, int id, char **err);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|