category

language_detection_scoring

Shared portable language detection scoring predicates.

Availability:
logtalk_load(language_detection(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-09-06
Compilation flags:
static
Dependencies:
(none)
Remarks:
(none)
Inherited public predicates:
(none)

Public predicates

(none)

Protected predicates

cosine_similarity/3

Computes cosine similarity between two lexically sorted sparse count vectors.

Compilation flags:
static
Template:
cosine_similarity(Counts1,Counts2,Similarity)
Mode and number of proofs:
cosine_similarity(+list(pair(atom,positive_integer)),+list(pair(atom,positive_integer)),-float) - one

normalize_scores/2

Normalizes non-negative scores to sum to one or returns an empty list when their total is zero.

Compilation flags:
static
Template:
normalize_scores(RawScores,Scores)
Mode and number of proofs:
normalize_scores(+list(pair(atom,number)),-list(pair(atom,float))) - one

Private predicates

(none)

Operators

(none)