)]}'
{
  "commit": "e510854f04aac8099102172a39970471d8b369e0",
  "tree": "ed383baf8d9183a70a226e26810c0916f19e4bfe",
  "parents": [
    "0fec0bee779435957d92730316376657f0456463"
  ],
  "author": {
    "name": "Marc Kupietz",
    "email": "kupietz@ids-mannheim.de",
    "time": "Fri Sep 04 15:29:52 2026 +0200"
  },
  "committer": {
    "name": "Marc Kupietz",
    "email": "kupietz@ids-mannheim.de",
    "time": "Fri Sep 04 19:42:38 2026 +0200"
  },
  "message": "Score the first collocate of a query with the right window size\n\ntrue_window_size counts the positions a pair was observed in and is\npassed on as the window size of the expected frequency. It started at\none, but the first key of the iteration takes the same branch as any\nfurther key of the same collocate, which increments it. The first\ncollocate of every query was therefore scored with a window one position\ntoo wide, so that its expected frequency came out too high and its pmi,\nnpmi, md, lfmd and llr too low.\n\nThe test data shows this: for \"Aluminium\" and \"Anwendungstechnologie\",\nln_count is 16 and rn_count 0, so all 16 co-occurrences sit in the single\nposition left of the node, and the aggregate pmi has to be the pmi of\nthat position. It was 8.4592 while ln_pmi was 9.4592, exactly log2(2)\napart. They now agree, and npmi, md, lfmd and llr change accordingly,\neach matching an independent calculation with a window of one.\n\nCounting up from zero fixes it. Note that md_nws is unaffected, as it\ndeliberately uses the nominal window size, and logDice no longer takes a\nwindow size at all.\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\nChange-Id: I58c26bcdf273e320442be5abb5728219682ac951\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4da2e064cef925c896daf2adf61cd7b20f05888a",
      "old_mode": 33188,
      "old_path": "src/collocatordb.cc",
      "new_id": "6eda410273acf5b0855333167be30884e1527f5b",
      "new_mode": 33188,
      "new_path": "src/collocatordb.cc"
    },
    {
      "type": "modify",
      "old_id": "53e2736ea772f72fac353c5e67449cf28abc9629",
      "old_mode": 33188,
      "old_path": "tests/basic_test.c",
      "new_id": "d98aac469a761c471ed7364ae1afe0b562808df2",
      "new_mode": 33188,
      "new_path": "tests/basic_test.c"
    }
  ]
}
