RuAnnoy
This library is a rust port of spotify/annoy , currently only index serving is supported.
crates.io
Install via# Cargo.toml
[dependencies]
ru_annoy = "0"
Usage
use ru_annoy::*;
let index = AnnoyIndex::load(10, "index.ann", IndexType::Angular).unwrap();
let v0 = index.get_item_vector(0);
let nearest = index.get_nearest(v0.as_ref(), 5, -1, true);
FFI support
kotlin/java
jitpack.io
Install viarepositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.hanabi1224:RuAnnoy:0.1.2'
}
Usage
val index = AnnoyIndex.tryLoad("index.5d.ann", 5, IndexType.Angular)
dotnet
Runtimes | Nuget package |
---|---|
RuAnnoy | |
RuAnnoy-Batteries-Windows-x64 | |
RuAnnoy-Batteries-Linux-x64 | |
RuAnnoy-Batteries-Darwin-x64 |
Install via nuget
<ItemGroup>
<PackageReference Include="RuAnnoy" />
<PackageReference Include="RuAnnoy-Batteries-Windows-x64" />
</ItemGroup>
Usage
var index = AnnoyIndex.Load("index.5d.ann", 5, IndexType.Angular);
TODO
- Index building support
- CLI tool to build index from file