ncm_local_embeddings

class ncm_local_embeddings.NCMSemanticPreprocessor(expansions=None)[source]

Bases: object

Parameters:

expansions (Dict[str, str])

expand(text)[source]

Replaces NCM sigils/acronyms with their full semantic definitions. Appends the definition in parens rather than replacing to keep original context. Example: “High D1 state” -> “High D1 (dopamine D1 receptor, focused drive…) state”

Return type:

str

Parameters:

text (str)

class ncm_local_embeddings.EnhancedLocalNCMEmbedder(model_name='all-mpnet-base-v2')[source]

Bases: EmbeddingFunction

Parameters:

model_name (str)

name()[source]
Return type:

str