UMCU commited on
Commit
7f265e5
·
verified ·
1 Parent(s): 8dc3d35

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -0
README.md CHANGED
@@ -355,3 +355,34 @@ End2End scores (answering the question: *given a text, what are the spans **and*
355
  }
356
  }
357
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
355
  }
356
  }
357
  ```
358
+
359
+ Usage:
360
+
361
+ ```python
362
+
363
+ > pipe = pipeline("token-classification", model="UMCU/PII_RobBERT", trust_remote_code=True, aggregation_strategy="simple", dtype=torch.float32,)
364
+
365
+ > pipe("De patient Henk de Vries is geboren op 12-03-1980 en woont in Amsterdam.")
366
+
367
+ > [{'entity_group': 'GIVENNAME',
368
+ 'score': np.float32(0.9999993),
369
+ 'word': ' Henk',
370
+ 'start': 12,
371
+ 'end': 15},
372
+ {'entity_group': 'SURNAME',
373
+ 'score': np.float32(0.99999994),
374
+ 'word': ' de Vries',
375
+ 'start': 17,
376
+ 'end': 24},
377
+ {'entity_group': 'DATE',
378
+ 'score': np.float32(1.0),
379
+ 'word': ' 12 - 03 - 1980',
380
+ 'start': 40,
381
+ 'end': 49},
382
+ {'entity_group': 'CITY',
383
+ 'score': np.float32(0.99999917),
384
+ 'word': ' Amsterdam',
385
+ 'start': 63,
386
+ 'end': 71}]
387
+
388
+ ```