yoastseo
Version:
Yoast client-side content analysis
730 lines (729 loc) • 49.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _generalFeedbackStrings = require("./feedbackStrings/generalFeedbackStrings");
var _disabilityAssessmentStrings = require("./feedbackStrings/disabilityAssessmentStrings");
var _isPrecededByException = require("../helpers/isPrecededByException");
var _isFollowedByException = require("../helpers/isFollowedByException");
var _isFollowedAndPrecededByException = require("../helpers/isFollowedAndPrecededByException");
var _includesConsecutiveWords = require("../helpers/includesConsecutiveWords");
var _scores = require("./scores");
var _notInclusiveWhenStandalone = _interopRequireDefault(require("../helpers/notInclusiveWhenStandalone"));
var _disabilityRulesData = require("./disabilityRulesData");
var _i18n = require("@wordpress/i18n");
var _createRuleDescriptions = require("../helpers/createRuleDescriptions");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const disabilityAssessments = [{
identifier: "binge",
nonInclusivePhrases: ["binge"],
inclusiveAlternatives: "<i>indulge, satiate, wallow, spree, marathon, consume excessively</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i>, unless talking about a symptom of a medical condition. " + "If you are not referencing a symptom, consider other alternatives to describe the trait or behavior, such as %2$s.",
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["drink", "drinks", "drinking", "eating disorder", "and purge", "behavior", "behaviors", "behaviour", "behaviours"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["drink", "drinks", "drinking", "eating disorder", "and purge", "behavior", "behaviors", "behaviour", "behaviours"])
}, {
identifier: "bingeing",
nonInclusivePhrases: ["bingeing", "binging"],
inclusiveAlternatives: "<i>indulging, satiating, wallowing, spreeing, marathoning, consuming excessively</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i>, unless talking about a symptom of a medical condition. " + "If you are not referencing a symptom, consider other alternatives to describe the trait or behavior, such as %2$s.",
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["and purging", "behavior", "behaviors", "behaviour", "behaviours"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["and purging", "behavior", "behaviors", "behaviour", "behaviours"])
}, {
identifier: "binged",
nonInclusivePhrases: ["binged"],
inclusiveAlternatives: "<i>indulged, satiated, wallowed, spreed, marathoned, consumed excessively</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i>, unless talking about a symptom of a medical condition. " + "If you are not referencing a symptom, consider other alternatives to describe the trait or behavior, such as %2$s.",
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["and purged"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["and purged"])
}, {
identifier: "binges",
nonInclusivePhrases: ["binges"],
inclusiveAlternatives: "<i>indulges, satiates, wallows, sprees, marathons, consumes excessively</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i>, unless talking about a symptom of a medical condition. " + "If you are not referencing a symptom, consider other alternatives to describe the trait or behavior, such as %2$s.",
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["and purges"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["and purges"])
}, {
identifier: "wheelchairBound",
nonInclusivePhrases: ["wheelchair-bound", "wheelchair bound", "confined to a wheelchair"],
inclusiveAlternatives: "<i>uses a wheelchair, is a wheelchair user</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "mentallyRetarded",
nonInclusivePhrases: ["mentally retarded"],
inclusiveAlternatives: "<i>person with an intellectual disability</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "retarded",
nonInclusivePhrases: ["retarded"],
inclusiveAlternatives: "<i>uninformed, ignorant, foolish, irrational, insensible</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: [_generalFeedbackStrings.avoidDerogatory, _generalFeedbackStrings.alternative].join(" "),
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isNotPrecededByException)(words, ["mentally"]));
},
ruleDescription: (0, _createRuleDescriptions.notPreceded)(["mentally"])
}, {
identifier: "alcoholic",
nonInclusivePhrases: ["an alcoholic"],
inclusiveAlternatives: "<i>person with alcohol use disorder</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.orangeUnlessSomeoneWants,
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["drink", "beverage"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["drink", "beverage"])
}, {
identifier: "alcoholics",
nonInclusivePhrases: ["alcoholics"],
inclusiveAlternatives: "<i>people with alcohol use disorder</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.orangeUnlessSomeoneWants,
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["anonymous"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["anonymous"])
}, {
identifier: "cripple",
nonInclusivePhrases: ["a cripple"],
inclusiveAlternatives: "<i>person with a physical disability, a physically disabled person</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: [_generalFeedbackStrings.avoidDerogatory, _generalFeedbackStrings.alternative].join(" ")
}, {
identifier: "crippled",
nonInclusivePhrases: ["crippled"],
inclusiveAlternatives: "<i>has a physical disability, is physically disabled</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "daft",
nonInclusivePhrases: ["daft"],
inclusiveAlternatives: "<i>uninformed, ignorant, foolish, inconsiderate, irrational, reckless</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "handicapped",
nonInclusivePhrases: ["handicapped"],
inclusiveAlternatives: "<i>disabled, person with a disability</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "handicap",
nonInclusivePhrases: ["handicap"],
inclusiveAlternatives: "<i>disability</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["toilet", "toilets", "parking", "bathroom", "bathrooms", "stall", "stalls"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["toilet", "toilets", "parking", "bathroom", "bathrooms", "stall", "stalls"])
}, {
identifier: "insane",
nonInclusivePhrases: ["insane"],
inclusiveAlternatives: "<i>wild, confusing, unpredictable, impulsive, reckless, out of control, " + "unbelievable, amazing, incomprehensible, nonsensical, outrageous, ridiculous</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isNotPrecededByException)(words, _disabilityRulesData.shouldNotPrecedeStandaloneCrazy)).filter((0, _isFollowedAndPrecededByException.isNotFollowedAndPrecededByException)(words, nonInclusivePhrase, _disabilityRulesData.shouldNotPrecedeStandaloneCrazyWhenFollowedByAbout, _disabilityRulesData.shouldNotFollowStandaloneCrazyWhenPrecededByToBe));
},
ruleDescription: "Not targeted with this feedback when part of a more specific phrase that we target ('to drive insane', 'to go insane')."
}, {
identifier: "insanely",
nonInclusivePhrases: ["insanely"],
inclusiveAlternatives: "<i>extremely, amazingly, wildly, ferociously, ridiculously, unbelievably</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "imbecile",
nonInclusivePhrases: ["imbecile"],
inclusiveAlternatives: "<i>uninformed, ignorant, foolish, inconsiderate, irrational, reckless</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: [_generalFeedbackStrings.avoidDerogatory, _generalFeedbackStrings.alternative].join(" ")
}, {
identifier: "specialNeeds",
nonInclusivePhrases: ["special needs"],
inclusiveAlternatives: ["<i>functional needs, support needs</i>", "<i>disabled, person with a disability</i>"],
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: [_generalFeedbackStrings.avoidHarmful, "Consider using an alternative, such as %2$s when referring to someone's" + " needs, or %3$s when referring to a person."].join(" ")
}, {
identifier: "hardOfHearing",
nonInclusivePhrases: ["hard-of-hearing"],
inclusiveAlternatives: "<i>hard of hearing, partially deaf, has partial hearing loss</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "hearingImpaired",
nonInclusivePhrases: ["hearing impaired"],
inclusiveAlternatives: "<i>deaf or hard of hearing, partially deaf, has partial hearing loss</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "functioning",
nonInclusivePhrases: ["high functioning", "low functioning"],
inclusiveAlternatives: "describing the specific characteristic or experience",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i> as it is potentially harmful. " + "Consider using an alternative, such as %2$s, unless referring to how you characterize your own condition.",
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["autism"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["autism"])
}, {
identifier: "autismHigh",
nonInclusivePhrases: ["high functioning autism", "high-functioning autism"],
inclusiveAlternatives: "<i>autism with high support needs</i> or describing the specific characteristic or experience",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: "Avoid using <i>%1$s</i> as it is potentially harmful. " + "Consider using an alternative, such as %2$s, unless referring to how you characterize your own condition."
}, {
identifier: "autismLow",
nonInclusivePhrases: ["low functioning autism", "low-functioning autism"],
inclusiveAlternatives: "<i>autism with low support needs</i> or describing the specific characteristic or experience",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: "Avoid using <i>%1$s</i> as it is potentially harmful. " + "Consider using an alternative, such as %2$s, unless referring to how you characterize your own condition."
}, {
identifier: "birthDefect",
nonInclusivePhrases: ["birth defect"],
inclusiveAlternatives: "<i>congenital disability, born with a disability, disability since birth</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i> to describe someone's specific condition. " + "Consider using an alternative, such as %2$s, unless referring to how you characterize your own condition."
}, {
identifier: "lame",
nonInclusivePhrases: ["lame"],
inclusiveAlternatives: ["<i>boring, lousy, unimpressive, sad, corny</i>", "<i>person with a disability, person who has difficulty with walking</i>"],
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i> as it is potentially harmful. " + "Unless you are using it as a noun to refer to an object (such as the kitchen tool), consider using an alternative. For example, %2$s. If referring to someone's disability, use an alternative such as %3$s."
}, {
identifier: "lamer",
nonInclusivePhrases: ["lamer"],
inclusiveAlternatives: "<i>more boring, lousier, more unimpressive, sadder, cornier</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "lamest",
nonInclusivePhrases: ["lamest"],
inclusiveAlternatives: "<i>most boring, lousiest, most unimpressive, saddest, corniest</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "commitSuicide",
nonInclusivePhrases: ["commit suicide"],
inclusiveAlternatives: "<i>take one's life, die by suicide, kill oneself</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "committingSuicide",
nonInclusivePhrases: ["committing suicide"],
inclusiveAlternatives: "<i>taking one's life, dying by suicide, killing oneself</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "commitsSuicide",
nonInclusivePhrases: ["commits suicide"],
inclusiveAlternatives: "<i>takes one's life, dies by suicide, kills oneself</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "committedSuicide",
nonInclusivePhrases: ["committed suicide"],
inclusiveAlternatives: "<i>took one's life, died by suicide, killed themself</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "handicapParking",
nonInclusivePhrases: ["handicap parking"],
inclusiveAlternatives: "<i>accessible parking</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "fellOnDeafEars",
nonInclusivePhrases: ["fell on deaf ears"],
inclusiveAlternatives: "<i>was not addressed, was ignored, was disregarded</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "turnOnBlindEye",
nonInclusivePhrases: ["turn a blind eye"],
inclusiveAlternatives: "<i>ignore, pretend not to notice</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "blindLeadingBlind",
nonInclusivePhrases: ["the blind leading the blind"],
inclusiveAlternatives: "<i>ignorant, misguided, incompetent, unqualified, insensitive, unaware</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "handicapBathroom",
nonInclusivePhrases: ["handicap bathroom", "handicap bathrooms"],
inclusiveAlternatives: "<i>accessible bathroom(s)</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "handicapToilet",
nonInclusivePhrases: ["handicap toilet", "handicap toilets"],
inclusiveAlternatives: "<i>accessible toilet(s)</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "handicapStall",
nonInclusivePhrases: ["handicap stall", "handicap stalls"],
inclusiveAlternatives: "<i>accessible stall(s)</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "stupid",
nonInclusivePhrases: ["stupid"],
inclusiveAlternatives: ["<i>uninformed, ignorant, foolish, inconsiderate, irrational, reckless</i>"],
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "dumbDown",
nonInclusivePhrases: ["dumb down"],
inclusiveAlternatives: "<i>oversimplify</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "dumbingDown",
nonInclusivePhrases: ["dumbing down"],
inclusiveAlternatives: "<i>oversimplifying</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "dumbedDown",
nonInclusivePhrases: ["dumbed down"],
inclusiveAlternatives: "<i>oversimplified</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "dumbItDown",
nonInclusivePhrases: ["dumb it down"],
inclusiveAlternatives: "<i>oversimplify it</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "dumbingItDown",
nonInclusivePhrases: ["dumbing it down"],
inclusiveAlternatives: "<i>oversimplifying it</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "dumbedItDown",
nonInclusivePhrases: ["dumbed it down"],
inclusiveAlternatives: "<i>oversimplified it</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "dumb",
nonInclusivePhrases: ["dumb", "dumber", "dumbest"],
inclusiveAlternatives: ["<i>uninformed, ignorant, foolish, inconsiderate, irrational, reckless</i>"],
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isNotPrecededByException)(words, ["deaf and"])).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["down"])).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["it down"]));
},
ruleDescription: (0, _createRuleDescriptions.notPreceded)(["deaf and"])
}, {
identifier: "deaf",
nonInclusivePhrases: ["deaf-mute", "deaf and dumb"],
inclusiveAlternatives: "<i>deaf</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "addict",
nonInclusivePhrases: ["addict"],
inclusiveAlternatives: "<i>person with a (drug, alcohol, ...) addiction, person with substance abuse disorder</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.orangeUnlessSomeoneWants
}, {
identifier: "addicts",
nonInclusivePhrases: ["addicts"],
inclusiveAlternatives: "<i>people with a (drug, alcohol, ...) addiction, people with substance abuse disorder</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.orangeUnlessSomeoneWants
}, {
identifier: "brainDamaged",
nonInclusivePhrases: ["brain-damaged"],
inclusiveAlternatives: "<i>person with a (traumatic) brain injury</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.orangeUnlessSomeoneWants
}, {
identifier: "differentlyAbled",
nonInclusivePhrases: ["differently abled", "differently-abled"],
inclusiveAlternatives: "<i>disabled, person with a disability</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.orangeUnlessSomeoneWants
}, {
identifier: "epilepticFit",
nonInclusivePhrases: ["epileptic fit"],
inclusiveAlternatives: "<i>epileptic seizure</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "epilepticFits",
nonInclusivePhrases: ["epileptic fits"],
inclusiveAlternatives: "<i>epileptic seizures</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "sanityCheck",
nonInclusivePhrases: ["sanity check"],
inclusiveAlternatives: "<i>final check, confidence check, rationality check, soundness check</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "to not be crazy about",
nonInclusivePhrases: ["crazy about"],
inclusiveAlternatives: "<i>to not be impressed by, to not be enthusiastic about, to not be into, to not like</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to not be crazy about</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of "to be", the negation "not", and an optional intensifier (e.g. "is not so crazy about" ).
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToBeNotWithOptionalIntensifier));
},
ruleDescription: "Targeted when preceded by a negated form of 'to be' or 'to get' and an optional intensifier."
}, {
identifier: "to be crazy about",
nonInclusivePhrases: ["crazy about"],
inclusiveAlternatives: "<i>to love, to be obsessed with, to be infatuated with</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to be crazy about</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of "to be" and an optional intensifier (e.g. "am so crazy about")
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToBeWithOptionalIntensifier));
},
ruleDescription: "Targeted when preceded by a form of 'to be' or 'to get' and an optional intensifier."
}, {
identifier: "to be nuts about",
nonInclusivePhrases: ["nuts about"],
inclusiveAlternatives: "<i>to love, to be obsessed with, to be infatuated with</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to be nuts about</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of "to be" and an optional intensifier (e.g. "am so nuts about")
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToBeWithOptionalIntensifier));
},
ruleDescription: "Targeted when preceded by a form of 'to be' or 'to get' and an optional intensifier."
}, {
identifier: "to be bananas about",
nonInclusivePhrases: ["bananas about"],
inclusiveAlternatives: "<i>to love, to be obsessed with, to be infatuated with</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to be bananas about</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of "to be" and an optional intensifier (e.g. "am so bananas about")
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToBeWithOptionalIntensifier));
},
ruleDescription: "Targeted when preceded by a form of 'to be' or 'to get' and an optional intensifier."
}, {
identifier: "crazy in love",
nonInclusivePhrases: ["crazy in love"],
inclusiveAlternatives: "<i>wildly in love, head over heels, infatuated</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "to go crazy",
nonInclusivePhrases: ["crazy"],
inclusiveAlternatives: "<i>to go wild, to go out of control, to go up the wall, to be aggravated," + " to get confused</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to go crazy</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of "to go" (e.g. 'going crazy').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToGo));
},
ruleDescription: (0, _createRuleDescriptions.isPreceded)(_disabilityRulesData.formsOfToGo)
}, {
identifier: "to go insane",
nonInclusivePhrases: ["insane"],
inclusiveAlternatives: "<i>to go wild, to go out of control, to go up the wall, to be aggravated," + " to get confused</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to go insane</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of "to go" (e.g. 'going insane').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToGo));
},
ruleDescription: (0, _createRuleDescriptions.isPreceded)(_disabilityRulesData.formsOfToGo)
}, {
identifier: "to go mad",
nonInclusivePhrases: ["mad"],
inclusiveAlternatives: "<i>to go wild, to go out of control, to go up the wall, to be aggravated," + " to get confused</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to go mad</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of "to go" (e.g. 'going mad').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToGo));
},
ruleDescription: (0, _createRuleDescriptions.isPreceded)(_disabilityRulesData.formsOfToGo)
}, {
identifier: "to go nuts",
nonInclusivePhrases: ["nuts"],
inclusiveAlternatives: "<i>to go wild, to go out of control, to go up the wall, to be aggravated," + " to get confused</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to go nuts</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of "to go" (e.g. 'going nuts').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToGo));
},
ruleDescription: (0, _createRuleDescriptions.isPreceded)(_disabilityRulesData.formsOfToGo)
}, {
identifier: "to go bananas",
nonInclusivePhrases: ["bananas"],
inclusiveAlternatives: "<i>to go wild, to go out of control, to go up the wall, to be aggravated," + " to get confused</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to go bananas</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of "to go" (e.g. 'going bananas').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToGo));
},
ruleDescription: (0, _createRuleDescriptions.isPreceded)(_disabilityRulesData.formsOfToGo)
}, {
identifier: "to drive crazy",
nonInclusivePhrases: ["crazy"],
inclusiveAlternatives: "<i>to drive one to their limit, to get on one's last nerve, to make one livid, to aggravate, " + "to make one's blood boil, to exasperate, to get into one's head</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to drive crazy</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me crazy', 'drove everyone crazy').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.combinationsOfDriveAndObjectPronoun));
},
ruleDescription: "Targeted when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me')"
}, {
identifier: "to drive insane",
nonInclusivePhrases: ["insane"],
inclusiveAlternatives: "<i>to drive one to their limit, to get on one's last nerve, to make one livid, to aggravate, " + "to make one's blood boil, to exasperate, to get into one's head</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to drive insane</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me insane', 'drove everyone insane').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.combinationsOfDriveAndObjectPronoun));
},
ruleDescription: "Targeted when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me')"
}, {
identifier: "to drive mad",
nonInclusivePhrases: ["mad"],
inclusiveAlternatives: "<i>to drive one to their limit, to get on one's last nerve, to make one livid, to aggravate, " + "to make one's blood boil, to exasperate, to get into one's head</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to drive mad</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me mad', 'drove everyone mad').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.combinationsOfDriveAndObjectPronoun));
},
ruleDescription: "Targeted when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me')"
}, {
identifier: "to drive nuts",
nonInclusivePhrases: ["nuts"],
inclusiveAlternatives: "<i>to drive one to their limit, to get on one's last nerve, to make one livid, to aggravate, " + "to make one's blood boil, to exasperate, to get into one's head</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to drive nuts</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me nuts', 'drove everyone nuts').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.combinationsOfDriveAndObjectPronoun));
},
ruleDescription: "Targeted when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me')"
}, {
identifier: "to drive bananas",
nonInclusivePhrases: ["bananas"],
inclusiveAlternatives: "<i>to drive one to their limit, to get on one's last nerve, to make one livid, to aggravate, " + "to make one's blood boil, to exasperate, to get into one's head</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: ["Avoid using <i>to drive bananas</i> as it is potentially harmful.", _generalFeedbackStrings.alternative].join(" "),
// Target only when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me bananas', 'drove everyone bananas').
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.combinationsOfDriveAndObjectPronoun));
},
ruleDescription: "Targeted when preceded by a form of 'to drive' and an object pronoun (e.g. 'driving me')"
}, {
identifier: "nuts",
nonInclusivePhrases: ["nuts"],
inclusiveAlternatives: "<i>wild, baffling, out of control, inexplicable, unbelievable, aggravating, shocking, intense, impulsive, chaotic, " + "confused, mistaken, obsessed</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
// Only target 'nuts' and 'bananas' when preceded by is/he's/she's and an optional intensifier. Don't target when it's part of the phrase 'to be nuts/bananas about...'
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.shouldPrecedeNutsBananasWithIntensifier)).filter((0, _isFollowedAndPrecededByException.isNotFollowedAndPrecededByException)(words, nonInclusivePhrase, _disabilityRulesData.shouldNotPrecedeStandaloneCrazyWhenFollowedByAbout, _disabilityRulesData.shouldNotFollowStandaloneCrazyWhenPrecededByToBe));
},
ruleDescription: "Targeted when preceded by is/he's/she's and an optional intensifier and when it's not part of a more specific phrase that we target ('to go nuts', 'to drive nuts', 'to be nuts about')."
}, {
identifier: "bananas",
nonInclusivePhrases: ["bananas"],
inclusiveAlternatives: "<i>wild, baffling, out of control, inexplicable, unbelievable, aggravating, shocking, intense, impulsive, chaotic, " + "confused, mistaken, obsessed</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
// Only target 'nuts' and 'bananas' when preceded by is/he's/she's and an optional intensifier. Don't target when it's part of the phrase 'to be nuts/bananas about...'
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.shouldPrecedeNutsBananasWithIntensifier)).filter((0, _isFollowedAndPrecededByException.isNotFollowedAndPrecededByException)(words, nonInclusivePhrase, _disabilityRulesData.shouldNotPrecedeStandaloneCrazyWhenFollowedByAbout, _disabilityRulesData.shouldNotFollowStandaloneCrazyWhenPrecededByToBe));
},
ruleDescription: "Targeted when preceded by is/he's/she's and an optional intensifier and when it's not part of a more specific phrase that we target ('to go bananas', 'to drive bananas', 'to be bananas about')."
}, {
identifier: "crazier",
nonInclusivePhrases: ["crazier"],
inclusiveAlternatives: "<i>more wild, baffling, out of control, inexplicable, unbelievable, aggravating, shocking, intense, impulsive, " + "chaotic, confused, mistaken, obsessed</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "craziest",
nonInclusivePhrases: ["craziest"],
inclusiveAlternatives: "<i>most wild, baffling, out of control, inexplicable, unbelievable, aggravating, shocking, intense, impulsive, " + "chaotic, confused, mistaken, obsessed</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "psychopathic",
nonInclusivePhrases: ["psychopath", "psychopaths", "psychopathic"],
inclusiveAlternatives: "<i>toxic, manipulative, unpredictable, impulsive, reckless, out of control</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "schizophrenic",
nonInclusivePhrases: ["schizophrenic", "bipolar"],
inclusiveAlternatives: "<i>of two minds, chaotic, confusing</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _disabilityAssessmentStrings.orangeUnlessMedicalCondition,
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["disorder"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["disorder"])
}, {
identifier: "paranoid",
nonInclusivePhrases: ["paranoid"],
inclusiveAlternatives: "<i>overly suspicious, unreasonable, defensive</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _disabilityAssessmentStrings.orangeUnlessMedicalCondition,
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["personality disorder", "delusion", "delusions", "ideation"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["personality disorder", "delusion", "delusions", "ideation"])
}, {
identifier: "manic",
nonInclusivePhrases: ["manic"],
inclusiveAlternatives: "<i>excited, raving, unbalanced, wild</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _disabilityAssessmentStrings.orangeUnlessMedicalCondition,
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["episode", "episodes", "state", "states", "symptoms", "and depressive episodes", "and hypomanic", "or hypomanic"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["episode", "episodes", "state", "states", "symptoms", "and depressive episodes", "and hypomanic", "or hypomanic"])
}, {
identifier: "hysterical",
nonInclusivePhrases: ["hysterical"],
inclusiveAlternatives: "<i>intense, vehement, piercing, chaotic</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "psycho",
nonInclusivePhrases: ["psycho", "psychos"],
inclusiveAlternatives: "<i>toxic, distraught, unpredictable, reckless, out of control</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "neurotic",
nonInclusivePhrases: ["neurotic", "lunatic"],
inclusiveAlternatives: "<i>distraught, unstable, startling, confusing, baffling</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "sociopath",
nonInclusivePhrases: ["sociopath"],
inclusiveAlternatives: ["<i>person with antisocial personality disorder</i>", "<i>toxic, manipulative, cruel</i>"],
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i> as it is potentially harmful. If you are referencing the " + "medical condition, use %2$s instead, unless referring to someone who explicitly wants to be referred to with this term. " + "If you are not referencing the medical condition, consider other alternatives to describe the trait or behavior, such as %3$s."
}, {
identifier: "sociopaths",
nonInclusivePhrases: ["sociopaths"],
inclusiveAlternatives: ["<i>people with antisocial personality disorder</i>", "<i>toxic, manipulative, cruel</i>"],
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i> as it is potentially harmful. If you are referencing the " + "medical condition, use %2$s instead, unless referring to someone who explicitly wants to be referred to with this term. " + "If you are not referencing the medical condition, consider other alternatives to describe the trait or behavior, such as %3$s."
}, {
identifier: "spaz",
nonInclusivePhrases: ["spaz", "spazz"],
inclusiveAlternatives: ["<i>incompetent person, erratic person, inept person, hyperactive person, agitated person, amateur, unqualified person, ignorant person</i>", "<i>lose control, flip out, " + "throw a tantrum, behave erratically, go on the fritz, twitch, move clumsily, move awkwardly</i>"],
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: "Avoid using <i>%1$s</i> as it is potentially harmful. Consider using an alternative, such as %2$s when referring to a person, or %3$s when referring to an action.",
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["out"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["out"])
}, {
identifier: "spazzes",
nonInclusivePhrases: ["spazzes"],
inclusiveAlternatives: ["<i>incompetent people, erratic people, inept people, hyperactive people, agitated people, amateurs, unqualified people, ignorant people</i>", "<i>loses control, flips out, throws a " + "tantrum, behaves erratically, goes on the fritz, twitches, moves clumsily, moves awkwardly</i>"],
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: "Avoid using <i>%1$s</i> as it is potentially harmful. Consider using an alternative, such as %2$s when referring to a person, or %3$s when referring to an action.",
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["out"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["out"])
}, {
identifier: "spazzing",
nonInclusivePhrases: ["spazzing"],
inclusiveAlternatives: "<i>losing control, flipping out, throwing a tantrum, behaving erratically, going on the fritz, twitching, moving clumsily, moving awkwardly</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["out"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["out"])
}, {
identifier: "spazzed",
nonInclusivePhrases: ["spazzed"],
inclusiveAlternatives: "<i>lost control, flipped out, threw a tantrum, behaved erratically, went on the fritz, twitched, moved clumsily, moved awkwardly</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "spazOut",
nonInclusivePhrases: ["spaz out", "spazz out"],
inclusiveAlternatives: "<i>flip out, throw a tantrum, lose control, move clumsily, move awkwardly</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "spazzesOut",
nonInclusivePhrases: ["spazzes out"],
inclusiveAlternatives: "<i>flips out, throws a tantrum, loses control, moves clumsily, moves awkwardly</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "spazzingOut",
nonInclusivePhrases: ["spazzing out"],
inclusiveAlternatives: "<i>flipping out, throwing a tantrum, losing control, moving clumsily, moving awkwardly</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "crazy",
nonInclusivePhrases: ["crazy"],
inclusiveAlternatives: "<i>wild, baffling, out of control, inexplicable, unbelievable, aggravating, shocking, intense, impulsive, chaotic, " + "confused, mistaken, obsessed</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
// Don't target when 'crazy' is part of a more specific phrase that we target.
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isPrecededByException.isNotPrecededByException)(words, _disabilityRulesData.shouldNotPrecedeStandaloneCrazy)).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, _disabilityRulesData.shouldNotFollowStandaloneCrazy)).filter((0, _isFollowedAndPrecededByException.isNotFollowedAndPrecededByException)(words, nonInclusivePhrase, _disabilityRulesData.shouldNotPrecedeStandaloneCrazyWhenFollowedByAbout, _disabilityRulesData.shouldNotFollowStandaloneCrazyWhenPrecededByToBe));
},
ruleDescription: "Not targeted with this feedback when part of a more specific phrase that we target ('to drive crazy', " + "to go crazy', 'to (not) be crazy about', 'crazy in love')."
}, {
identifier: "narcissistic",
nonInclusivePhrases: ["narcissistic"],
inclusiveAlternatives: ["<i>person with narcissistic personality disorder</i>", "<i>selfish, egotistical, self-centered, self-absorbed, vain, toxic, manipulative</i>"],
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: "Be careful when using <i>%1$s</i> as it is potentially harmful. If you are referencing the " + "medical condition, use %2$s instead, unless referring to someone who explicitly wants to be referred to with this term." + " If you are not referencing the medical condition, consider other alternatives to describe the trait or behavior, such as %3$s.",
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["personality disorder"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["personality disorder"])
}, {
identifier: "OCD",
nonInclusivePhrases: ["ocd"],
inclusiveAlternatives: "<i>pedantic, obsessed, perfectionist</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
// We make sure to always capitalize "OCD" by pre-filling the first replacement variable.
feedbackFormat: [(0, _i18n.sprintf)(_disabilityAssessmentStrings.orangeUnlessMedicalCondition, "OCD", "%2$s"), "If you are referring to someone who has the medical condition, " + "then state that they have OCD rather than that they are OCD."].join(" "),
// Only target 'OCD' when preceded by a form of 'to be/to get' followed by an optional intensifier.
rule: (words, inclusivePhrases) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, inclusivePhrases).filter((0, _isPrecededByException.isPrecededByException)(words, _disabilityRulesData.formsOfToBeAndToBeNotWithOptionalIntensifier));
},
ruleDescription: "Targeted when preceded by a form of 'to be' or 'to get' (including their negated forms)" + "and an optional intensifier"
}, {
identifier: "theMentallyIll",
nonInclusivePhrases: ["the mentally ill"],
inclusiveAlternatives: "<i>people who are mentally ill</i>, <i>mentally ill people</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _notInclusiveWhenStandalone.default)(words, nonInclusivePhrase));
},
ruleDescription: _createRuleDescriptions.nonInclusiveWhenStandalone
}, {
identifier: "theDisabled",
nonInclusivePhrases: ["the disabled"],
inclusiveAlternatives: "<i>people who have a disability</i>, <i>disabled people</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _notInclusiveWhenStandalone.default)(words, nonInclusivePhrase));
},
ruleDescription: _createRuleDescriptions.nonInclusiveWhenStandalone
}];
disabilityAssessments.forEach(assessment => {
assessment.category = "disability";
assessment.learnMoreUrl = "https://yoa.st/inclusive-language-disability";
});
var _default = exports.default = disabilityAssessments;
//# sourceMappingURL=disabilityAssessments.js.map