diff --git a/anansyTypes/structures/phrase.py b/anansyTypes/structures/phrase.py index bcd2abf..0e77307 100644 --- a/anansyTypes/structures/phrase.py +++ b/anansyTypes/structures/phrase.py @@ -25,4 +25,24 @@ class Phrase(Lexeme): content=data["content"], embedding=Embedding.from_dict(data["embedding"]), ) - \ No newline at end of file + + +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) -> "NoEmbeddingPhrase": + return cls( + id=data["id"], + content=data["content"] + ) \ No newline at end of file