-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
Hi, I would like to add additional names and addresses to redact. Following the tutorial, the examples do not work. I am not sure if the API changed and the tutorial is not up to date, or if there is bug somewhere. I have deduce==3.0.4 and docdeid==1.0.1
from deduce import Deduce
deduce = Deduce()
# sets
deduce.lookup_structs['first_names'].add_items_from_iterable(["naam", "andere_naam"])
deduce.lookup_structs['whitelist'].add_items_from_iterable(["woord", "ander_woord"])
# tries
deduce.lookup_structs['residences'].add_items(["kleine", "plaats", "in", "de", "regio"])
deduce.lookup_structs['institutions'].add_items_from_iterable(["verzorgingstehuis", "hier", "om", "de", "hoek"])
>>> deduce.lookup_structs['first_names'].add_items_from_iterable(["naam", "andere_naam"])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'first_names'
>>> deduce.lookup_structs['whitelist'].add_items_from_iterable(["woord", "ander_woord"])
>>> # tries
>>> deduce.lookup_structs['residences'].add_items(["kleine", "plaats", "in", "de", "regio"])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'residences'
>>> deduce.lookup_structs['institutions'].add_items_from_iterable(["verzorgingstehuis", "hier", "om", "de", "hoek"])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'institutions'
>>>
lennartvandeguchte