File size: 1,119 Bytes
043125b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 * @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';