{"id":13812009,"url":"https://github.com/ELS-RD/anonymisation","last_synced_at":"2025-05-14T20:31:28.545Z","repository":{"id":56595205,"uuid":"139612256","full_name":"ELS-RD/anonymisation","owner":"ELS-RD","description":"Anonymization of legal cases (Fr) based on Flair embeddings","archived":true,"fork":false,"pushed_at":"2020-12-09T22:23:23.000Z","size":1525,"stargazers_count":87,"open_issues_count":0,"forks_count":16,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-08-05T04:03:06.285Z","etag":null,"topics":["anonymization","bert","camembert","dataset-augmentation","entities","flair","legal","legal-cases","ner","pseudo-anonymization","spacy","transformers"],"latest_commit_sha":null,"homepage":"https://towardsdatascience.com/why-we-switched-from-spacy-to-flair-to-anonymize-french-legal-cases-e7588566825f?source=friends_link\u0026sk=de15a2550de1141865329fd37ef793b3","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ELS-RD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-03T16:48:23.000Z","updated_at":"2024-05-18T06:07:50.000Z","dependencies_parsed_at":"2022-08-15T21:40:17.849Z","dependency_job_id":null,"html_url":"https://github.com/ELS-RD/anonymisation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELS-RD%2Fanonymisation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELS-RD%2Fanonymisation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELS-RD%2Fanonymisation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ELS-RD%2Fanonymisation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ELS-RD","download_url":"https://codeload.github.com/ELS-RD/anonymisation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225307881,"owners_count":17453891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anonymization","bert","camembert","dataset-augmentation","entities","flair","legal","legal-cases","ner","pseudo-anonymization","spacy","transformers"],"created_at":"2024-08-04T04:00:44.809Z","updated_at":"2024-11-19T06:32:47.336Z","avatar_url":"https://github.com/ELS-RD.png","language":"Python","funding_links":[],"categories":["Machine Learning Datasets \u0026 Corpora","Python","Tools"],"sub_categories":["Data Extraction \u0026 Processing Tools","Russia"],"readme":"# Pseudo-anonymization of French legal cases\n\n[![Build Status](https://travis-ci.com/ELS-RD/anonymisation.svg?token=9BHyni1rDpKLxVsHDRNp\u0026branch=master)](https://travis-ci.com/ELS-RD/anonymisation)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n## Scope\n\nBuild `Named Entity Recognition` (`NER`) training dataset and learn a model dedicated to French legal case anonymization by leveraging pre-trained language models.    \nThe projects goes above the scope covered by our previous rule based system which was limited to address and natural person names (this rule based system was used by most legal actors in France).  \nThis model can be used in a pseudo-anonymization system.  \n\nMeasures computed over manually annotated data show strong performance, in particular on natural person and legal professionals names.  \n\nThe only French legal cases massively acquired by `Lefebvre Sarrut` not pseudo-anonymized are those from appeal courts (Jurica database).  \nThe input data are manually annotated data by `Lefebvre Sarrut` employees.  \n\nThe project is focused on finding mentions of entities and guessing their types.  \nIt doesn't manage the pseudo-anonymization step, meaning replacing entities found in precedent step by another representation.  \n\n# Evolution\n\nPrevious version of the project in 2018 was based on Spacy library.  \nIn 2019, new pre-trained language models appeared and provided a much butter quality than what Spacy delivered.  \nCurrent project is now based on Flair.    \n\nIf you want more information about the project, check these articles:\n\n* [Why we switched from Spacy to Flair to anonymize French case law](https://towardsdatascience.com/why-we-switched-from-spacy-to-flair-to-anonymize-french-legal-cases-e7588566825f?source=friends_link\u0026sk=de15a2550de1141865329fd37ef793b3)\n* [NER algo benchmark: spaCy, Flair, m-BERT and camemBERT on anonymizing French commercial legal cases](https://towardsdatascience.com/benchmark-ner-algorithm-d4ab01b2d4c3?source=friends_link\u0026sk=5bffa2cb19997d1658479f18ce8cf6bb)\n\n## Commands to use the code\n\nThis project uses [Python virtual environment](https://virtualenv.pypa.io/en/stable/) to manage dependencies without interfering with those used by the machine.  \n`pip3` and `python3` are the only requirements.  \nTo setup a virtual environment on the machine, install `virtualenv` from `pip3` and install the project dependencies (from the `requirements.txt` file).  \n\nThese steps are scripted in the `Makefile` (tested only on `Ubuntu`) and can be performed with the following command:  \n\n```bash\nmake setup\n```\n\n\u003e Variable `VIRT_ENV_FOLDER` can be changed in the `Makefile` to change where to install `Python` dependencies.\n\n... then you can use the project by running one of the following actions:\n\nAll commands can be found in the `Makefile`.\n\n## Setup Pycharm\n\nFor tests run from Pycharm, you need to create a Pytest test task.    \nThen the working folder by default (implicit) is the test folder.  \n**It has to be setup as the project root folder explicitly.**\n\n## License\n\nThis project is licensed under Apache 2.0 License (found in the LICENSE file in the root directory).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FELS-RD%2Fanonymisation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FELS-RD%2Fanonymisation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FELS-RD%2Fanonymisation/lists"}