https://github.com/zzkt/smog
Analyse the writing style, word use and readability of prose in Emacs.
https://github.com/zzkt/smog
automated-readability-index automated-readability-scores coleman-liau emacs flesch-kincaid fog-index gunning-fog language prose readability readability-metrics smog smog-grading style writing-analytics
Last synced: 10 months ago
JSON representation
Analyse the writing style, word use and readability of prose in Emacs.
- Host: GitHub
- URL: https://github.com/zzkt/smog
- Owner: zzkt
- License: gpl-3.0
- Created: 2020-02-05T22:08:37.000Z (about 6 years ago)
- Default Branch: endless
- Last Pushed: 2023-05-30T08:43:52.000Z (over 2 years ago)
- Last Synced: 2025-04-07T03:05:15.360Z (11 months ago)
- Topics: automated-readability-index, automated-readability-scores, coleman-liau, emacs, flesch-kincaid, fog-index, gunning-fog, language, prose, readability, readability-metrics, smog, smog-grading, style, writing-analytics
- Language: Emacs Lisp
- Size: 67.4 KB
- Stars: 28
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
** 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]]