Analyse the writing style, word use and readability of prose in Emacs.
Find a file
2020-02-06 12:42:38 +11:00
README.org Change ambiguities to specifics 2020-02-06 09:07:38 +11:00
smog.el Consider different fading systems 2020-02-06 12:42:38 +11:00

Style & readability

A simple way to analyse the writing style, word use and readability of prose in Emacs.

It can be used by calling smog-check-buffer

The analysis is produced via the command line tool style. It performs several readability tests on the text including; Flesch-Kincaid readability tests, Automated Readability Index (aka “ARI”), Coleman-Liau Index, Gunning fog index (aka "Fog Index"), and SMOG Index (aka "SMOG-Grading", “Simple Measure Of Gobbledygook“). It also summarises word usage and provides information about sentence and paragraph structure. The output is presented as a summary, so if you are looking for more specific, or continuous feedback on style and/or grammar then using flycheck with proselint might be more suitable.

Install

The textual analysis requires style to be installed. The tools style and diction are part of the GNU project and should be available for most unix-like systems.

To install on Debian

apt install diction

To install on macOS

brew install style

Configure

The package can be installed from MELPA or manually via github.

(use-package smog)

To configure language or output options, setq or customize the readability-command variable.

Tthe default language is set to en (English) and can be changed to de for German or nl for Dutch. Details for the various output options can be found via style -h or man style in your shell of choice.

(use-package smog
 :config (setq smog-command "style -L en"))

e.g. to analyse a text in German and show sentences longer than 23 words…

(use-package smog
 :config (setq smog-command "style -L de -l 23"))

Analyse surface detail

M-x smog-check-buffer

Further