first commit
This commit is contained in:
1 parent
5037a09608
commit
94815b7918
10 files changed
+181
No files matched your search
@@ -0,0 +1,22 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import List, Union
|
||||
from dataclasses import dataclass
|
||||
from .embedding import Embedding
|
||||
|
||||
|
||||
@dataclass
|
||||
class Lexeme(ABC):
|
||||
id: int
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def content(self) -> Union[str, List[str]]:
|
||||
"""Text content of the lexeme."""
|
||||
pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def embedding(self) -> Embedding:
|
||||
"""Embedding(s) associated with the lexeme."""
|
||||
pass
|
||||
|
||||
Reference in new issue
Block a user