Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/reranker-transformersjs / ClassifierResult

Interface: ClassifierResult

Defined in: packages/reranker-transformersjs/src/cross-encoder.ts:33

Internal

Output shape returned by @huggingface/transformers' text-classification pipeline. Each pair returns either a single { label, score } object (top-k = 1) or an array of them. We normalise on the array form upstream so the cross-encoder always sees a consistent shape.

Properties

PropertyModifierTypeDefined in
labelreadonlystringpackages/reranker-transformersjs/src/cross-encoder.ts:34
scorereadonlynumberpackages/reranker-transformersjs/src/cross-encoder.ts:35