Partially overlapping spans from different rules not fully resolved

Aperta
#58 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start by locating the executor’s span deduplication and overlap resolution logic, then read how rule outputs and span types are represented. Trace the existing same-position and IoU > 0.7 behavior before assessing how the opt-in strategy and cross-type option fit. Done means the defaults preserve current behavior and the requested overlap cases are covered by tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

When several rules match overlapping text, the executor only removes duplicates at the exact same position or same-type spans with IoU > 0.7. Partial overlaps survive and are counted as false positives.

Examples from a flat NER dataset (annotation uses always the longest span):

  • PER rule matches Dr. John Doe
  • PER rule matches John Doe
  • Gold Dr. John Doe
    IoU is 0.67 (<0.7) -> both are kept -> 1 TP and 1 FP

In this case keeping the shortest path is wrong.

Proposed solution

Add an opt-in overlap_strategy:

  • None (default): current behaviour, unchanged
  • longest: among overlapping spans, keep the longest (applies to overlaps with IoU <= 0.7, the default dedup does not remove)

Add cross_type_overlaps (default False): if True, resolve the conflict between spans of different type

Lingua principale
Python
Stelle
34
Fork
9
Merge medio
9g 13h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di KRLabsOrg/rulechef

Tutte le issue di KRLabsOrg/rulechef

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.