###############################################
# FILE: trend_words.pat
# SUBJ: Word-level trending.
# AUTH: AM
# CREATED: 02/Oct/00 12:57:18
# METHOD:	For every alphabetic in the text, add word to dict.
#			Then increment a counter for it.
#	10/08/00 AM. Putting in a STOP WORD LIST.
# Copyright 2000, Text Analysis International
###############################################

@PATH _ROOT _story

### Including generic business words in the "stop list".		# 10/09/00 AM.
### And other general words.
### In this way, they don't count against the current industry.
@POST
	++G("total alphas");
@RULES
_xNIL <- _xWILD [s one match=(
	finger fingers
	order orders ordering ordered
	wait waits waiting waited
	complain complains complaining complained
	pay pas paying paid
	amount amounts
	check checks checking checked
	customer customers
	client clients clientele
	staff
	clerk clerks
	employee employees employe employes
	checker checkers
	manager managers
	cashier cashiers
	service services
	place places placing placed
	mess messes
	sign signs
	behavior behaviors
	problem problems hassle hassles
	quality qualities
	woman women girl girls gal gals
	man men boy boys guys
	person persons teenager teenagers
	minute minutes
	hour hours
	clue clues
	look looks
	ruder ruder rudest
	slow slower slowest
	wrong wronger wrongest
	right righter rightest correct perfect
	nasty nastier nastiest
	mean meaner meanest
	hard harder hardest
	ill iller illest
	sick sicker sickest
	dirty dirtier dirtiest
	filthy filthier filthiest
	sticky stickier stickiest
	messy messier messiest
	poor poorer poorest
	bad worse worst
	lousy lousier lousiest
	yucky yuckier yuckiest
	ucky uckier uckiest
	blechy blechier blechiest
	blecchy blecchier blecchiest
	cruddy cruddier cruddiest
	crappy crappier crappiest
	small smaller smallest
	tiny tinier tiniest
	teeny teenier teeniest
	teensy teensier teensiest
	clueless
	incompetent
	braindead
	allergic sensitive averse intolerant
	I we me us he she they him her them you
	somehow only just
	extremely
	forever
	remotely
	really
	very
	ever
	so
	such
	too
	even
	thoroughly
	totally
	completely
	fully
	absolutely
	likewise similarly
	always
	sometimes
	still
	not
	never
	rarely
	)] @@

@POST
	# While we're here, COUNT THE ALPHABETICS IN THE TEXT.		# 10/08/00 AM.
	++G("total alphas");
@RULES
_xNIL <- _xWILD [s one matches=(
a
about
above
achieve
achieved
achieves
achieving
across
add
added
adding
adds
after
again
against
al
alike
all
almost
alone
along
alongside
already
also
although
always
am
amid
amidst
among
amongst
an
and
another
any
anyhow
anyway
anyways
apart
apiece
aplenty
apparently
apropos
are
aren
around
as
at
atop
attain
attained
attaining
attains
averse
avoid
awake
aware
away
b
back
bad
badly
barely
barring
base
based
bases
basing
basically
basis
be
because
became
become
becomes
becoming
been
before
began
begin
beginning
begins
behind
being
below
beneath
beside
besides
best
better
between
beyond
big
billion
both
bound
break
briefly
bring
but
by
c
call
can
cause
certain
certainly
chance
chances
change
changed
changes
changing
choose
clear
close
come
compare
compel
complain
complete
completely
concerning
conceivably
concentrate
concerning
consider
considerable
considering
continue
continued
continues
continuing
convince
cordially
could
create
created
creates
creating
criteria
criterion
cut
d
dare
date
day
decide
decidedly
decrease
decreased
decreases
decreasing
deeply
defer
define
definite
definitely
degree
delay
demand
demonstrate
deny
describe
despite
determine
did
direct
directly
disable
discover
do
does
doing
done
double
doubly
doubt
doubtless
down
dozen
due
during
e
each
earlier
earliest
early
easily
easy
eight
eighteen
either
eleven
else
elsewhere
empty
enable
end
enough
entire
entirely
equally
essence
essential
essentially
et
etc
even
evening
evenly
ever
every
everyone
everything
everywhere
exact
exactly
except
excepting
exist
existed
existing
exists
extreme
extremely
f
fast
faster
fastest
few
fewer
fewest
fifteen
find
finding
finds
first
five
follow
following
follows
for
forth
forward
found
four
fourteen
fourth
from
full
g
gave
get
gets
getting
give
go
goes
going
granted
grew
grow
growing
grows
h
had
hard
hardly
has
have
having
height
heights
her
here
hers
high
highly
him
his
how
i
if
important
importantly
in
include
included
includes
including
inclusive
increase
increased
increases
increasing
inside
into
is
it
its
j
just
k
knew
know
knowing
known
knows
l
large
largely
last
late
lately
later
latest
least
left
less
lesser
like
likewise
ll
look
looked
looking
looks
low
lowly
m
many
may
mid
might
milestone
milestones
mine
minus
more
most
much
my
n
near
need
needed
needing
needs
new
nine
nineteen
notwithstanding
now
number
o
of
off
old
on
one
onto
open
opposite
or
other
our
out
outside
outwith
over
p
past
pending
per
plus
put
q
r
re
remain
remained
remaining
remains
right
round
s
same
second
serving
set
seven
seventeen
shall
should
significant
similar
similarly
since
six
sixteen
size
sized
small
so
soon
start
strength
strengths
strong
stronger
strongest
strongly
such
sure
t
take
ten
than
that
the
their
theirs
them
then
there
these
they
third
thirteen
this
three
through
throughout
till
to
today
toward
towards
twelve
two
u
under
underneath
unlike
until
up
upon
us
use
v
via
w
want
wanted
wanting
wants
was
way
weak
weaker
weakest
weakly
week
weekly
well
went
were
what
when
where
while
who
why
will
with
within
without
wonder
wondered
wondering
wonders
would
x
y
year
years
you
your
z
face
facilitate
fail
faint
fairly
fall
fancy
far
farther
farthest
father
favor
favour
feed
feel
fever
few
fewer
fewest
fight
fill
finally
find
fine
finish
firm
first
foremost
fish
flatly
flee
fling
flounder
flu
fly
focus
following
foot
for
start
end
all
that
certain
example
instance
thing
one
sure
forbid
force
forget
forgive
formally
former
formula
formulae
forum
freeze
from
see
full
fully
fun
fundamentally
funds
further
furthest
galore
generally
get
give
place
given
go
good
goods
graciously
granted
great
greatly
greetings
grow
guarantee
guess
half
hand
happen
hardly
hate
have
got
he
head
hear
help
hence
her
here
hero
herself
hide
him
himself
his
hit
hold
holidays
home
honestly
how
however
humbly
hundred
hundredweight
hurt
ideally
identical
if
only
ignore
ill
imagine
immediately
imply
fact
actual
addition
brief
case
front
order
other
words
particular
reality
short
spite
inasmuch
incidentally
incite
include
included
including
inclusion
indeed
indefinite
indicate
induce
inside
insist
insofar
instead
intend
into
introduce
invite
it
its
itself
just
keep
kind
kindly
know
last
least
lastly
lately
later
latter
lead
leaf
lean
leap
learn
least
leave
lend
less
lest
let
alone
lie
light
like
listen
literally
little
live
long
look
upon
looks
lose
sight
track
louse
love
lovely
main
make
allowance
room
man
manage
manners
many
may
might
me
mean
means
medium
meet
mention
mere
merely
midnight
million
mind
mine
mini
minus
minutes
miss
mistake
more
morning
most
mother
mouse
mouth
move
mow
much
multi
must
my
myself
name
namely
natural
naturally
near
nearby
nearly
necessarily
need
needn
needs
neglect
neither
neo
never
next
nice
night
no
doubt
longer
matter
more
sooner
nominally
non
none
noon
nor
not
unnaturally
yet
notice
notify
notwithstanding
now
nowadays
nucleus
observe
oblige
obviously
odds
course
off
offer
officially
old
omit
on
condition
contrary
onto
top
once
one
only
onset
open
opposite
optional
or
so
order
other
otherwise
ought
oughtn
our
ourselves
out
outright
outside
outskirts
outwardly
outwith
over
overlook
owe
owing
pains
part
particular
particulars
partly
pass
passive
past
path
patois
pay
attention
pending
people
pending
per
perfect
perfectly
perhaps
period
permit
personal
personally
persuade
phenomenon
phenomena
place
plain
plan
plane
plead
please
plus
point
position
positive
possibly
postpone
practice
practise
precise
precisely
prefer
premises
prepare
presently
press
presuming
pretend
prevent
principal
principle
private
pro
process
proclaim
promise
propose
protect
prove
provide
provided
providing
pseudo
pull
punish
pure
purely
simply
put
end
stop
quit
quite
rarely
rather
than
read
readily
real
realistically
really
recently
recognize
recollect
recommend
refer
refuse
regard
regards
regret
regularly
rejoice
relative
relieve
rely
remain
remains
remark
remember
remind
rend
render
replace
report
reportedly
repute
reputedly
request
require
research
resent
reserve
resist
resolve
resort
respective
respectively
rest
result
riches
rid
ride
right
rightly
rigid
ring
rise
fall
rising
risk
rob
round
rule
run
with
same
save
saw
say
scarcely
school
sea
see
seeing
seek
seem
seldom
self
selfsame
sell
send
separate
separation
seriously
serve
set
several
sew
shake
shall
should
she
sheaf
shear
shed
sheer
shine
shoot
short
should
show
shrink
shun
shut
sick
signal
similar
similarly
simple
simply
since
sink
sit
slay
sleep
slide
sling
slink
slit
smell
smite
so
sole
solo
some
somehow
something
sooner
sort
sound
sow
space
spare
speak
specific
specify
speed
spell
spend
spill
spin
spirits
spit
split
spoil
spread
spring
stadium
stairs
stand
stare
start
state
steal
stem
stick
still
stimulus
sting
stink
stone
stop
stratum
stress
strew
strict
strictly
speaking
stride
strike
string
strive
strong
structure
structural
style
stylus
subject
such
summer
sunrise
sunset
super
superficial
superficially
supper
supply
suppose
supposedly
supposing
sure
surely
surround
surroundings
suspect
swear
sweat
sweep
swell
swim
swing
tag
take
talk
tantamount
taste
teach
tear
tell
tempo
tempt
tend
tense
test
than
thank
thanks
that
the
their
them
themselves
then
theoretically
there
these
they
thief
thine
think
this
thorough
thoroughly
those
thou
though
thousand
threaten
thrive
through
throughout
throw
thrust
thus
thy
thyself
till
time
to
together
ton
tone
too
total
totally
toward
towards
town
train
tread
treat
true
truly
truth
truthfully
try
turn
twice
twilight
ultimatum
ultra
uncle
under
underneath
understand
undertake
undoubtedly
uniue
unit
unless
unlike
until
unwell
up
upon
upper
urge
us
use
used
utter
utterly
very
via
vice
virtuoso
wait
wake
walk
want
warn
watch
we
weak
wear
wed
weep
well
were
wet
what
whatever
when
whenever
where
whereas
whereby
whereupon
wherever
whether
which
whichever
while
whilst


)] @@

@POST
	# Add word to dict, if absent.  Get its word-concept.
	G("word concept") = addword(N("$text"));

	# Get the counter from the word concept.
	# (If absent, automatically starts at zero.)
	G("frequency") = numval(G("word concept"), "frequency");
	
	# Increment counter and store back in word-concept.
	replaceval(G("word concept"), "frequency", ++G("frequency"));
	
	# While we're here, COUNT THE ALPHABETICS IN THE TEXT.		# 10/08/00 AM.
	++G("total alphas");
	++G("nonstop alphas");										# 10/08/00 AM.

	# noop();	# By default, no reduce occurs if there's code in @POST.
@RULES

_xNIL <-
	_xALPHA [s]	### 1
	@@
