Files
marqdo/tests/applications/concordance/consumer.js
cflmyandCursor 8f1010f967 Ship oracle journal values, bytecode/frontend hardening, and replay-policy Lean.
Host exposes oracle journals as language values with refuse/copy gates; bytecode and foreign session paths get modularized; applications and verification replay-policy sources land with Lake builds ignored.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-06 15:04:27 +08:00

11 lines
384 B
JavaScript

var index = new Map();
for (var row of bridge) {
for (var word of row.tokens) {
var value = index.get(word) || {count:0,docs:new Set()};
value.count++; value.docs.add(row.id); index.set(word,value);
}
}
var answer = [...index].sort((a,b)=>Buffer.compare(Buffer.from(a[0]),Buffer.from(b[0])))
.map(([word,v])=>({word,occurrences:v.count,documents:v.docs.size}));
answer;