jd-match: one boilerplate bullet strips every later bullet's skills

Aperta
#1,189 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
66/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
data

Direzione di ricerca

Start with stripBoilerplate in src/lib/jd-match/extract-jd-terms.ts, where a blank line currently ends the skipped block. The change is to end the block at any line that starts with a bullet or enumerator, so only the anchor bullet is dropped. Add fail-before cases to extract-jd-terms.test.ts for the bulleted JDs in the table, then check that the sponsorship paragraph and the multi-line EEO paragraph still produce no terms. Done means the docblock and module header describe the new rule and those tests pass.

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

Descrizione

bug duplicate improvement

Problem

stripBoilerplate in src/lib/jd-match/extract-jd-terms.ts drops a line containing a boilerplate anchor and every non-blank line after it, up to the next blank line. Its docblock calls the line-granular over-strip "rare in practice". It isn't, because most JDs list requirements and benefits as bullets with no blank lines between them. Once one bullet hits an anchor (must be authorized to work, visa sponsorship, health insurance, paid time off, …), every later bullet in the list is dropped. The skills in those bullets never reach terms, nouns or coverage.

Whether a skill counts depends only on bullet order. Probed on main (#1175 found this, and kept term extraction byte-identical to main on purpose):

JD skills
Requirements:\n- Must be authorized to work in the US\n- 5+ years of Python\n- Kubernetes and Terraform in production []
Same three bullets, authorization line last python, kubernetes, terraform
We are unable to sponsor visas.\nMust have Python and Kubernetes experience. []
Benefits:\n- Health insurance\n- Python training budget []

The user sees real requirements missing from the keyword coverage, and the score is computed over the wrong set.

Scope

  • In a list, an anchor bullet drops only that bullet. A line that starts with a bullet or enumerator (-, *, •, 1., a)) ends any active boilerplate block, the same way a blank line does today.
  • Keep the block skip for prose paragraphs (an EEO paragraph wrapped over several lines must still be dropped whole).
  • Don't move to sentence-level stripping. #1175 tried it over four review rounds, and every boundary rule (terminators without a following space, soft-wrap joins, dangling conjunctions, abbreviations) leaked or over-stripped in a new way. A bullet boundary is a line-start check, with no punctuation heuristics.
  • Prose that runs on from an anchor line with no blank line (row 3) and the same-line case (Salary range: $100k. We use Rust and Go.) are out of scope. Fixing them needs a sentence boundary, which is the approach ruled out above. Row 3 stays in the table to show the limit.

Acceptance criteria

  • The bulleted JDs above (rows 1, 2 and 4) give the skills in the non-anchor bullets (python, kubernetes, terraform where present), regardless of where the anchor bullet sits.
  • The anchor bullet's own content still never reaches terms: TN/OPT/CPT from a sponsorship bullet stay out, and so does Samhit's wrapped …employment\nvisa (e.g., H-1B, TN, OPT/CPT)… paragraph case (a test row in #1175).
  • A multi-line EEO paragraph (no bullets) is still dropped as a block.
  • stripBoilerplate's docblock and the module header (lines ~14–17) describe the new rule.
  • Fail-before unit tests in extract-jd-terms.test.ts.

Notes

The eligibility findings from #1175 are detected on the raw JD and are display-only, so this change doesn't affect them.

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.