MCPcopy Create free account
hub / github.com/CaviraOSS/OpenReason / simple_vectorize

Function simple_vectorize

src/core/utils/unify.ts:14–18  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

12}
13
14const simple_vectorize = (text: string): number[] => {
15 const words = text.toLowerCase().split(/\W+/).filter(Boolean)
16 const vocab = Array.from(new Set(words))
17 return vocab.map(word => words.filter(w => w === word).length / words.length)
18}
19
20const remove_contradictory_statements = (steps: string[]): { cleaned: string[]; removed: number } => {
21 const cleaned: string[] = []

Callers 1

unify_stepsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected