diff --git a/anansyTypes/structures/word.py b/anansyTypes/structures/word.py index f95b2df..cf998c9 100644 --- a/anansyTypes/structures/word.py +++ b/anansyTypes/structures/word.py @@ -5,9 +5,10 @@ from pydantic_core import core_schema class Word(Lexeme): - def __init__(self, word_id: int, content: str, embedding: Embedding): + def __init__(self, word_id: int, content: str,original_content: str, embedding: Embedding): self.id = word_id self._content = content + self._original_content = original_content self._embedding = embedding @property @@ -15,6 +16,9 @@ class Word(Lexeme): return self._content @property + def original_content(self) -> str: + return self._original_content + @property def embedding(self) -> Embedding: return self._embedding @@ -30,4 +34,5 @@ class Word(Lexeme): word_id=data["id"], content=data["content"], embedding=Embedding.from_dict(data["embedding"]), + original_content=data["original_content"], )