From 3e4bb3ba9ed2afc89cd006105d7786fb2246d055 Mon Sep 17 00:00:00 2001 From: stuartgo Date: Wed, 25 Feb 2026 14:36:32 +0100 Subject: [PATCH] new approach to noembeddingphrase --- anansyTypes/structures/phrase.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/anansyTypes/structures/phrase.py b/anansyTypes/structures/phrase.py index c226c88..efd3be2 100644 --- a/anansyTypes/structures/phrase.py +++ b/anansyTypes/structures/phrase.py @@ -7,10 +7,12 @@ import numpy as np class NoEmbeddingPhrase(Lexeme): - @classmethod - def from_dict(cls, data: dict) -> "NoEmbeddingPhrase": - return cls(id=data["id"], content=data["content"],embedding=None) + def __init__(self, id: str, content: str): + super().__init__(id=id, content=content, embedding=None) + @property + def embedding(self): + return None class Phrase(Lexeme):