Analyse the writing style, word use and readability of prose in Emacs.
Find a file
2020-02-11 04:38:51 +09:00
.gitignore add .gitignore file 2020-02-11 04:32:11 +09:00
Cask add Cask file to easy resolve dependencies, build etc 2020-02-11 04:31:42 +09:00
LICENSE Create LICENSE 2020-02-10 13:08:12 +11:00
README.org Is the intonation correct? 2020-02-09 08:31:39 +11:00
smog.el as eq returns boolean, if statement is unneeded 2020-02-11 04:38:51 +09: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 or smog-check-region on the selected region.

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 smog-command variable.

The 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 and/or M-x smog-check-region

Further