Skip to content

Commit

Permalink
Moved schema matcher to new AI package
Browse files Browse the repository at this point in the history
  • Loading branch information
robertisele committed Feb 6, 2024
1 parent 0d5ff45 commit 8136a89
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
"""All classes related to schema matcher plugins"""
"""All classes related to schema matcher plugins.
WARNING: All classes in this file are preliminary and might be changed."""

from cmem_plugin_base.dataintegration.plugins import PluginBase


class MatchingSchema:
"""The schema that is used by schema matchers."""

def write_rdf_file(self, path: str, lang: str) -> None:
"""
Writes this schema to an RDF file.
"""Write this schema to an RDF file.
:param path: The target file path.
:param lang: The RDF format. Usually, either "N-TRIPLE" or "TURTLE".
"""
pass # Implementation provided by DataIntegration
# Implementation provided by DataIntegration


class Correspondence:
Expand All @@ -23,6 +24,10 @@ def __init__(self, source: str, target: str, confidence: float):
self.target = target
self.confidence = confidence

def __str__(self):
"""Convert to a string representation"""
return f"{self.source} - {self.target} ({self.confidence})"


class Alignment:
"""Set of correspondences between two schemata."""
Expand Down
2 changes: 1 addition & 1 deletion cmem_plugin_base/dataintegration/description.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PluginContextParameterType,
)
from cmem_plugin_base.dataintegration.utils import generate_id
from cmem_plugin_base.dataintegration.matching.matcher import SchemaMatcherPlugin
from cmem_plugin_base.dataintegration.ai.schema_matcher import SchemaMatcherPlugin


class Icon:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module = [
"cmem_plugin_base.dataintegration.context",
"cmem_plugin_base.dataintegration.plugins",
"cmem_plugin_base.dataintegration.types",
"cmem_plugin_base.dataintegration.matching.matcher",
"cmem_plugin_base.dataintegration.ai.schema_matcher",
]
disable_error_code = "empty-body"

Expand Down

0 comments on commit 8136a89

Please sign in to comment.