Thread: Syntax Highlighting for English?

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    204

    Syntax Highlighting for English?

    Do think it would be easier to read it all nouns were blues, all verbs were red, all adjective green, articles, periods, commas, and question marks were bold, etc?? It might take some getting use to, but after that it might make an interesting cognitive experiment.

  2. #2
    Math wizard
    Join Date
    Dec 2006
    Location
    USA
    Posts
    582
    That's a rather bizarre suggestion. For a word-processing program, it may be okay when reading through a document to proofread it, but on the forums, there's practically no use for it.
    High elevation is the best elevation. The higher, the better the view!
    My computer: XP Pro SP3, 3.4 GHz i7-2600K CPU (OC'd to 4 GHz), 4 GB DDR3 RAM, X-Fi Platinum sound, GeForce 460, 1920x1440 resolution, 1250 GB HDD space, Visual C++ 2008 Express

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by thetinman View Post
    Do think it would be easier to read it all nouns were blues, all verbs were red, all adjective green, articles, periods, commas, and question marks were bold, etc?? It might take some getting use to, but after that it might make an interesting cognitive experiment.
    How would inserting distracting, redundant information make things easier? If anything I think it would make it harder to read. Or are you saying you have trouble identifying whether a word is a noun or a verb without some kind of hint?

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Highlighting a natural language (is that the right term?) such as English would not be like highlighting source code. When one reads English, one doesn't need highlighting to tell what is a verb and what isn't. We're so used to reading English that our brains don't need any clues or hints.

    Unlike syntax highlighting for source code, I think that syntax highlighting for English would only be useful if you were doing some sort of analysis of text, like counting the average number of verbs per sentence. For ordinary reading it would just be annoying, unless the colours only contrasted slightly (which sort of defeats the purpose).

    Another point: English is meant to be read in a linear fashion. When you read code your eye jumps around.

    Besides, it would be a rather massive undertaking. You'd need a dictionary, not just a simple set of rules like you need for highlighting programming languages.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    This is the worst idea in the history of the world.

  6. #6
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by Govtcheez View Post
    This is the worst idea in the history of the world.
    1.


    >Besides, it would be a rather massive undertaking.

    Actually, part-of-speech tagging (POS Tagging) is a pretty common task in many areas of natural language processing. There are many freely available POS taggers.

  7. #7
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by dwks View Post
    Besides, it would be a rather massive undertaking. You'd need a dictionary, not just a simple set of rules like you need for highlighting programming languages.
    It would require a bit more than just a dictionary. Take this very good example, almost identical to the title of a well-known book:

    "He eats shoots and leaves."

    Is the word "shoots" a verb or a noun in this sentence? It could refer to shoots as in, "bamboo shoots," in which case it is a noun. Or it could refer to shoots as is "shooting a weapon." Without context, there is no way to determine which sense is meant. It rises above the level of grammar into semantics.

    I suppose you could argue that the presence of commas in certain places might make it unambiguous. But commas are not a part of natural English -- they are invented to make ambiguous written statements easier to parse. In spoken English there is no comma (although there is usually a brief pause where one would be).

    And what if you're parsing ungrammatical or imperfect English? The highlighting would be in contradiction to the intended meaning and only serve to confuse the reader.

    Kind of like code getting out of sync with comments, whenever you have redundant information there is a risk of it not being self-consistent. Better to have a single but potentially ambiguous source of information than risk introducing paradoxes.

  8. #8
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Quote Originally Posted by thetinman View Post
    Do think it would be easier to read it all nouns were blues, all verbs were red, all adjective green, articles, periods, commas, and question marks were bold, etc?? It might take some getting use to, but after that it might make an interesting cognitive experiment.
    Considering cboard's recent past, I can't tell if you're serious or simply a master of biting sarcasm. Good job on that.

  9. #9
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    I think it depends, we don't need it, therefore it would actually be an annoyance. But if someone where to grow up learning english that way, then they would become dependent on it and would have a hard time without it. Again, it's all about conditioning. Unique idea though.
    Last edited by Queatrix; 05-17-2007 at 05:56 AM.

  10. #10
    Registered User
    Join Date
    Aug 2005
    Posts
    204
    Quote Originally Posted by brewbuck View Post
    How would inserting distracting, redundant information make things easier? If anything I think it would make it harder to read. Or are you saying you have trouble identifying whether a word is a noun or a verb without some kind of hint?
    I think it would make reading it easier. I would suggest code as a good example. If many of the words had a color, I could determine what type of word it was with out looking at its letters.

  11. #11
    Registered User
    Join Date
    Aug 2005
    Posts
    204
    Quote Originally Posted by dwks View Post
    Highlighting a natural language (is that the right term?) such as English would not be like highlighting source code. When one reads English, one doesn't need highlighting to tell what is a verb and what isn't. We're so used to reading English that our brains don't need any clues or hints.
    I could say the very same thing about code.
    Another point: English is meant to be read in a linear fashion. When you read code your eye jumps around.

    Besides, it would be a rather massive undertaking. You'd need a dictionary, not just a simple set of rules like you need for highlighting programming languages.
    Actually my eyes often jump around when I read English., and often I find my self reading code in a somewhat linear fashion. I'm not quite sure that this is relevant though.

    It would not be that large an undertaking. Dictionary databases already exist, and the use of artificial intelligence could make some things easier.

  12. #12
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Quote Originally Posted by thetinman View Post
    I think it would make reading it easier. I would suggest code as a good example. If many of the words had a color, I could determine what type of word it was with out looking at its letters.
    Most people are able to determine the type of word it is by knowing the language they are reading.

    Besides, how the hell do you propose figuring out what the word actually is besides "looking at its letters"?

  13. #13
    Registered User
    Join Date
    Aug 2005
    Posts
    204
    Quote Originally Posted by Govtcheez View Post
    This is the worst idea in the history of the world.
    I'm surprised that the forum seems to have such an aversion to the idea.

  14. #14
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    Quote Originally Posted by thetinman View Post
    I'm surprised that the forum seems to have such an aversion to the idea.
    It is a horrible, horrible idea that will be of no use to anyone and would require considerable programming to accomplish. It's not going to happen.

  15. #15
    Registered User
    Join Date
    Aug 2005
    Posts
    204
    Quote Originally Posted by brewbuck View Post
    It would require a bit more than just a dictionary. Take this very good example, almost identical to the title of a well-known book:

    "He eats shoots and leaves."

    Is the word "shoots" a verb or a noun in this sentence? It could refer to shoots as in, "bamboo shoots," in which case it is a noun. Or it could refer to shoots as is "shooting a weapon." Without context, there is no way to determine which sense is meant. It rises above the level of grammar into semantics.

    I suppose you could argue that the presence of commas in certain places might make it unambiguous. But commas are not a part of natural English -- they are invented to make ambiguous written statements easier to parse. In spoken English there is no comma (although there is usually a brief pause where one would be).

    And what if you're parsing ungrammatical or imperfect English? The highlighting would be in contradiction to the intended meaning and only serve to confuse the reader.

    Kind of like code getting out of sync with comments, whenever you have redundant information there is a risk of it not being self-consistent. Better to have a single but potentially ambiguous source of information than risk introducing paradoxes.
    I would say that commas are part of natural written English.

    If the english is ungrammatical or imperfect, then the system will not work as well. The same thing can be said about code. Another thing I could point out, is that each code editor has a different scheme for syntax highlighting. There is no standard highlighting scheme, yet one has little trouble reading code in an unfamiliar code editor.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 08:26 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Using VC Toolkit 2003
    By Noobwaker in forum Windows Programming
    Replies: 8
    Last Post: 03-13-2006, 07:33 AM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM