From 7cc7d05fc679d959832ed217c00029551876883a Mon Sep 17 00:00:00 2001 From: stuartgo Date: Wed, 25 Feb 2026 14:24:36 +0100 Subject: [PATCH] fix phrase with new lexeme verion --- anansyTypes/structures/phrase.py | 39 +------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/anansyTypes/structures/phrase.py b/anansyTypes/structures/phrase.py index e1403e2..c226c88 100644 --- a/anansyTypes/structures/phrase.py +++ b/anansyTypes/structures/phrase.py @@ -7,49 +7,12 @@ import numpy as np class NoEmbeddingPhrase(Lexeme): - def __init__(self, id: int, content: str): - self.id = id - self._content = content - self._original_content = content - self._embedding = np.array([]) # Placeholder to avoid attribute errors - - @property - def content(self) -> str: - return self._content - - @property - def original_content(self) -> str: - #temporarily return content as original_content - return self._content - - @property - def embedding(self) -> Embedding: - return self._embedding - @classmethod def from_dict(cls, data: dict) -> "NoEmbeddingPhrase": - return cls(id=data["id"], content=data["content"]) + return cls(id=data["id"], content=data["content"],embedding=None) class Phrase(Lexeme): - def __init__(self, id: int, content: str, embedding: Embedding): - self.id = id - self._content = content - self._original_content = content - self._embedding = embedding - - @property - def content(self) -> str: - return self._content - - @property - def original_content(self) -> str: - #temporarily return content as original_content - return self._content - - @property - def embedding(self) -> Embedding: - return self._embedding @classmethod def from_dict(cls, data: dict) -> "Phrase":