Spaces:
Running
Running
| // Minimal ambient type declarations for the sentencepiece-js package. | |
| // The package ships no .d.ts files; this declaration satisfies tsc's type-checking. | |
| declare module 'sentencepiece-js' { | |
| export class SentencePieceProcessor { | |
| load(url: string): Promise<void>; | |
| loadVocabulary(url: string): void; | |
| encodeIds(text: string): number[]; | |
| encodePieces(text: string): string[]; | |
| decodeIds(ids: number[]): string; | |
| } | |
| export function cleanText(text: string): string; | |
| } | |