Skip to content

Commit f71b0c3

Browse files
authored
Merge pull request #27 from Kaevan89/enriched
Enriched
2 parents 414b672 + 1e6a8e5 commit f71b0c3

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PKG_VERSION := v3.0.0
1+
PKG_VERSION := v3.1.0
22
GIT_COMMIT ?= $(shell git rev-parse --short HEAD 2> /dev/null || true)
33
BUILD_DATE := $(shell date -u +%Y-%m-%dT%T 2> /dev/null)
44

veryfi/client_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ func stringPtr(v string) *string {
2020
return &v
2121
}
2222

23+
func boolPtr(v bool) *bool {
24+
return &v
25+
}
26+
2327
func setUp(t *testing.T, useDetailedReceipt bool) (test.HTTPServer, *Client, string, interface{}) {
2428
server := test.NewHTTPServer()
2529
assert.NotNil(t, server)
@@ -78,6 +82,7 @@ func setUp(t *testing.T, useDetailedReceipt bool) (test.HTTPServer, *Client, str
7882
Score: float64Ptr(0.96),
7983
},
8084
Date: &scheme.DetailedDateField{
85+
Enriched: boolPtr(true),
8186
Value: stringPtr("2022-05-24 13:10:00"),
8287
Score: float64Ptr(1.0),
8388
BoundingBox: []float64{0, 0.5332, 0.1168, 0.7573, 0.131},

veryfi/scheme/document.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ type TagOptions struct {
389389

390390
// DetailedField represents a field with confidence scores and metadata
391391
type DetailedField struct {
392+
Enriched *bool `json:"enriched"`
392393
Value *string `json:"value,omitempty"`
393394
Score *float64 `json:"score,omitempty"`
394395
OCRScore *float64 `json:"ocr_score,omitempty"`
@@ -399,6 +400,7 @@ type DetailedField struct {
399400

400401
// DetailedFloatField represents a numeric field with confidence scores
401402
type DetailedFloatField struct {
403+
Enriched *bool `json:"enriched"`
402404
Value *float64 `json:"value,omitempty"`
403405
Score *float64 `json:"score,omitempty"`
404406
OCRScore *float64 `json:"ocr_score,omitempty"`
@@ -409,6 +411,7 @@ type DetailedFloatField struct {
409411

410412
// DetailedDateField represents a date field with confidence scores
411413
type DetailedDateField struct {
414+
Enriched *bool `json:"enriched"`
412415
Value *string `json:"value,omitempty"` // ISO 8601 date format
413416
Score *float64 `json:"score,omitempty"`
414417
OCRScore *float64 `json:"ocr_score,omitempty"`
@@ -419,6 +422,7 @@ type DetailedDateField struct {
419422

420423
// DetailedBoolField represents a boolean field with confidence scores
421424
type DetailedBoolField struct {
425+
Enriched *bool `json:"enriched"`
422426
Value *bool `json:"value,omitempty"`
423427
Score *float64 `json:"score,omitempty"`
424428
OCRScore *float64 `json:"ocr_score,omitempty"`

veryfi/testdata/detailed_receipt_public.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
],
7777
"rotation": 0,
7878
"score": 1.0,
79+
"enriched": true,
7980
"value": "2022-05-24 13:10:00"
8081
},
8182
"default_category": {

0 commit comments

Comments
 (0)