glam-lab / degender-the-web

A Chrome extension that replaces all gendered pronouns with "they/them/their."
GNU Affero General Public License v3.0
6 stars 3 forks source link

Possessives are sometimes expanded as if they are contractions #89

Open ProfJanetDavis opened 5 years ago

ProfJanetDavis commented 5 years ago

Describe the bug Some possessives are rewritten as if contractions with the word "is" or "has"

To Reproduce Steps to reproduce the behavior:

  1. Go to https://en.wikipedia.org/wiki/China_Mi%C3%A9ville
  2. Scroll down to Politics
  3. Read backwards one paragraph to see this:

Screen Shot 2019-09-08 at 8 36 10 PM

Expected behavior It should be a possessive, with `s.

Additional context There are tests in grammar/cases.contractions.js. "Bob's book" is fine; "Miéville's left-wing politics" is not.

Apparently Compromise can't be trusted to expand contractions correctly in some cases. Since there are a limited number of contractions with 's I actually want to expand - those involving "he" or "she" - perhaps I should just take care of them individually.

ProfJanetDavis commented 5 years ago

Seems indeed to be a Compromise bug. Something about the sentence structure makes Compromise think this is a contraction and not a possessive.

ProfJanetDavis commented 5 years ago

This is more obnoxious than I initially thought. Here are two more examples from the same page:

Screen Shot 2019-09-14 at 3 16 08 PM

Screen Shot 2019-09-14 at 3 23 03 PM

ProfJanetDavis commented 5 years ago

Here's another example, from https://medium.com/the-cut/bastard-9d475287a42a: Screen Shot 2019-10-04 at 3 19 08 PM