Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[parser] education — a misspelled month still mints an institution via a two-month range or a non-school partner line

Chiusa
#982 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
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
tooling

Direzione di ricerca

Start in src/lib/heuristics/extract/education.ts, especially isInstitutionLine and isProgramLeadAt around the referenced lines. Add focused repro tests for the two routes, then run the education corpus and render-roundtrip-education-lone-year.repro.test.ts. Done means both fabricated entries are prevented while Photography 2020 / Coursera and the #302 round-trip remain green.

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

Descrizione

batch:parser-education bug gaal

A misspelled month still produces a fabricated education entry through two routes that #979's fix (#980) does not reach. #980 closes the case where a lone one-token line sits beside a year (Setember 2021). These two routes remain.

Repro

Measured with the real extractEducation on origin/main @ 9c106ae, and unchanged on #980's head db9c11c. The first two lines of the section are Yale University / B.A. History, 2010 - 2014, followed by:

following lines entries out
Setember 2021 – Agust 2022 2: Yale, and a school named Setember 2021 – Agust
Setember 2021 / Dean's List 2: Yale, and a school named Dean's List with field: "Setember"
Route 1: a range with two misspelled months

What remains after the strip is two tokens (Setember, Agust). #980's isInlineDatedProgramEntry requires only "more than one token", so this passes, and the whole line becomes the institution. The one-token argument ("a mangled date is one token by construction") does not hold for a range.

Route 2: a mangled lead plus a partner line that is not a school

isProgramLeadAt (src/lib/heuristics/extract/education.ts:544 on main) deliberately keeps the loose isInlineDatedProgram. #980 keeps it that way so real one-word programs still parse, for example Photography 2020 / Coursera, including after our own export and re-parse (#302). The evidence for the pairing is the partner lookahead, isInstitutionLine(partner) (:527). That lookahead accepts Dean's List, so an honors line gets minted as an institution, with the misspelling as its field.

During #980's review this trade-off was accepted for a real school partner, Setember 2021 / Harvard Summer School. There the school is correct and only the field is polluted. With Dean's List it is different: the institution itself is fabricated.

Why it matters

This is the same fabricated-credential class as #979: the output names an institution the résumé does not contain. #979 will be closed by #980, so nothing else tracks these two routes.

Proposed direction

  • Route 2 (cheaper): tighten isInstitutionLine so an honors/annotation line (Dean's List, Honor Roll, Magna Cum Laude) is never accepted as a partner. EDUCATION_ANNOTATION_RE / isGradeAnnotationLine already recognise most of these.
  • Route 1: when every token that survives the strip sits where a month word sits in a date range (<tok> <year> – <tok> <year>), treat the line as a date range, not as a program. This is a structural test, not a spell corrector.

Measure both against the corpus before landing, because each one narrows a recognition path.

Acceptance criteria

  • Setember 2021 – Agust 2022 after a degreed entry produces one entry
  • Setember 2021 / Dean's List after a degreed entry mints no institution named Dean's List
  • Photography 2020 / Coursera still parses as a program entry, and the #302 one-word round-trip in render-roundtrip-education-lone-year.repro.test.ts stays green
  • The new cases fail against the pre-fix implementation
  • Any corpus movement is adjudicated fixture by fixture

Found while reviewing #980.

Lingua principale
TypeScript
Stelle
11
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 offlinecv/OfflineCV

Tutte le issue di offlinecv/OfflineCV

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.