From caf9d2dc4e7f025ad5633fbb4c61874e212a498a Mon Sep 17 00:00:00 2001 From: stuartgo Date: Mon, 15 Dec 2025 14:17:41 +0100 Subject: [PATCH] addedn back the _content --- anansyTypes/structures/phrase.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/anansyTypes/structures/phrase.py b/anansyTypes/structures/phrase.py index d795816..4133924 100644 --- a/anansyTypes/structures/phrase.py +++ b/anansyTypes/structures/phrase.py @@ -8,17 +8,16 @@ import numpy as np class Phrase(Lexeme): def __init__(self, id: int, content: str, embedding: Embedding): self.id = id - self.content = content - self.embedding = embedding + self._content = content + self._embedding = embedding @property def content(self) -> str: - return self.content + return self._content @property def embedding(self) -> Embedding: - return self.embedding - + return self._embedding @classmethod def from_dict(cls, data: dict) -> "Phrase": return cls( @@ -31,12 +30,11 @@ class Phrase(Lexeme): class NoEmbeddingPhrase(Lexeme): def __init__(self, id: int, content: str): self.id = id - self.content = content + self._content = content self.embedding=np.array([]) # Placeholder to avoid attribute errors @property def content(self) -> str: - return self.content - + return self._content @classmethod def from_dict(cls, data: dict) -> "Phrase": return cls(