ben-aaron188 / netanos

NETANOS: Named entity-based Text Anonymization for Open Science'
https://www.npmjs.com/package/netanos
MIT License
10 stars 5 forks source link

Entity-specific anonymization #8

Closed maximilianmozes closed 6 years ago

maximilianmozes commented 6 years ago

I added functionality to specify the entities to be included in the anonymization for three anonymization types (context-preserving, named entity-based and combined). README and example (run.js) are adjusted accordingly. Moreover, I added a Logging class that might be helpful for further extensions. Please review and test carefully. Thanks!

maximilianmozes commented 6 years ago

@ben-aaron188 thanks for the review. I have added the remaining cases to the entities object and adjusted the version.

maximilianmozes commented 6 years ago

@ben-aaron188 et voilà. I adjusted the code accordingly. Please have a look and let me know what you think. Thanks!

maximilianmozes commented 6 years ago

Thanks @ben-aaron188! I did not cover the case that an entity contains a dot (in the example the input string contains the word "Amsterdam." instead of "Amsterdam" and hence the replacement did not work). Fixed this now. I also fixed another minor issue.