Skip to content

Commit 5f93be0

Browse files
authored
Update text export test to check for extracted token (#1509)
stage tests pass
2 parents 06d8dcd + 0e27cd5 commit 5f93be0

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

lbx_prompt.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11930,8 +11930,12 @@ def expected_export_v2_text():
1193011930
'annotation_kind': 'TextEntity',
1193111931
'classifications': [],
1193211932
'location': {
11933-
'start': 67,
11934-
'end': 128
11933+
'start':
11934+
66,
11935+
'end':
11936+
128,
11937+
'token':
11938+
"more people to express themselves online😞😂‚, research suggests"
1193511939
}
1193611940
}],
1193711941
'classifications': [{

tests/data/annotation_import/conftest.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ def document_data_row(rand_gen):
116116
def text_data_row(rand_gen):
117117
return {
118118
"row_data":
119-
"https://storage.googleapis.com/lb-artifacts-testing-public/sdk_integration_test/sample-text-1.txt",
119+
"https://storage.googleapis.com/lb-artifacts-testing-public/sdk_integration_test/sample-text-2.txt",
120120
"global_key":
121-
f"https://storage.googleapis.com/lb-artifacts-testing-public/sdk_integration_test/sample-text-1.txt-{rand_gen(str)}",
121+
f"https://storage.googleapis.com/lb-artifacts-testing-public/sdk_integration_test/sample-text-2.txt-{rand_gen(str)}",
122122
"media_type":
123123
"TEXT",
124124
}
@@ -987,7 +987,7 @@ def point_inference(prediction_id_mapping):
987987
@pytest.fixture
988988
def entity_inference(prediction_id_mapping):
989989
entity = prediction_id_mapping["named-entity"].copy()
990-
entity.update({"location": {"start": 67, "end": 128}})
990+
entity.update({"location": {"start": 66, "end": 128}})
991991
del entity["tool"]
992992
return entity
993993

@@ -1499,9 +1499,13 @@ def expected_export_v2_text():
14991499
"value": "named_entity",
15001500
"annotation_kind": "TextEntity",
15011501
"classifications": [],
1502-
"location": {
1503-
"start": 67,
1504-
"end": 128
1502+
'location': {
1503+
'start':
1504+
66,
1505+
'end':
1506+
128,
1507+
'token':
1508+
"more people to express themselves online😞😂, research suggests"
15051509
},
15061510
}],
15071511
"classifications": [

0 commit comments

Comments
 (0)