Tag Archives: grammar

style: Similar idea, different direction

Both diction and style are components in the same GNU package, and that’s a little surprising since they obviously do quite different things.

2014-09-17-6m47421-style

I fed style the same passage as I did diction, but rather than pluck out problematic words or phrases, style gives a technical and statistical analysis of the text. So no specific grammatical warnings, aside from a tally of how many conjunctions I used — oops, I mean, the writer used. 🙄

However, unless you’re familiar with those tests, the scores listed there are unlikely to mean anything to you. I’ll give you this as a starting link, and from there you can explore on your own. Each test has its own metric, and it may be that just word structure or even number of syllables can swing results in one direction or another.

Actual computation aside, style works in a very fast, very clean manner and presents its results in a useful table. Options-wise, style has flags for specific grammatical structures or voices, plus some triggers for sentence length or certain test results. If you want to screen out sentences more than 20 words long, for example, style is your tool.

So again, style is not so much a grammar checker as it is a writing analyzer, with the added ability to pop out lines that meet certain criteria. Kind of a like a grammar-grep, I guess.

I can’t necessarily endorse either diction or style as must-have tools if you do a lot of writing at the console, or even if you just do a lot of writing. They’re helpful, but might seem primitive compared with some conventional, contemporary applications. Keep them in mind though.

In the mean time, send me a link when you finish your text-based user interface grammar checker utility. The world awaits the arrival of your genius. 😉

Advertisements

diction: The words you choose and why

Earlier this month I pointed out a grammar checker utility that was, because of its age and its arrangement, omitted from this daily showcase of software. And I felt a little bad about that because as far as I can tell, it was the only grammar checker for a text-only environment that I’ve seen in 21 months.

There are two conclusions to be drawn from that: One, that relying on outside sources as a core component of your software might make it obsolete before its time. And two, if you’re a budding programmer looking to make your mark on the world, there’s a big open gap right around text-based grammar checkers.

If you want to take a step in that direction, take a gander at diction.

2014-09-17-6m47421-diction

In that example, I fed diction a short and cumbersome passage from some lunkhead-Linux-blogger-wannabe I found on the Internet. 😉 And if you look close, you can see where diction plucks out particular words and phrases, and gives you reminders — sometimes grammatical — on usage.

Not really a grammar checker, and not really a dictionary, which makes diction something in-between.

Points of note: diction is really just a filter for specific words and phrases, with cued responses inserted where appropriate. That’s important to remember, since rearranging or misspelling those key phrases is going to let diction pass right over them.

Furthermore, diction is hopeless at innuendo, double-entendre, turns of phrase or deliberate wordplay. If it’s not in the onboard repertoire, diction will either run right past it or flag it as some sort of unrelated error. So higher-order writing is susceptible to false positives.

The only other gripe I have is that the output is particularly dense. No color filtering, no line-by-line trapping, no formatting aside from the use of square brackets to set off comments from original text. So while I appreciate the effort diction goes through, the results are going to need some heavy adjustment before they will be readable.

All that being said, this is a step in the right direction for anyone who wants to do some text wrangling from the command line. diction sends its analysis straight back through STDOUT, so it’s a simple matter to pipe it into something else — like one of the million color filtering tools we’ve seen — and further adjust it.

Now let’s move to diction’s little brother. …

polygen: Good clean grammatical fun

It took me quite a while to get a handle on polygen, but when I finally did, it was worth it.

You see, polygen proves that there’s no written passage so complex that it can’t be broken down into a series of rules and random choices. Here’s a sample of its genius:

The metaphor reveals something deep of the human life. Illustrating
subject matter to the viewer is not artist primary concern; at the same
time the work represents the ultimate symbol of the cycle of life,
it takes more than just visual or acoustic reception to understand
the works, for they are synaesthetic, appealing simultaneously to the
visual, acoustic and physical perceptions of the viewer and captivating
in their precision. This art immerses viewers into the magic by which
paint transforms itself into things being described and back again;
the artist fills seemingly simple images with light and air to evoke a
sense of purity and serenity.

That’s just fantastic. Logical, coherent writing? Yes and no. It sure sounds good. But it was belched forth from the guts of my heartless Thinkpad.

Not just grammar either. Here’s a list of boy band names.

Boyzone
'V Silk
Pick Them
Sideroad Kids
Boyzone
Packstrict Boyz
Take Ten
'P Ten
Five to Nine
Bring Those
Pull It
The Fives

Perfectly believable to me. Here’s more wonderfulness:

We either should better map the development of Information-retrieval
tecnologies, or have to handle ADSL-based engines. We can better release
freeware systems for configuring the development of ambients. We neither
should release the design of hardware servers, nor need to maximize
virtual services in order to test loosely-coupled engines. We either
could better reintegrate the design of artificial intelligence portals,
or will be able to define peer-to-peer controls for implementing the
development of AI.

I think I’m in love. One day you’ll poke hopefully at the button that brings you to this site, and all you’ll find is the name of a console program, a link to a home page and a few lines like this:

Marvellous. Such a tool has long been awaited since Publisher XP
times. Won't disappoint you. ... The utility everybody was so long
expecting. Rather terrific. Do not miss it. The ultimate solution to
all problems. Completely perfect. Such a product hasn't been seen since
Photoshop 1.8a.

See? I told you blogging was an empty-headed waste of time! 😈

For the record, the best way I could get polygen working was to copy the .grm files out of /usr/share/polygen/ and hammer away at them, like this:

polygen -X 10 genius.grm

Output is to STDOUT, but you have the option to redirect it into a file. Sometimes polygen’s grammar rules include HTML formatting, which is either a blessing or a curse, depending on your motives.

Now if you’ll excuse me, I plan to “escape from home and retire in the sea of northern Mexico along with a dog.” Brilliant. 😈