Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Add contractions for spell checking #2015

Closed
bbondy opened this issue May 31, 2016 · 0 comments
Closed

Add contractions for spell checking #2015

bbondy opened this issue May 31, 2016 · 0 comments
Milestone

Comments

@bbondy
Copy link
Member

bbondy commented May 31, 2016

```// NB: This is to work around tinyspeck/slack-winssb#267, where contractions
// are incorrectly marked as spelling errors. This lets people get away with
// incorrectly spelled contracted words, but it's the best we can do for now.
const contractions = [
  "ain't", "aren't", "can't", "could've", "couldn't", "couldn't've", "didn't", "doesn't", "don't", "hadn't",
  "hadn't've", "hasn't", "haven't", "he'd", "he'd've", "he'll", "he's", "how'd", "how'll", "how's", "I'd",
  "I'd've", "I'll", "I'm", "I've", "isn't", "it'd", "it'd've", "it'll", "it's", "let's", "ma'am", "mightn't",
  "mightn't've", "might've", "mustn't", "must've", "needn't", "not've", "o'clock", "shan't", "she'd", "she'd've",
  "she'll", "she's", "should've", "shouldn't", "shouldn't've", "that'll", "that's", "there'd", "there'd've",
  "there're", "there's", "they'd", "they'd've", "they'll", "they're", "they've", "wasn't", "we'd", "we'd've",
  "we'll", "we're", "we've", "weren't", "what'll", "what're", "what's", "what've", "when's", "where'd",
  "where's", "where've", "who'd", "who'll", "who're", "who's", "who've", "why'll", "why're", "why's", "won't",
  "would've", "wouldn't", "wouldn't've", "y'all", "y'all'd've", "you'd", "you'd've", "you'll", "you're", "you've"
];

const contractionMap = _.reduce(contractions, (acc, word) => {
  acc[word.replace(/'.*/, '')] = true;
  return acc;
}, {});
@bbondy bbondy added this to the 0.10.2dev milestone May 31, 2016
@bbondy bbondy closed this as completed in 6296d6a Jun 1, 2016
@bbondy bbondy modified the milestones: 0.10.1dev, 0.10.2dev Jun 1, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant