{"id":31762513,"url":"https://github.com/eonm-pro/b-cleaner","last_synced_at":"2025-10-09T22:25:44.857Z","repository":{"id":48932368,"uuid":"281423079","full_name":"eonm-pro/b-cleaner","owner":"eonm-pro","description":"Preprocess bibliographical data for alignement tasks","archived":false,"fork":false,"pushed_at":"2021-07-05T04:46:33.000Z","size":20,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-07-08T12:56:43.343Z","etag":null,"topics":["alignment","data-normalization","data-preprocessing"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eonm-pro.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":"2020-07-21T14:39:24.000Z","updated_at":"2020-07-22T11:21:25.000Z","dependencies_parsed_at":"2022-09-08T14:20:07.336Z","dependency_job_id":null,"html_url":"https://github.com/eonm-pro/b-cleaner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eonm-pro/b-cleaner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonm-pro%2Fb-cleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonm-pro%2Fb-cleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonm-pro%2Fb-cleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonm-pro%2Fb-cleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eonm-pro","download_url":"https://codeload.github.com/eonm-pro/b-cleaner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eonm-pro%2Fb-cleaner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002106,"owners_count":26083307,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["alignment","data-normalization","data-preprocessing"],"created_at":"2025-10-09T22:25:42.915Z","updated_at":"2025-10-09T22:25:44.847Z","avatar_url":"https://github.com/eonm-pro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=center\u003e\n\n# B-cleaner (Bibliographical data cleaner)\n\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)]()\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Feonm-abes%2Fb-cleaner.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Feonm-abes%2Fb-cleaner?ref=badge_shield)\n[![Dependabot Status](https://badgen.net/dependabot/eonm-abes/b-cleaner?icon=dependabot)]()\n\n\u003c/div\u003e\n\nB-cleaner is a Rust library dedicated to bibliographical data preprocessing (simplification, normalization). This library is used for preprocessing data in alignement tasks. B-cleaner is designed to have a small memory footprint and high performances.\n\nB-cleaner offers **binding with Python 3**.\nTo compile b-cleaner as a Python library make sure you are building this library with the python features enabled: `cargo build --release --lib --features=python`. You can also use [maturin](https://github.com/PyO3/maturin).\n\n## Usage\n \nB-cleaner works with tokenized data. Tokenized data should contain punctuation.\n\nB-cleaner is able to clean:\n\n* titles\n* authors\n* any text\n\n### Rust usage\n\n```rust\nuse b_cleaner::{TitleCleaner, Clean};\n\nfn main() {\n    let raw_data: Vec\u003c\u0026str\u003e = \"Lorem ipsum dolor: sit amet\".split_whitespace().collect();\n    let mut title = TitleCleaner::new(\u0026raw_data);\n     \n    title.clean();\n          \n    assert_eq!(title.tokens(), \u0026vec![\"lorem\", \"ipsum\", \"dolor\"]);\n }\n```\n \n### Python usage\n\n```python\n\u003e\u003e\u003e import b_cleaner as bc\n\n\u003e\u003e\u003e bc.clean_title([\"Lorem\", \"ipsum\", \"dolor\", \"sit\", \"amet\"])\n#['lorem', 'ipsum', 'dolor', 'amet']\n\n\u003e\u003e\u003e bc.clean_author([\"John\", \"W.\", \"Doe\", \"(1950-2018)\"])\n#['john', 'w', 'doe']\n```\n\n## Build B-cleaner for python\n\nB-cleaner can be build and installed with [maturin](https://github.com/PyO3/maturin), a tool dedicated to build python native modules written in rust with [pyo3](https://github.com/PyO3/pyo3).\n\nMake sure maturin is installed on your system:\n\n```sh\npip install maturin\n```\n\nMaturin and pyo3 might require some developement dependencies to build the native module:\n\n```sh\nsudo apt install python3-dev python-dev\n```\n\nThen build and install b_cleaner with:\n\n```sh\npip install .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feonm-pro%2Fb-cleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feonm-pro%2Fb-cleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feonm-pro%2Fb-cleaner/lists"}