completely remove noembeddingphrase

This commit is contained in:
stuart committed 2026-02-25 16:11:23 +01:00
1 parent ed01ec414e
commit a0f3fa492f
4 files changed
+4 -6

No files matched your search

+1 -2
View File
@@ -1,6 +1,6 @@
from .enums import *
from .schemas import *
from .structures import Embedding, Word, Symbol, Phrase,Lexeme,NoEmbeddingPhrase
from .structures import Embedding, Word, Symbol, Phrase,Lexeme
__all__ = [
@@ -11,7 +11,6 @@ __all__ = [
"Symbol",
"Phrase",
"Lexeme",
"NoEmbeddingPhrase",
"EmbedRequest",
"EmbeddingResponse",
"ResponseRequest",
+1 -1
View File
@@ -2,7 +2,7 @@ from pydantic import BaseModel as PydanticBaseModel
from typing import List, Any, Dict, Optional,Union
from .structures import Embedding,Word, Symbol,Phrase,NoEmbeddingPhrase
from .structures import Embedding,Word, Symbol,Phrase
from pydantic import field_validator, ConfigDict
from pydantic_tensor import Tensor
import torch
+1 -2
View File
@@ -2,7 +2,7 @@ from .embedding import Embedding
from .lexeme import Lexeme
from .word import Word
from .symbol import Symbol
from .phrase import Phrase,NoEmbeddingPhrase
from .phrase import Phrase
__all__ = [
@@ -11,5 +11,4 @@ __all__ = [
"Word",
"Symbol",
"Phrase",
"NoEmbeddingPhrase",
]
+1 -1
View File
@@ -19,7 +19,7 @@ class Lexeme(BaseModel,ABC):
content=data["content"],
embedding=Embedding.from_dict(data["embedding"]),
original_content=data["original_content"],
)
)
def __new__(cls, *args, **kwargs):
if cls is Lexeme:
raise TypeError("Lexeme cannot be instantiated, use a subclass instead")