sbert 0.4.1

Rust implementation of Sentence Bert (SBert)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
pub mod distilroberta;
pub mod sbert;

pub use self::distilroberta::DistilRobertaForSequenceClassification;
pub use self::sbert::SBert;

// Utils
pub fn pad_sort<O: Ord>(arr: &[O]) -> Vec<usize> {
    let mut idx = (0..arr.len()).collect::<Vec<_>>();
    idx.sort_unstable_by(|&i, &j| arr[i].cmp(&arr[j]));
    idx
}