head	1.2;
access;
symbols
	4-4-6:1.2
	4-4-5:1.2
	4-4-4:1.2
	4-4-3:1.2
	4-4-2:1.2
	4-4-1:1.2
	4-4-0:1.2;
locks; strict;
comment	@# Test old-fashioned format of tags.@;


1.2
date	2002.10.06.03.23.17;	author esr;	state Exp;
branches;
next	1.1;

1.1
date	2002.10.06.03.15.18;	author esr;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Switch to DocBook XML.
@
text
@# Calculate old-text percentage

# Where to find the text
files=jargon.xml

# These are the relevant sizes for Edition One.  These are computed
# from `oldstuff', which is Steele-1983 with some unused entries and
# front matter and the thumbnail bios stripped out.
#
oldwds=28919	# 31433
oldents=239

#
# First, get total wordage of TNHD ms
#
# This used to be done from the two texinfo masters rather than the
# generated ASCII, otherwise we'd lose the intros and credit list and
# some other TeX-only material.  Had the side effect that some of the
# markup constructs and comments are counted as extra words, but
# that's fair because we count the Scribe markup in the relevant
# text of Steele-1983 in its wordage.
#
# Now that the masters are in XML-DocBook, we just look at the masters.
# These include all the book material.  The word count is inflated a bit by
# the online-only section, but on the other hand XML markup will generate
# a lot fewer spurious word tokens than the TeX did (no more @@p{}!), 
# so this is probably fair.
#
set - `cat $files | tr '~{}' '[ *]' | wc -w`
newwords=$1

# Next, get entry count of current version
#
# This is straightforward.  We just count lines that begin with a
# headword macro
#
set - `cat $files | egrep '^<glossentry>' | wc`
newentries=$1

# Old-book percentage

echo "New entries:      $newentries"
echo "New words:        $newwords"
bc <<EOT
scale=5
t=($oldwds/$newwords)
e=($oldents/$newentries)
c=(e + t) / 2 * .7
"Entry ratio:          "
e
"Text ratio:           "
t
"Old stuff:            "
c
"Guy Steele's share:       "
(c * .40)
"Don Woods's share:        "
(c * .20)
"Richard Frankel's share:  "
(c * .12)
"Mark Crispin's share:     "
(c * .10)
"Richard Stallman's share: "
(c * .10)
"Geoff Goodfellow's share: "
(c * .08)
EOT

exit
@


1.1
log
@Initial revision
@
text
@d3 3
a5 1
#
d16 1
a16 1
# This has to be done from the two texinfo masters rather than the
d18 1
a18 1
# some other TeX-only material.  Has the side effect that some of the
d23 7
a29 1
set - `cat jargon.tex jargonbook.tex lexicon?.tex contents.tex names.tex | tr '~{}' '[ *]' | wc -w`
d37 1
a37 1
set - `cat lexicon?.tex | egrep '^@@hdt*{' | wc`
@
