Project details
Univo provides a fast and lightweight solution for detecting duplicates in Python. With features like fuzzy matching and local embeddings, it seamlessly compares strings, records, and nested objects without needing a server. Perfect for data cleaning and entity resolution, making data management efficient and effective.
Univo is a powerful tool for identifying duplicates in Python data, designed for efficiency and flexibility. It supports various forms of data—including strings, records, and nested objects—allowing users to implement fast, local duplicate detection without the need for a server. Univo primarily employs fuzzy matching alongside local embeddings and configurable field-level rules to maintain clean records in datasets.
Univo operates entirely offline; therefore, sensitive records never leave the local environment, and there is no need for API keys or external servers. This enhances data security and processing speed.
Here is how to effectively use Univo to find duplicate names:
from univo import Finder
names = ["Northwind Traders", "Contoso", "Northwnd Traders", "NORTHWIND TRADERS", "Fabrikam"]
for match in Finder().find(names, min_score=0.8).matches:
print(names[match.left_id], "~", names[match.right_id], round(match.score, 2))
This example demonstrates how Univo can return duplicates with their respective matching scores, highlighting its capability to assist in real-time duplicate checks.
Univo allows for powerful schema configurations, enabling users to dictate exact field comparisons and the reasoning behind each match:
from univo import Exact, Finder, Schema, Text
schema = Schema(
id_field="id",
fields={"name": Text(), "address.city": Text(), "vat": Exact(conflict="reject")},
)
finder = Finder(schema=schema)
finder.add([
{"id": 1, "name": "Northwind Traders SAS", "address": {"city": "LYON"}, "vat": "FR401"},
{"id": 2, "name": "Northwind Traders", "address": {"city": "Lyon"}, "vat": "FR999"},
])
query = {"id": 3, "name": "Northwind Traders", "address": {"city": "Lyon"}, "vat": "FR401"}
for match in finder.search(query).matches:
print(match.right_id, round(match.score, 2), match.reasons)
Here, the matching process provides clarity on why certain records are identified as duplicates based on various criteria, ensuring thorough data validation.
Univo also leverages semantic understanding for enhanced matching capabilities. Users can employ models like Model2Vec for meaningful comparisons among text entries:
from univo import Finder, Schema, Text
finder = Finder(
schema=Schema(fields={"description": Text(mode="semantic")}),
model="minishlab/potion-base-8M" # Utilizing a pre-trained model
)
texts = ["online clothing store", "shop selling clothes on the internet", "steel factory"]
report = finder.find([{ "description": text} for text in texts], min_score=0.6)
for match in report.matches:
print(texts[match.left_id], "~", texts[match.right_id], round(match.score, 2))
In this context, Univo demonstrates the ability to recognize semantically similar entries, providing users with crucial insights into their data.
Univo is purpose-built for its niche and consistently outperforms other available tools in terms of speed, accuracy, and simplicity. For instance, in benchmark tests against tools like SemHash, Univo showed:
For comprehensive guidance on using Univo effectively, the following resources are available:
Univo represents a significant advancement in data integrity and record management, making it an ideal choice for developers and data scientists looking for a robust solution to duplicate detection.
Comments
0Start the conversation
Share the first comment.