Summary
###########################################################################
File: sentence.icn
Subject: Procedure to generate sentences in file
Author: Richard L. Goerwitz
Date: August 14, 1996
###########################################################################
This file is in the public domain.
###########################################################################
Version: 1.2
###########################################################################
sentence(f) - suspends sentences from file f
A lot of grammatical and stylistic analysis programs are predicated
on the notion of a sentence. For instance, some programs count the
number of words in each sentence. Other count the number and length
of clauses. Still others pedantically check for sentence-final par-
ticles and prepositions.
This procedure, sentence(), is supposed to be used as a filter for
ASCII text files, suspending everything that looks remotely like a
sentence in them.
###########################################################################
BUGS: Cannot correctly parse sentences with constructs like "R. L.
Goerwitz" in them. The algorithm can be much improved simply by
checking to see if the word after the period is in /usr/dict/words
or whatever your system dictionary file is. If it isn't, then it's
likely not to be the beginning of a sentence (this also is not in-
fallible, naturally).
###########################################################################
Requires: co-expressions
###########################################################################
Procedures:
read_line, sentence
This file is part of the (main) package.
Source code.
read_line(intext)
sentence(intext)
This page produced by UniDoc on 2021/04/15 @ 23:59:54.