Browse Prior Art Database

Method to Determine the End of a Sentence

IP.com Disclosure Number: IPCOM000114172D
Original Publication Date: 1994-Nov-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 28K

Publishing Venue

IBM

Related People

Roden Jr, WJ: AUTHOR

Abstract

An algorithm is disclosed that determines if a mark (period, question mark, or exclamation mark) represents the end of a sentence. This is useful in writing programs that reflow text. If a mark is determined to be the end of a sentence, this algorithm will insert two blanks, otherwise, one blank will be inserted.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 100% of the total text.

Method to Determine the End of a Sentence

      An algorithm is disclosed that determines if a mark (period,
question mark, or exclamation mark) represents the end of a sentence.
This is useful in writing programs that reflow text.  If a mark is
determined to be the end of a sentence, this algorithm will insert
two blanks, otherwise, one blank will be inserted.

      The algorithm consists of two parts.  The first part keeps a
maximum of two existing blanks on a line if there are words before
and after the mark.  A word consists of characters delimited by
blanks.

      If the line ends with a mark, the initial letter of the word
preceding and following the mark are examined.  One blank is to be
inserted unless the preceding word begins with an lower case letter
and the following word begins with an upper case letter.  This is
explained in the following chart.