Skip to content

Commit

Permalink
fix version and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
simonamazzarino committed May 2, 2024
1 parent 5dd5f18 commit 2b304a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ from nerpii.named_entity_recognizer import NamedEntityRecognizer
You can create a recognizer passing as parameter a path to a csv file or a Pandas Dataframe

```python
recognizer = NamedEntityRecognizer('./csv_path.csv')
recognizer = NamedEntityRecognizer('./csv_path.csv', lang)
```
The <strong>lang</strong> parameter is used to define the language of the dataset. The deafult value is <strong>en</strong> (english), but it can be also selelcted <strong>it</strong> (italian).

Please note that if there are columns in the dataset containing names of people consisting of first and last names (e.g. John Smith), before creating a recognizer, it is necessary to split the name into two different columns called <strong>first_name</strong> and <strong>last_name</strong> using the function `split_name()`.

```python
Expand Down Expand Up @@ -75,7 +77,7 @@ You can create a generator using
```python
generator = FakerGenerator(dataset, recognizer.dict_global_entities)
```
If you want to generate Italian PII, add ```lang = "it"``` as parameter to the previous object.
If you want to generate Italian PII, add ```lang = "it"``` as parameter to the previous object (default: ```lang = "en"```)

To generate new PII you can run

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nerpii"
version = "0.2.1"
version = "0.2.2"
description = "A python library to perform NER on structured data and generate PII with Faker"
authors = ["Clearbox AI <info@clearbox.ai>"]
license = "GPL"
Expand Down

0 comments on commit 2b304a9

Please sign in to comment.