-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support supplied index dir and xref index choice
- Loading branch information
Showing
9 changed files
with
71 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from nomenklatura.index.index import Index | ||
from nomenklatura.index.tantivy_index import TantivyIndex | ||
from nomenklatura.index.common import BaseIndex | ||
|
||
__all__ = ["Index", "TantivyIndex"] | ||
__all__ = ["BaseIndex", "Index", "TantivyIndex"] |
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,22 @@ | ||
from pathlib import Path | ||
from typing import Generator, Generic, List, Tuple | ||
from nomenklatura.resolver import Pair, Identifier | ||
from nomenklatura.dataset import DS | ||
from nomenklatura.entity import CE | ||
from nomenklatura.store import View | ||
|
||
|
||
class BaseIndex(Generic[DS, CE]): | ||
name: str | ||
|
||
def __init__(self, view: View[DS, CE], data_dir: Path) -> None: | ||
raise NotImplementedError | ||
|
||
def build(self) -> None: | ||
raise NotImplementedError | ||
|
||
def pairs(self) -> List[Tuple[Tuple[Identifier, Identifier], float]]: | ||
raise NotImplementedError | ||
|
||
def match(self, entity: CE) -> List[Tuple[Identifier, float]]: | ||
raise NotImplementedError |
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
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