Cleanco is a Python library (current version 2.3) designed to process company names. It cleans names by stripping away terms indicating organization type (like 'Ltd.' or 'Corp.'), deduces the business entity type (e.g., 'limited liability company'), and suggests possible countries of establishment. Releases are somewhat irregular, with recent updates in late 2023 and early 2024.
pip install cleancoVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to clean a company name, deduce its business type, and suggest possible countries of origin using the primary functions of the cleanco library.
Migrate to the new functional API, primarily `from cleanco import basename` and `basename(name)`.
Update imports and function calls from `prepare_terms` to `prepare_default_terms`.
Ensure your project runs on Python 3.6 or newer (2.3 supports 3.8-3.12).
Review calls to `basename()` and remove redundant `terms` arguments. For custom terms, switch to `custom_basename()`.
Consider applying `basename()` in a loop or twice on names where multiple suffixes are common (e.g., 'Company, Inc. Ltd.').
Install the library using pip: `pip install cleanco`
For complex cases, consider running `basename()` multiple times or using `custom_basename()` with a tailored list of terms. You can also inspect the `cleanco` GitHub issues for similar edge cases and potential workarounds or updates. Example: `from cleanco import basename; cleaned_name = basename(basename('Your Company Name, Inc. Ltd.'))`Import `typesources` (or `countrysources`) directly from the `cleanco` module: `from cleanco import typesources, matches` and then call `classification_sources = typesources()`
No dependency data recorded yet.