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>
11 lines
384 B
JavaScript
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;
|