Crate sif_embedding

source ·
Expand description

sif-embedding

This crate provides simple but powerful sentence embedding techniques based on Smooth Inverse Frequency (SIF) described in the paper:

Sanjeev Arora, Yingyu Liang, and Tengyu Ma, A Simple but Tough-to-Beat Baseline for Sentence Embeddings, ICLR 2017.

Specifications

This crate depends on ndarray-linalg. You must always specify which backend will be used with features, following the specifications of ndarray-linalg. See README of ndarray-linalg v0.16.0 since the feature names of sif-embedding are the same.

For example, you can specify the OpenBLAS backend as follows:

# Cargo.toml

[dependencies]
sif-embedding = { version = "0.1", features = ["openblas"] }

If you are having problems compiling this library due to the backend, my tips may help.

Basic usage

See the document of Sif.

Re-exports

Modules

Type Definitions

  • Common type of floating numbers.