infon-coref-pointer / js /src /index.ts
cp500's picture
Upload js/src/index.ts with huggingface_hub
043125b verified
Raw
History Blame Contribute Delete
1.12 kB
/**
* @cp500/infon-coref β€” multilingual coreference resolution in the
* browser or Node, via ONNX.
*
* Quick start
* ───────────
* ```ts
* import { InfonCorefModel } from '@cp500/infon-coref';
*
* const model = await InfonCorefModel.fromHub('cp500/infon-coref-pointer');
* const result = await model.resolve('Toyota announced a deal with Panasonic. The Japanese automaker said it was worth $250M.');
* console.log(result.clusters);
* ```
*
* See the README for the full guide and API reference.
*/
export { InfonCorefModel } from './model.js';
// Pure-logic helpers β€” exported so power users can plug custom
// pipelines (e.g. their own tokenizer, their own ONNX runtime).
export { decodeBio, BIO_O, BIO_B, BIO_I } from './bio.js';
export { buildPairs, pickAntecedents, groupClusters } from './pairs.js';
export { fetchHubFile, fetchHubJson, hubUrl } from './hub.js';
export { loadTokenizer } from './tokenizer.js';
export type { Tokenizer, Encoding } from './tokenizer.js';
export type {
CorefResult,
Mention,
Token,
ModelOptions,
LoadedModel,
} from './types.js';