Match all words in a document against an name dictionary and anonymize them using a hash.
Sigiloso
#mapstring function def mapstring(pattern: str): ch="" req={} i=1 for c in pattern: if c not in req: req[c]=i i=i+1 for i in pattern: ch+=str(req[i]) return (ch) #match patterns res=[] for i in dict: if mapstring(i)==mapstring(pattern): res.append(i) print (res)