Skip to content
/ smog Public

Analyse the writing style, word use and readability of prose in Emacs.

License

Notifications You must be signed in to change notification settings

zzkt/smog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Style & readability

https://melpa.org/packages/smog-badge.svg

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

To install from source, download from http://ftp.gnu.org/gnu/diction/

Configure

The emacs 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

Further