Documentation
¶
Overview ¶
Command store uses the three ways a graph is kept — by similarity, by edge, by assertion — and they are three interfaces because they answer three questions: what is like this, what is connected to this, what was asserted. Mem implements all three, so a caller that wants one and a caller that wants all three use the same object.
File is the same store with a log behind it: each write is appended as one JSON record and flushed before the call returns, so reopening the file replays exactly what was acknowledged.
The vectors come from a bag of words over a fixed vocabulary, so the example runs offline and its numbers are reproducible. A real embedder goes behind store.Vector without changing anything below.
go run ./examples/store