Naive linter for English prose and a spell checker for developers who can't write good and wanna learn to do other stuff good too.
Important: Do not use this tool to be a jerk to other people about their writing.
using WriteSharp;
var writeSharp = new WriteSharp();
var suggestion = writeSharp.Check("Remarkably few developers write well.");
// suggestions:
//
// [{
// Reason = "Remarkably" can weaken meaning and is a weasel word,
// Index = 0,
// Offset = 10
//
// },{
// Reason = "few" is a weasel word,
// Index = 11,
// Offset = 3
// }]
WriteSharp.Checks
takes an optional second argument that allows you to disable certain checks.
You can disable checking for passive voice like this:
using WriteSharp;
var writeSharp = new WriteSharp();
var suggestion = writeSharp.Check("So the cat was stolen.", new WriteSharpOptions() { PassiveVoice = false });
// suggestions: []
You can also pass WriteSharpOption in WriteSharp constructor, this will overwrite the default options.
using WriteSharp;
var writeSharpOptions = new WriteSharpOptions()
{
WeaselWords = false,
AdverbWhere = false
};
var writeSharp = new WriteSharp(writeSharpOptions);
var suggestion = writeSharp.Check("Remarkably few developers write well.");
// suggestions: []
You can use the WriteSharpOptions WhiteList
property to pass in a list of strings to whitelist from suggestions.
For example, normally only
would be picked up as a bad word to use, but you might want to exempt read-only
from that:
using WriteSharp;
var writeSharp = new WriteSharp();
var suggestion = writeSharp.Check("Never write read-only sentences.");
// suggestions:
//
// [{
// Reason = ""only" can weaken meaning",
// Index = 16,
// Offset = 4
//
// }]
var filtered = writeSharp.Check("Never write read-only sentences.",
new WriteSharpOptions() { WhiteList = { "read-only" } });
// filtered: []
You can use WriteSharp
as a command-line tool
ws "Remarkably few developers write well."
Reason = "Remarkably" can weaken meaning and is a weasel word, Index = 0, Offset = 10
Reason = "few" is a weasel word, Index = 11, Offset = 3
You can run just specific checks like this:
ws "Remarkably few developers write well." --checks=weasel,so
Or exclude checks like this:
ws "Remarkably few developers write well." --no-checks=weasel,so
You can disable or enable any combination of the following checks
Checks for passive voice.
Checks for duplicates – cases where a word is repeated.
Checks for so
at the beginning of the sentence.
Checks for there is
or there are
at the beginning of the sentence.
Checks for "weasel words."
Checks for adverbs that can weaken meaning: really, very, extremely, etc.
Checks for wordy phrases and unnecessary words.
Checks for common cliches.
Checks for "to-be" verbs. Disabled by default
- Elements of Style
- Flesch–Kincaid readability
- Fear and Loathing of the English passive
- Words to Avoid in Educational Writing
MIT