Code Monkey home page Code Monkey logo

deepblocker's Introduction

DeepBlocker

DeepBlocker is a Python package for performing blocking for entity matching using deep learning. It provides functionalities for transforming tuples into embeddings customized for blocking. Given these tuple embeddings, DeepBlocker also provides various utilities to retrieve similar tuples and construct the candidate set efficiently. DeepBlocker is self-supervised and does not require any labeled data. DeepBlocker provides multiple instantiations for tuple embedding and vector pairing for performing blocking. It is also modular and easily customizable. Each of the subcomponent is based on a pre-defined and intuitive API that allows altering and swapping up these components to achieve bespoke implementations.

Paper and Data

For details on the architecture of the models used, take a look at our paper Deep Learning for Blocking in Entity Matching: A Design Space Exploration (VLDB '21).

All public datasets used in the paper can be downloaded from the datasets page.

We used fastText for word embedding that is pre-trained on Wikipedia.

Quick Start: DeepBlocker in 30 seconds

There are four main steps in using DeepBlocker:

  1. Load the relevant libraries
import pandas as pd
from deep_blocker import DeepBlocker
from tuple_embedding_models import  AutoEncoderTupleEmbedding, CTTTupleEmbedding, HybridTupleEmbedding
from vector_pairing_models import ExactTopKVectorPairing
import blocking_utils
  1. Data processing: Load the relevant datasets for blocking.
left_df = pd.read_csv("left_table_csv_file_name")
right_df = pd.read_csv("right_table_csv_file_name")
  1. Instantiate the DeepBlocker with appropriate classes for tuple embedding and vector pairing models.
tuple_embedding_model = AutoEncoderTupleEmbedding()
topK_vector_pairing_model = ExactTopKVectorPairing(K=50)
db = DeepBlocker(tuple_embedding_model, vector_pairing_model)
  1. Train the models and perform blocking of the tables. Report the accuracy.
candidate_set_df = db.block_datasets(left_df, right_df, cols_to_block)
golden_df = pd.read_csv("matches_csv_file_name")
print(blocking_utils.compute_blocking_statistics(candidate_set_df, golden_df, left_df, right_df))

Installation

DeepBlocker relies on a set of external libraries that can be found in requirements.txt. You can install them as

pip install -r requirements.txt

Tutorials

We provide a sample script illustrating how DeepBlocker works for three major tuple embedding models -- AutoEncoder, CTT and Hybrid.

Support

Please contact Saravanan Thirumuruganathan for any questions about the code.

The Team

DeepBlocker was developed by QCRI and University of Wisconsin-Madison. For the entire list of contributors please refer the DeepBlocker paper.

deepblocker's People

Contributors

saravanan-thirumuruganathan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.