From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.alt.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: a question of form Date: Thu, 28 Aug 2014 14:35:36 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <8f4fc25e-2039-429c-a5d5-97c450b87078@googlegroups.com> <64f1912b-1a7f-4478-bb47-0e5ed054c1d1@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1409254538 12355 69.95.181.76 (28 Aug 2014 19:35:38 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 28 Aug 2014 19:35:38 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: number.nntp.dca.giganews.com comp.lang.ada:188709 Date: 2014-08-28T14:35:36-05:00 List-Id: "Jeffrey Carter" wrote in message news:ltnsdb$jtn$2@dont-email.me... > On 08/28/2014 04:56 AM, G.B. wrote: >> >> What will be the most wanted (and least controversial) >> words for title case exception in English and other natural >> languages? >> >> (I'm collecting them for a patch of Ada mode for Emacs, >> which makes Good_and_Bad appear automatically.) > > In /The Elements of Grammar/ by Margaret Shertzer: > > "Capitalize all principal words (that is, nouns, pronouns, adjectives, > adverbs, > verbs, and first words) in titles" > > The rule I learned is: Capitalize the first and last word of a title; > capitalize > all other words except articles and short conjunctions and prepositions. > "Short" > is usually defined as less than 4 letters. That sounds about right. I just looked at the code for handling title case in the Janus/Ada pretty printer. It uses a "minimal perfect hash" for these words, and in general seems a heck of a lot more complicated than seems necessary for something that requires a maximum of 4 compares per test (all of the words in the list are 4 characters or less long). Anyway, here's the code that creates the list of words: Set_Small_Word ("a"); Set_Small_Word ("an"); Set_Small_Word ("and"); Set_Small_Word ("as"); Set_Small_Word ("at"); Set_Small_Word ("but"); Set_Small_Word ("by"); Set_Small_Word ("for"); Set_Small_Word ("from"); Set_Small_Word ("if"); Set_Small_Word ("in"); Set_Small_Word ("into"); Set_Small_Word ("nor"); Set_Small_Word ("of"); Set_Small_Word ("on"); Set_Small_Word ("onto"); Set_Small_Word ("or"); Set_Small_Word ("than"); Set_Small_Word ("the"); Set_Small_Word ("to"); Set_Small_Word ("with"); As far as a definitive list is concerned, I suspect that there always are going to be grey areas where the choice is not obvious. That's why we stuck to a minimal list. Randy.