Skip to content

Commit

Permalink
fix missing abstract methods in entity linker (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssssarah authored Nov 29, 2023
1 parent 758a887 commit e846ef5
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
#
# You should have received a copy of the GNU Lesser General Public License
# along with Blue Brain Nexus Forge. If not, see <https://choosealicense.com/licenses/lgpl-3.0/>.
from typing import Callable, Dict, Optional
from pathlib import Path
from typing import Callable, Dict, Optional, Union, Any

from kgforge.core.commons.execution import not_supported
from kgforge.specializations.mappers import DictionaryMapper
from kgforge.specializations.mappings import DictionaryMapping
from kgforge.specializations.resolvers.entity_linking import EntityLinker
Expand All @@ -21,6 +23,15 @@

class EntityLinkerElastic(EntityLinker):

@staticmethod
def _service_from_directory(dirpath: Path, targets: Dict[str, Union[str, Dict]],
**source_config) -> Any:
raise not_supported()

@staticmethod
def _service_from_web_service(endpoint: str, targets: Dict[str, Union[str, Dict]]) -> Any:
raise not_supported()

@property
def mapping(self) -> Callable:
return DictionaryMapping
Expand Down

0 comments on commit e846ef5

Please sign in to comment.