pub struct KnownModel {
pub name: &'static str,
pub id: &'static str,
pub ollama: &'static [&'static str],
pub threshold: f32,
pub same_threshold: f32,
pub prefix: &'static str,
pub license: &'static str,
pub local: Option<&'static LocalModel>,
}Expand description
An embedding model jscpd has calibrated.
Fields§
§name: &'static strThe name --semantic-model takes, and --semantic-models shows.
id: &'static strHugging Face repository id.
ollama: &'static [&'static str]Names Ollama serves the model under; the first is the one to pull.
threshold: f32Lowest cosine similarity of a pair across languages.
same_threshold: f32Lowest cosine similarity of a pair within one language.
prefix: &'static strPut before every function text.
license: &'static str§local: Option<&'static LocalModel>The files, when jscpd runs the model itself; the others need an embeddings API.
Implementations§
Source§impl KnownModel
impl KnownModel
Sourcepub fn thresholds(&self) -> Thresholds
pub fn thresholds(&self) -> Thresholds
The thresholds of the rules on this model’s scale: its calibrated
two, and the near-best margin and group floor scaled from
Thresholds::REFERENCE.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KnownModel
impl RefUnwindSafe for KnownModel
impl Send for KnownModel
impl Sync for KnownModel
impl Unpin for KnownModel
impl UnsafeUnpin for KnownModel
impl UnwindSafe for KnownModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more