I read The Elements of Style by Strunk and White to get better at writing. The biggest section is on common misuses of words and expressions in English. I thought the section was valuable, but more than I’d be able to keep in my head while writing. To solve that problem, I made a script that analyzes some given text and then annotates each potential misuse with a link to Strunk’s guidance.

// this is a list of commonly misused expressions’ names and definitions (in regex form), each with a link giving detail on usage
var cm = [
[‘All right’,
/\bal(l )?right/gi,
http://crockford.com/wrrrld/style5.html#1’%5D,
[‘As good or better than’,
/\bas good or better than/gi,
http://crockford.com/wrrrld/style5.html#2’%5D,
[‘As to whether’,
/\bas to whether/gi,
http://crockford.com/wrrrld/style5.html#3’%5D,
[‘Bid’,
/\b(?:bid|bade)\b/gi,
http://crockford.com/wrrrld/style5.html#4’%5D,
[‘Case’,
/\bcases?\b/gi,
http://crockford.com/wrrrld/style5.html#5’%5D,
[‘Certainly’,
/\bcertainly\b/gi,
http://crockford.com/wrrrld/style5.html#6’%5D,
[‘Character’,
/\bcharacter\b/gi,
http://crockford.com/wrrrld/style5.html#7’%5D,
[‘Claim, vb.’,
/\bclaim(?:ed)?\b/gi,
http://crockford.com/wrrrld/style5.html#8’%5D,
[‘Compare’,
/\bcompare\b/gi,
http://crockford.com/wrrrld/style5.html#9’%5D,
[‘Clever’,
/\bclever\b/gi,
http://crockford.com/wrrrld/style5.html#10’%5D,
[‘Consider’,
/\bconsider(?:ed)?\b/gi,
http://crockford.com/wrrrld/style5.html#11’%5D,
[‘Dependable’,
/\bdependable\b/gi,
http://crockford.com/wrrrld/style5.html#12’%5D,
[‘Due to’,
/\bdue to\b/gi,
http://crockford.com/wrrrld/style5.html#13’%5D,
[‘Effect’,
/\b(?:effect|affect)\b/gi,
http://crockford.com/wrrrld/style5.html#14’%5D,
[‘Etc’,
/\betc\.*\b/gi,
http://crockford.com/wrrrld/style5.html#15’%5D,
[‘Fact’,
/\bfact\b/gi,
http://crockford.com/wrrrld/style5.html#16’%5D,
[‘Factor’,
/\bfactor\b/gi,
http://crockford.com/wrrrld/style5.html#17’%5D,
[‘Feature’,
/\bfeature\b/gi,
http://crockford.com/wrrrld/style5.html#18’%5D,
[‘Fix’,
/\bfix\b/gi,
http://crockford.com/wrrrld/style5.html#19’%5D,
[‘He is a man who’,
/\bis a \w+ (?:who|which)\b/gi,
http://crockford.com/wrrrld/style5.html#20’%5D,
[‘However’,
/\bhowever\b/gi,
http://crockford.com/wrrrld/style5.html#21’%5D,
[‘Kind of’,
/\b(?:kind of|sort of)\b/gi,
http://crockford.com/wrrrld/style5.html#22’%5D,
[‘Less’,
/\b(?:less|fewer)\b/gi,
http://crockford.com/wrrrld/style5.html#23’%5D,
[‘Line, along these lines’,
/\balong (?:these|those|the)(?: same)? lines?\b/gi,
http://crockford.com/wrrrld/style5.html#24’%5D,
[‘Literal, literally’,
/\bliteral(?:ly)?\b/gi,
http://crockford.com/wrrrld/style5.html#25’%5D,
[‘Lose out’,
/\blose out\b/gi,
http://crockford.com/wrrrld/style5.html#26’%5D,
[‘Most’,
/\bmost\b/gi,
http://crockford.com/wrrrld/style5.html#27’%5D,
[‘Nature’,
/\bnature\b/gi,
http://crockford.com/wrrrld/style5.html#28’%5D,
[‘Near by’,
/\bnear ?by\b/gi,
http://crockford.com/wrrrld/style5.html#29’%5D,
[‘Oftentimes, ofttimes’,
/\b(?:oftentimes|ofttimes)\b/gi,
http://crockford.com/wrrrld/style5.html#30’%5D,
[‘One hundred and one’,
/\bone[ -]hundred(?:[ -]and)?[ -]one\b/gi,
http://crockford.com/wrrrld/style5.html#31’%5D,
[‘One of the most’,
/\bone of the most\b/gi,
http://crockford.com/wrrrld/style5.html#32’%5D,
[‘People’,
/\bthe (?:people|public)\b/gi,
http://crockford.com/wrrrld/style5.html#33’%5D,
[‘Phase’,
/\bphase\b/gi,
http://crockford.com/wrrrld/style5.html#34’%5D,
[‘Possess’,
/\bposses(?:ed|or)?\b/gi,
http://crockford.com/wrrrld/style5.html#35’%5D,
[‘Respective, respectively’,
/\brespective(?:ly)?\b/gi,
http://crockford.com/wrrrld/style5.html#36’%5D,
[‘So (for emphasis)’,
/\bso\b/gi,
http://crockford.com/wrrrld/style5.html#37’%5D,
[‘State’,
/\bstate\b/gi,
http://crockford.com/wrrrld/style5.html#39’%5D,
[‘Student body’,
/\bstudent body\b/gi,
http://crockford.com/wrrrld/style5.html#40’%5D,
[‘System’,
/\bsystem\b/gi,
http://crockford.com/wrrrld/style5.html#41’%5D,
[‘Thanking you in advance’,
/\b(?:thanking you in advance|thanks in advance|TIA)\b/gi,
http://crockford.com/wrrrld/style5.html#42’%5D,
[‘They’,
/\b(?:they|he or she|him or her|his or hers?)\b/gi,
http://crockford.com/wrrrld/style5.html#43’%5D,
[‘Very’,
/\bvery\b/gi,
http://crockford.com/wrrrld/style5.html#44’%5D,
[‘Viewpoint’,
/\bviewpoint\b/gi,
http://crockford.com/wrrrld/style5.html#45’%5D,
[‘While’,
/\bwhile\b/gi,
http://crockford.com/wrrrld/style5.html#46’%5D,
[‘Whom’,
/\bwhom\b/gi,
http://crockford.com/wrrrld/style5.html#47’%5D,
[‘Worth while’,
/\bworth ?while\b/gi,
http://crockford.com/wrrrld/style5.html#48’%5D,
[‘Would’,
/\b(?:would|should)\b/gi,
http://crockford.com/wrrrld/style5.html#49’%5D,
];
var N = cm.length;
N = 48; // for some reason Windows Live Writer was counting wrong so I had to manually set this
function analyze_and_annotate_text(text) {
text = text.replace(/\n/g, ‘
‘);
var out = document.getElementById(‘output’);
for (var i = 0; i < N-1; i+=1) {
var name = cm[i][0],
regex = cm[i][1],
link = cm[i][2];
text = text.replace(regex, '$& [‘+name+’]’);
}
out.innerHTML = text;
}

In the box below, type or paste the text to style-check.

The text you entered above is reproduced below. Inserted after each potential misuse is an annotation pointing you to the relevant comment by Strunk.