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

Dedupe identical phrase analysis payloads on PT9 import

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
data

Direzione di ricerca

Start in convertPt9Project.ts and compare the existing token content-dedupe pass from #313 with the phraseAnalyses and phraseAnalysisLinks data. Review the identity described in #187, then add coverage for identical, case-variant, and differing gloss, senseRef, or surface payloads. Done means duplicate payloads collapse, all links survive with tokens unchanged, and the merged count is reported like #313; the work is blocked by #313 and #187.

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

Descrizione

PT9 import creates one PhraseAnalysis per phrase occurrence (analysisMerger.ts:371-405, id pt9:pa:{firstRef}:{n}). It merges phrases on their token run plus lexeme, so two occurrences with identical glosses get two payloads. This is the phrase counterpart of #313, deferred from it.

This does no harm until #187 makes the store find-or-create phrase payloads. After that, imported projects break the invariant #187 establishes:

  • #188's phrase rows show each duplicate as its own row with one usage.
  • A hand-glossed phrase that matches the duplicates merges into whichever one comes first in phraseAnalyses, so the links end up split by array order.

What to do

Extend #313's content-dedupe pass in convertPt9Project.ts to phraseAnalyses / phraseAnalysisLinks, using the phrase identity #187 introduces (normalized surface + gloss + senseRef). Keep the first payload, point every link's analysisId at it, and leave link tokens untouched. Report the merged count the same way #313 does for tokens.

Checked, no work needed. Import builds surfaceText by joining token surfaces with a space, the same as the store's phraseSurfaceText, so identity compares like with like. Status and confidence live on links, so an approved occurrence and a candidate occurrence can share a payload.

Tests. Identical payloads collapse and both links survive; case variants collapse; payloads with a different gloss, senseRef, or surface stay separate.

Blocked by #313 and #187.

Size: S

Lingua principale
TypeScript
Stelle
2
Fork
0
Merge medio
2g 3h
PR unite (30g)
46

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 sillsdev/interlinearizer-extension

Tutte le issue di sillsdev/interlinearizer-extension

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.