-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added WikidataNamespace instance in mtab assistant * updated WikidataNamespace instance as an instance variable * Added extension interfaces and moved plugin implementations to extensions module * Renamed transformations interface and added export interface implementation * Updated Drepr module in extensions, implemented DreprExport class * Moved drepr extension under export extension module, renamed drepr script as main.py * Fixed import error for import_attr function * Added output format as a parameter for drepr data exports * Updated output format for drepr extension from String to OutputFormat Enum * Updated export interface comments * Updated export interface comments * Added export config and generalised the usage of IExport implementations * Updated variable name for local cache for exports * Added default export in the export config, updated export logic usage key
- Loading branch information
1 parent
af6cf2f
commit 4acc6b8
Showing
25 changed files
with
253 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from abc import ABC, abstractmethod | ||
from typing import List, Optional, Tuple | ||
from sm.outputs.semantic_model import SemanticModel | ||
from sand.models.table import Table, TableRow | ||
|
||
|
||
class IAssistant(ABC): | ||
@abstractmethod | ||
def predict( | ||
self, table: Table, rows: List[TableRow] | ||
) -> Tuple[Optional[SemanticModel], Optional[List[TableRow]]]: | ||
"""Predict semantic model and link entities""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from abc import ABC, abstractmethod | ||
from typing import List | ||
|
||
import sm.outputs.semantic_model as O | ||
from sand.models.table import Table, TableRow | ||
from drepr.models import DRepr | ||
from drepr.engine import OutputFormat | ||
|
||
|
||
class IExport(ABC): | ||
""" | ||
Export interface class to export relational data to | ||
different data formats | ||
""" | ||
|
||
@abstractmethod | ||
def export_data_model(self, table: Table, sm: O.SemanticModel) -> DRepr: | ||
"""export data model using DREPR""" | ||
pass | ||
|
||
@abstractmethod | ||
def export_data(self, table: Table, rows: List[TableRow], sm: O.SemanticModel, | ||
output_format: OutputFormat): | ||
"""export relational data using DREPR""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
class ISearch(ABC): | ||
""" Search Interface to support searches from multiple | ||
KG datastores. | ||
""" | ||
@abstractmethod | ||
def find_class_by_name(self): | ||
"""Search Class using name""" | ||
pass | ||
|
||
@abstractmethod | ||
def find_entity_by_name(self): | ||
"""Search Entity using name""" | ||
pass | ||
|
||
@abstractmethod | ||
def find_props_by_name(self): | ||
"""Search properties using name""" | ||
pass |
File renamed without changes.
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Oops, something went wrong.