Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/40 refactoring #41

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/py_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

python-tests:
env:
TEST_FILES: tests/similarity_framework/test_similarity* tests/column2vec/test_column2vec_cache.py
TEST_FILES: tests/similarity_framework/test_similarity* tests/column2vec/test_column2vec_cache.py tests/runner/test_runner*
name: Run Python Tests
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
<!-- tocstop -->

## What is Datasets Similarity?
The Dataset Similarity project deals with the
The Dataset Similarity project deals with the
issue of comparing tabular datasets.
The idea of the project is that we will have a set of
datasets that we want to compare with each other
and find out their similarity or distance.
This project mainly focuses on comparing only two tables.
This project mainly focuses on comparing only two tables but it implements `similarity_runner` that can compare more tables.
The final similarity is calculated according
to the similarity of individual columns based on their metadata.
Columns are compared by type and by content.
Expand All @@ -27,6 +27,7 @@ the main set (training) on which the program is
tuned, and a validation set for validating the results.

#### Definition of table similarity:
Two tables are similar if they have at least *k* similar columns.
![img_1.png](docs/similarity_def.png)
>Parameter **important columns** is user input.
>
Expand Down
6 changes: 3 additions & 3 deletions similarity_framework/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@


def create_metadata(data):
return (TypeMetadataCreator(data).compute_advanced_structural_types().compute_column_kind().compute_column_names_embeddings()).get_metadata()
return (TypeMetadataCreator().compute_advanced_structural_types().compute_column_kind().compute_column_names_embeddings()).get_metadata(data)


def compare_datasets(path1, path2):
def compare_datasets(path1: str, path2):
"""
This function compare two tables
It will read datasets, create metadata and comparator, compare them
Expand All @@ -41,7 +41,7 @@ def compare_datasets(path1, path2):
ComparatorByColumn()
## different option
# .add_comparator_type(SizeComparatorByColumn())
.add_comparator_type(IncompleteColumnsComparatorByColumn()).add_comparator_type(ColumnNamesEmbeddingsComparatorByColumn())
.add_comparator_type(IncompleteColumnsComparatorByColumn()).add_comparator_type(ColumnNamesEmbeddingsHandler())
## different option
# .add_comparator_type(ColumnKindHandler())
)
Expand Down
Loading
Loading