Mr Speaker


Warning: count(): Parameter must be an array or an object that implements Countable in /home/mrspeak/public_html/wp-content/themes/stuartspeaker/functions.php on line 24

Warning: count(): Parameter must be an array or an object that implements Countable in /home/mrspeak/public_html/wp-content/themes/stuartspeaker/functions.php on line 27

Warning: count(): Parameter must be an array or an object that implements Countable in /home/mrspeak/public_html/wp-content/themes/stuartspeaker/functions.php on line 29

Syntax highlighting for writers

Ok, This was a "here's an old project I've abandoned" type post, but after some interest in the matter I'm re-opening this for questions... Syntax highlighting for writers: what do you think? Yay, or nay?

example of english-language syntax highlightingWhen you have a brilliant idea for a start-up, you mock up a prototype and show your intended audience. They'll be over the moon with excitement, and start paying for your service immediately. Word of mouth will grow, and before you know it you'll have a million users and you'll have so much money that you might become a tiny bit happier.

That's how it's supposed to go. Here's a project I started that fell down in the "prototype user-testing phase", documented here for prosperity. It's an english language syntax highlighter for writers of prose (and the sort). Here's the demo (select a colour-theme from the dropdown menu and imagine it's you typing, instead of robo-Jane Austin):

Syntax highlighting for writers

"What are those colours?" You might be wondering (especially if you didn't pay much attention to english class when you were a kid, as I didn't). Why, apparently those - those are "nouns", and "adjectives", and "verbs", and "pronouns" and such. Yes, finally the tedium of plain text is broken! Such joy it will bring to bored novellists everywhere. Had Jane Austin access to syntax highlighting, she would have written like, 10 books. No doubt!

The system works by performing a natural-language analysis on sentences as they are typed by the user. Words are marked up with their type and colourised accordingly.

At least, that was the idea. But I asked a handful of writers what they thought of it, and they all said it was bloody stupid. I unleashed a string of colourful adjectives at them, but they failed to change their opinion. Ah well.


Warning: count(): Parameter must be an array or an object that implements Countable in /home/mrspeak/public_html/wp-content/themes/stuartspeaker/functions.php on line 33

9 Comments

  1. I find this idea pretty damn cool, actually. And in certain contexts (editing / rewriting) it would probably be very useful to a lot of writers.

    Have you considered making it a WordPress plugin?

    Also, you might want to post this over on the Scrivener forums at http://literatureandlatte.com. Lot’s of writerly geeks over there.

    Saturday, March 24, 2012 at 7:52 am | Permalink
  2. I’m a developer and I think the idea is definitely pretty neat. It certainly needs to be explored.

    Saturday, March 24, 2012 at 8:04 am | Permalink
  3. Amazing, im a coder and writing enthusiast and love absolutely love this, a must have! :)

    Saturday, March 24, 2012 at 11:57 pm | Permalink
  4. Uncanny! The same day you posted this, I had also posted a blog saying I wished something like this existed: http://swizec.com/blog/i-wish-this-existed/swizec/4045

    As a writer and a coder I would really love something like this, especially when editing text, possibly less so when writing.

    Why didn’t your writers like it?

    Sunday, March 25, 2012 at 5:55 am | Permalink
  5. I was just looking the web for a software or plugin that would do that! I haven’t find it yet. I’m a computer science student, I would love to develop such a thing, if I just knew how to start….

    Tuesday, June 5, 2012 at 12:42 am | Permalink
  6. I think it would be useful if done right. V, N, Adj, etc is maybe a bit overkill, but if it showed you info like non-closed quotes, nested quotes (would have to adjust for the “missing” quotes in multi-paragraphed speeches), repeated phrases (so you don’t say stuff like “watery grave” too many times!), foreign or italicised text, then it would be a boon for writers. Also if your sentences ran on too long, they could start flashing or something…

    Maybe someone could make a plugin for Notepad++ or Geany?

    Wednesday, August 22, 2012 at 8:48 pm | Permalink
  7. Of all the grammar work I had to do in school, we never used different colors for different parts of speech. Even if that’s a thing that I want to see, that’s not the way I’ve ever seen it before. Looking at a colored sentence, I’m not sure how I’m supposed to gain any insight.

    But I’m not sure I even want that. 200 years ago, English capitalized all nouns. Today you’re lucky if people capitalize the start of their sentences. Indicating the part of speech just isn’t that important to people.

    OTOH, if a program could generate sentence diagrams for me (Reed-Kellogg style, not the weird vertical tree style that a lot of NLP people seem to do), and make them attractive and readable, that might be worth something. I spent many hours staring at those in school, so I wouldn’t have to learn anything new.

    Also consider: maybe writers aren’t your best target audience here. If I just wrote a sentence, why do I need a computer to help me read it? Features like this I would target to readers. What about people learning English? Mandarin and Russian and English share a basic word order, so maybe you could do something with piecemeal translation. Or try an experiment: for complex sentences, can a person read a diagrammed sentence faster than a linear one? I don’t know, but that would be exciting, if it were true!

    Friday, December 27, 2013 at 3:00 pm | Permalink
  8. If your willing to do a little DIY work, Notepad++ will probably work nicely. I know it’s made primarily for programming language coders, but there are options for user defined ‘language’ that you could exploit for just this reason.

    Notepad++ limits the tagging for user defined ‘languages’ to eight different groups but since in most circles there are considered eight different parts of sentences in the English language, that works out nicely.

    I’m going to try it out for myself and if I have enough energy and fortitude I’ll share my exported ‘language’ file with the public, but I wouldn’t suggest waiting on me as I make no promise.

    Wednesday, May 28, 2014 at 7:58 pm | Permalink
  9. I tried something similar with nano a while ago:

    http://owen.maresh.info/gettys.png

    I’d really like to have this in sublime text 3, and with subtle shifts as the parse tree for the current sentence object changes.

    Owen

    Wednesday, November 12, 2014 at 2:55 am | Permalink
Captcha! Please type 'radical' here: *
How did you find this thingo? *