Metadata-Version: 2.3
Name: string-treatment
Version: 2.0.0
Summary: For cleaning and adjusting words with inconsistency.
Author: Guilherme Huther
Author-email: Guilherme Huther <guilhermehuther@gmail.com>
License: Copyright (c) 2018 The Python Packaging Authority
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Requires-Dist: mapply>=0.1.30
Requires-Dist: nltk>=3.9.1
Requires-Dist: pandas>=2.3.2
Requires-Dist: pyvis>=0.3.2
Requires-Dist: rapidfuzz>=3.14.1
Requires-Dist: tqdm>=4.67.1
Requires-Dist: unidecode>=1.4.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown

[![Downloads](https://static.pepy.tech/badge/string-treatment)](https://pepy.tech/project/string-treatment) [![PyPI badge](https://badge.fury.io/py/string-treatment.svg)](https://badge.fury.io/py/string-treatment) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**string_treatment** is a library for cleaning and adjusting words with inconsistency.

# Overview

This library uses string similarity from [rapidfuzz](https://github.com/rapidfuzz/RapidFuzz) to group words with similar spelling into clusters, mapping each word to the most frequent (canonical) form within its cluster.

Since the clustering process may not always be perfectly accurate, the library can generate an interactive graph to help visualize the groupings.

![example graph](https://github.com/guilhermehuther/string_treatment/blob/main/docs/graph.png)

# Installation

Install the latest stable version from PyPI:

```shell
pip install string-treatment
```

# Example

See the testing script in the root: [test_standardize.py](https://github.com/guilhermehuther/string_treatment/blob/main/test/test_standardize.py).
