Skip to content

Latest commit

 

History

History

vector-type

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
Function Documentation
AsciiTextTestEmbed(string) → vector

Convert text to a vector of length 256 where each character's ASCII value is mapped.
Example: AsciiTextTestEmbed('hello') → [0, 0, 0, ..., 1, 0, 1, 2, ...]
Center(vector) → vector

Aggregate function to compute the center of multiple vectors.
Example: Center([1.0, 2.0], [3.0, 4.0]) → [2.0, 3.0]
CosineDistance(vector, vector) → double

Compute the cosine distance between two vectors.
Example: CosineDistance([1.0, 0.0], [0.0, 1.0]) → 1.0
CosineSimilarity(vector, vector) → double

Compute the cosine similarity between two vectors.
Example: CosineSimilarity([1.0, 0.0], [0.0, 1.0]) → 0.0
DoubleToVector(array<double>) → vector

Convert an array of doubles to a vector.
Example: DoubleToVector([1.0, 2.0, 3.0]) → [1.0, 2.0, 3.0]
EuclideanDistance(vector, vector) → double

Compute the Euclidean distance between two vectors.
Example: EuclideanDistance([1.0, 0.0], [0.0, 1.0]) → 1.41421356237
OnnxEmbed(string, string) → vector

Convert text to a vector using an ONNX model.
Example: OnnxEmbed('hello', '/path/to/model') → [0.5, 0.1, ...]
VectorToDouble(vector) → array<double>

Convert a vector to an array of doubles.
Example: VectorToDouble([1.0, 2.0, 3.0]) → [1.0, 2.0, 3.0]