GNU diction Database

My database for GNU diction flags grammar, punctuation, and style problems in formal Standard American English and suggests replacements.


diction.txt ~450 KiB

Contents and Resources

The categories contain sentences, phrases, and words. Most lines don't have a suggested replacement. Lines that use = never reference another line outside their category. I usually sort items in this order.

  1. Foreign
  2. English Dialects
  3. Groups and Topics (jargon)
  4. English Mistakes
  5. English Suggestions

English Suggestions



English Mistakes

Unlike suggestions these are problems that should be fixed. Being vulgar or using slang is not wrong, but using two consecutive articles or putting an apostrophe in the wrong place is.



I add any dialect that is not Standard American English. The dialects can include alternative spellings, slang, mistakes, or anything else from that dialect.



Groups and Topics

Groups and Topics are the jargon used by them. This includes slang, idioms, different spellings, and vulgarities.



English is full of foreign words, but a familiar English equivaliant should be used before a foreign word. When words are borrowed from other languages their meaning changes. I used the meaning of the word in an English context not the original meaning in the foreign language.




Try this command if you know what you are doing and want to test the database immediately.

$ diction -nsf diction.txt example.txt | \
  fmt | more

Continue reading if you need further explanation.

Installing GNU diction

If you are using GNU/Linux, BSD, or another operating system with a software repository GNU diction is probably in there. If it isn't in your repository you can download and compile it. The GNU diction and style website has distributions of source code that include instructions how to compile it.

For Windows users there is GnuWin32 which has diction as an extra package. I don't use Windows so I have never tested it.

For OS X users you might be able to follow the instructions for any GNU command line tool installation. It uses homebrew, but the same as Windows I did not test OS X.

Using GNU diction

After installing diction the first thing to read is the manual. Use this command to see it.

$ man diction

With no options diction will print out lines with brackets around flagged words and phrases.

$ diction example.txt

Checking 20,000 Leagues Under the Sea with that command would print lines like this.

pg164.txt:72 For some time past vessels had been met by "an enormous thing," a long object, spindle-shaped, occasionally phosphorescent, and infinitely larger and more rapid in [its] movements [than] a whale.

The -s or --suggestions switch does what it sounds like and enables suggestions. In the database the suggestions are on the right side after a tab.

$ diction -s example.txt

The output now matches the database with the flagged words on the left and the suggestions on the right.

pg164.txt:72: For some time past vessels had been met by "an enormous thing," a long object, spindle-shaped, occasionally phosphorescent, and infinitely larger and more rapid in [its -> = "it is" or "its"?] movements [than -> (examine sentences containing "than" to insure that they are not missing words: I love my father more than my mother. I love my father more than my mother loves my father. I love my father more than I love my mother)] a whale.

Using My Database

My database is used with the -f switch in diction which selects a user database. Use the -n switch to disable the default database.

This command disables the default database and uses my database, enables suggestions, formats the text for reading, and views the results.

$ diction -nsf diction.txt example.txt | \
  fmt | more

The output would look like this.

pg164.txt:424: Besides," thought I, "all roads lead back to Europe; and the unicorn may be [amiable -> friendly (complex)] enough to hurry me towards the coast of France.

My database mostly flags things that could be changed, not things that must be changed. I make and use it to learn more about English, correct some types of mistakes, and to simplify writing I edit. I don't worry about rigid rules, but focus on what is familiar and simple.

Some suggestions have the wrong tense, plural, and participle. I made some entries point to a single one to save time in editing suggestions. Adjust the suggestion to fit the sentence.

Ignoring a Group

Using grep is one way to ignore output from a group. This example ignores output flagged as British dialect.

$ diction -nsf diction.txt example.txt | \
  grep -v "(British English)" | fmt | more

That command would ignore the default database, use my database, enable suggestions which shows groups, search for all output that does not contain (British English), format the text for reading, and view the results.

The database is licensed as WTFPL version 2.

File Format

GNU diction doesn't describe its format, but it is simple. It ignores case when the word in the dictionary is all lower case. An equals sign in the second column after the tab prints the text of that entry. The manual describes a switch for beginner mistakes, but I don't use that ability.

SPACE text to find TAB suggestions

letters at the end of a word TAB suggestions

SPACE text to find TAB = show text of this entry

letters at the end of a word TAB = show text of this entry

I formatted my suggested text with categories in parenthesis and comments in braces because GNU diction uses brackets for flagging text. This example line would print any word that ends with xor. If suggestions were on it would print everything after the tab. Every entry has a group to identify the problem, process the output with tools such as grep, and make the database easier to edit.

xor TAB {except for flexor, Luxor, and plexor}(Leet)

Made by Mr. Satterly
With help from Mrs. Satterly