Smog
Analyse the writing style, word use and readability of prose in Emacs.
Install / Use
/learn @zzkt/SmogREADME
** Style & readability
[[https://melpa.org/#/smog][file: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 [[https://en.wikipedia.org/wiki/Readability][readability]] tests on the text including; [[https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests][Flesch-Kincaid readability tests]], [[https://en.wikipedia.org/wiki/Automated_readability_index][Automated Readability Index]] (aka “ARI”), [[https://en.wikipedia.org/wiki/Coleman%E2%80%93Liau_index][Coleman-Liau Index]], [[https://en.wikipedia.org/wiki/Gunning_fog_index][Gunning fog index]] (aka "Fog Index"), and [[https://en.wikipedia.org/wiki/SMOG][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 [[http://proselint.com/][proselint]] might be more suitable.
** Install
The textual analysis requires [[http://wiki.christophchamp.com/index.php?title=Style_and_Diction][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 #+BEGIN_SRC bash apt install diction #+END_SRC
To install on macOS #+BEGIN_SRC bash brew install style #+END_SRC
To install from source, download from http://ftp.gnu.org/gnu/diction/
** Configure
The emacs package can be installed from [[https://melpa.org/][MELPA]] or manually via [[https://github.com/zzkt/smog][github]].
#+BEGIN_SRC emacs-lisp (use-package smog) #+END_SRC
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.
#+BEGIN_SRC emacs-lisp (use-package smog :config (setq smog-command "style -L en")) #+END_SRC
e.g. to analyse a text in German and show sentences longer than 23 words…
#+BEGIN_SRC emacs-lisp (use-package smog :config (setq smog-command "style -L de -l 23")) #+END_SRC
** Analyse surface detail
=M-x smog-check=
** Further
- [[https://wiki.christophchamp.com/index.php?title=Style_and_Diction][style]] is written by Michael Haardt with contributions from Jason Petrone, Uschi Stegemeier and Hans Lodder
- [[https://files.eric.ed.gov/fulltext/ED506404.pdf][The Classic Readability Studies]]. William H.DuBay, Editor
- [[https://en.wikipedia.org/wiki/Asemic_writing][Asemic writing]]
Related Skills
feishu-drive
340.5k|
things-mac
340.5kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
340.5kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
postkit
PostgreSQL-native identity, configuration, metering, and job queues. SQL functions that work with any language or driver
