Skip to content

fix: bug on partial and ent_type precision/recall when merging multi-documents#109

Merged
davidsbatista merged 2 commits into
mainfrom
fix-partial-ent-type-precision-recall-merge
Mar 12, 2026
Merged

fix: bug on partial and ent_type precision/recall when merging multi-documents#109
davidsbatista merged 2 commits into
mainfrom
fix-partial-ent-type-precision-recall-merge

Conversation

@davidsbatista

@davidsbatista davidsbatista commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

Related Issues

Proposed Changes:

  • Fix partial and ent_type precision/recall after merging by calling compute_metrics(partial_or_type=True) in _merge_results for those strategies.

How did you test it?

  • added unit tests

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added unit tests and updated the docstrings
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

… results

_merge_results() was calling compute_metrics() with no arguments after
merging counts, so partial_or_type defaulted to False and strict
formula (COR/ACT, COR/POS) was used for all strategies. That overwrote
the correct partial/ent_type P/R (COR+0.5*PAR)/ACT and (COR+0.5*PAR)/POS.

Now pass strategy_name into _merge_results and call
compute_metrics(partial_or_type=True) for 'partial' and 'ent_type'
so merged results keep the SemEval partial-match formula.

Fixes the bug where partial (and ent_type) reported same P/R as strict
(e.g. README example showed 0.40 instead of 0.70 for partial).

Made-with: Cursor
@davidsbatista davidsbatista marked this pull request as ready for review March 9, 2026 13:32
@davidsbatista davidsbatista merged commit b43717f into main Mar 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Partial (and ent_type) precision/recall use strict formula after merging documents

1 participant