Entity resolution¶
After per-event fragments are written, build merges them into canonical nodes
and edges (oddsgraph/resolution.py, oddsgraph/schema.py).
Fragment merge¶
merge_fragments unions nodes and edges that share local IDs / edge keys:
- evidence market IDs are unioned
- aliases are unioned
- confidence takes the max
- evidence text prefers the higher-confidence edge
Resolution tiers¶
Fragment-local nodes map to canonical IDs using ordered tiers, including:
- Exact Polymarket identifiers (for example
event:… / market ids) - Exact slug / label matches within a node type
- Alias matches
- Fuzzy label matches via RapidFuzz (
fuzzy_threshold, default92)
Unresolved nodes keep an unresolved method marker until a later tier succeeds.
Tier counts appear in inference_report.json under resolution_tiers.
MATCH identity¶
Dateful MATCH ids (match:<teams>-<YYYY-MM-DD>) identify fixtures. Two MATCH
nodes that share a display label but carry dates more than one day apart do
not merge (true rematches stay distinct). The same team-pair with dates
within ±1 calendar day — the common Polymarket slug vs FIFA kickoff skew —
coalesces into one node, preferring the official-bracket kickoff id when that
fragment binds. Label-only MATCH ids may still upgrade to a dateful id when the
official bracket or topology supplies the more specific form. Merging an
official_bracket fragment also stamps inference_method=official_bracket on
the canonical MATCH so progression edges stay consistent with official bracket data.
MATCH merge policy lives in oddsgraph/match_merge.py and is applied by
oddsgraph/resolution.py.
Confidence filtering¶
--minimum-confidence rejects edges below the threshold during build. It does
not change entity resolution itself. Rejected edges land in
rejected_edges.parquet with a rejection_reason.
Ontology validation¶
Edges must match ALLOWED_EDGE_PATTERNS. Invalid patterns are rejected even if
confidence is high. See Ontology.