Skip to content

Commit b92d7fa

Browse files
authored
Merge pull request #15 from scaleapi/ner_support
Add support for NER in client
2 parents 57744be + 65ecc22 commit b92d7fa

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

scaleapi/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
'audiotranscription',
1616
'pointannotation',
1717
'cuboidannotation',
18-
'segmentannotation'
18+
'segmentannotation',
19+
'namedentityrecognition'
1920
]
2021
SCALE_ENDPOINT = 'https://api.scale.com/v1/'
2122
DEFAULT_LIMIT = 100

tests/test_client.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,17 @@ def test_audiotranscription_fail2():
209209
attachment='some_non_url')
210210

211211

212+
def test_namedentityrecognition_ok():
213+
return client.create_namedentityrecognition_task(
214+
callback_url='http://www.example.com/callback',
215+
instruction='Do the objects in these images have the same pattern?',
216+
text='Example text to label with NER tool',
217+
labels=[{
218+
'name': 'Label_A',
219+
'description': 'the first label',
220+
}])
221+
222+
212223
def test_unicode_ok():
213224
task = client.create_categorization_task(
214225
callback_url='http://www.example.com/callback',

0 commit comments

Comments
 (0)