Skip to main content

LocalEmbeddings

Type Alias LocalEmbeddings 

Source
pub type LocalEmbeddings = BagOfWordsEmbeddings;
👎Deprecated:

LocalEmbeddings without the local-embeddings feature degrades to BagOfWordsEmbeddings (bag-of-words hash), not semantic neural embedding. Enable the local-embeddings feature, or use BagOfWordsEmbeddings explicitly.

Expand description

Without the local-embeddings feature, LocalEmbeddings is a type alias for BagOfWordsEmbeddings, maintaining backward compatibility.

With the local-embeddings feature enabled, LocalEmbeddings becomes the ONNX Runtime-based neural network implementation.

P2-1: 消除静默降级。无 feature 时 LocalEmbeddings 静默退化为词袋哈希嵌入, 用户以为在用语义向量、实际是词频——“好像能用,但不对”。这里加 #[deprecated] 让降级在编译期可见:使用者需显式改用 BagOfWordsEmbeddings, 或开启 local-embeddings feature 使用真正的 ONNX 神经嵌入。

Aliased Type§

pub struct LocalEmbeddings { /* private fields */ }