globalwordnet / globalwordnet/semcor

Fix nested closing-quote order swap ('"' should be '\'"')

Open
#72 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
0
Forks
0
Avg merge
2d 22h
Merged PRs (30d)
24

Description

When a double-quoted span contains a nested single-quoted word/phrase and both close at the same point, Brown's real text always closes the *inner* single quote before the *outer* double quote -- e.g. `elected'".`, never `elected"'.`. This corpus had 42 raw instances of the reverse (wrong) order.

Verified each individually against `src/semcor/brown-nolines.txt` via context-window matching (reconstruct the target word with the pair swapped back, require a unique context-confirmed match in the reference). **27 confirmed** as genuine order bugs and fixed via `semcor-fix-quote-order` / `src/semcor/quote-order-fixes.yaml`.

15 left unfixed for a follow-up:
- 5 are sentence-initial with no preceding word to reconstruct a target from
- the rest involve dialect apostrophes or other irregular preceding tokens that don't reconstruct cleanly

Also extended #67/#67-followup's single-quote-gap fix (`semcor-fix-single-quote-gap`): the scan had a blind spot where the word after a misattached opening quote is itself immediately followed by a flush contraction suffix rendered as one word in the reference (`You` + `'re` -> `You're`), e.g. `think,' You're` for Brown's `think, 'You're`. Extending the match target through flush-adjacent tokens found 5 more confirmed instances (120 total now, up from 115).

Both found while investigating a user-reported example in `data/press_reportage/br-a06.yaml` that combined one instance of each bug in the same sentence.

Fixes applied directly to `verify-brown-corpus` per the project's convention of not opening a PR per sub-issue of #5.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with verify-brown-corpus, semcor-fix-quote-order, and src/semcor/quote-order-fixes.yaml, then inspect the remaining 15 cases against src/semcor/brown-nolines.txt. Confirm each candidate with context-window matching and update the corpus fixes only when the reference proves the order or attachment is wrong; done means all remaining cases have a documented resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.