Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/spraakbanken/swell-pseudonymize-js

Pseudonymizer for the SweLL-project
https://github.com/spraakbanken/swell-pseudonymize-js

pseudonymisation swell

Last synced: about 1 month ago
JSON representation

Pseudonymizer for the SweLL-project

Awesome Lists containing this project

README

        

# Pseudonymization module

## Usage

```
import {pseudonymize} from 'pseudonymization'

pseudonymize('Karlstad', ['city']) // returns random city

pseudonymize('Karlstad', ['city', '1']) // returns random city
pseudonymize('Karlstad', ['city', '1']) // returns Karlstad again

pseudonymize('Karlstad', ['city', '2']) // returns random city, but not Karlstad

```

## Bugs

`package.json` contains too many dependencies due to copy-paste, find out which
ones are needed for the tests.

## Changing data

For now, all the named entities live in `src/names.ts` and may be changed there.

## Development

Use `yarn test` and `yarn build` before committing.