File size: 223 Bytes
21c7db9
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
"""Simple embedding surrogate."""

from __future__ import annotations


def embed_text(text: str) -> list[float]:
    tokens = text.lower().split()
    return [float((hash(token) % 1000) / 1000.0) for token in tokens[:32]]