unstructured-transform-client 0.18.94 → 0.18.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -235,3 +235,23 @@ so `0.18.x` of this package describes `0.18.x` of the API.
235
235
  Everything exported from the package root is public. The `_generated` directory
236
236
  is not — it is produced from the OpenAPI contract at build time and may be
237
237
  reorganised without notice.
238
+
239
+ ## Parse element confidence
240
+
241
+ Request `output="elements"` in Python or `output: "elements"` in TypeScript
242
+ on Parse or Jobs GET to read stored element confidence. No extra `include`
243
+ option is needed. Read `element.metadata.parse_confidence` in Python and
244
+ `element.metadata.parseConfidence` in TypeScript. Terminal SSE event data
245
+ retains the wire name `result.elements[].metadata.parse_confidence`.
246
+
247
+ The wire value is a number from 0 to 1, rounded to four decimal places, or
248
+ null when unavailable. Historical responses may omit the field. Treat null
249
+ and omission as unavailable, never as zero. Custom validators pinned to an older
250
+ closed metadata schema must update that schema to accept the added field.
251
+ The score measures agreement
252
+ with OCR text; it is not a calibrated probability of correctness. All element
253
+ types can carry a score. Internal scoring details are not public fields.
254
+
255
+ The API consumes stored scores and does not calculate them. Adding this field
256
+ does not enable upstream scoring or establish deployment readiness. Extract
257
+ confidence is separate future work; extraction `data` keeps its natural shape.
@@ -29,6 +29,10 @@ export interface ElementMetadata {
29
29
  * Table HTML projection when requested.
30
30
  */
31
31
  textAsHtml: string | null;
32
+ /**
33
+ * Agreement with OCR text rounded to four decimal places, or null when unavailable.
34
+ */
35
+ parseConfidence?: number | null;
32
36
  }
33
37
  /**
34
38
  * Check if a given object implements the ElementMetadata interface.
@@ -34,6 +34,7 @@ export function ElementMetadataFromJSONTyped(json, ignoreDiscriminator) {
34
34
  'pageNumber': json['page_number'],
35
35
  'coordinates': json['coordinates'],
36
36
  'textAsHtml': json['text_as_html'],
37
+ 'parseConfidence': json['parse_confidence'] === undefined ? undefined : json['parse_confidence'] === null ? null : json['parse_confidence'],
37
38
  };
38
39
  }
39
40
  export function ElementMetadataToJSON(json) {
@@ -47,5 +48,6 @@ export function ElementMetadataToJSONTyped(value, ignoreDiscriminator = false) {
47
48
  'page_number': value['pageNumber'],
48
49
  'coordinates': value['coordinates'],
49
50
  'text_as_html': value['textAsHtml'],
51
+ 'parse_confidence': value['parseConfidence'],
50
52
  };
51
53
  }
package/dist/version.d.ts CHANGED
@@ -12,4 +12,4 @@
12
12
  * (tools/release/derived_versions.py); change the series only for a
13
13
  * deliberate minor or major release.
14
14
  */
15
- export declare const VERSION = "0.18.94";
15
+ export declare const VERSION = "0.18.97";
package/dist/version.js CHANGED
@@ -12,4 +12,4 @@
12
12
  * (tools/release/derived_versions.py); change the series only for a
13
13
  * deliberate minor or major release.
14
14
  */
15
- export const VERSION = "0.18.94";
15
+ export const VERSION = "0.18.97";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unstructured-transform-client",
3
- "version": "0.18.94",
3
+ "version": "0.18.97",
4
4
  "description": "TypeScript client for the Unstructured Transform v2 API — one document in, structured output back.",
5
5
  "license": "MIT",
6
6
  "author": "Unstructured",