remove noembeddingphrase
This commit is contained in:
1 parent
a46acee5d3
commit
2b0dbe77e6
1 file changed
+1
-21
@@ -25,24 +25,4 @@ class Phrase(Lexeme):
|
||||
content=data["content"],
|
||||
embedding=Embedding.from_dict(data["embedding"]),
|
||||
)
|
||||
|
||||
|
||||
class NoEmbeddingPhrase(Lexeme):
|
||||
def __init__(self, id: int, content: str):
|
||||
self.id = id
|
||||
self._content = content
|
||||
self._embedding=np.array([]) # Placeholder to avoid attribute errors
|
||||
@property
|
||||
def content(self) -> str:
|
||||
return self._content
|
||||
|
||||
@property
|
||||
def embedding(self) -> Embedding:
|
||||
return self._embedding
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, data: dict) -> "Phrase":
|
||||
return cls(
|
||||
id=data["id"],
|
||||
content=data["content"]
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user