SB> Jack wrote:
>> I want to know the topical NOUN of the sentence. Not nouns that
>> happen to supplement elsewhere in the sentence. In "fruit flies
>> like a banana" - the key or topical noun is 'fruit' NOT banana
>> yet both are nouns...just 1 example.
SB> This is an example which points out how difficult the task
SB> is. "Fruit" is NOT the topic of the sentence. "flies"
SB> is. "Fruit" tells us what type of flies like bananas.
Actually, the sentence can be read *correctly* in two incompatible ways.
You can read "Fruit flies" as the subject, and "like a banana" as the
predicate, or "Fruit" as the subject, and "flies like a banana" as the
predicate. Both readings are correct.
Structurally, it's identical to the former sentence in the statement:
"Time flies like an arrow." But because there is no such thing as a
"time fly," there's only one reading that makes sense.
Can we be sure of this? There is an important group of flies called
the ephemerata (includes crane flies). Who knows? Maybe some
entomologist with a perverse sense of humour labelled a new species of
ephemerata as the short time fly (the ephemerata live for about a day
as an adult, mate and die - they don't eat as adults - they're
ephemeral ...), and some other, longer lived species as a long time
fly. ;-) In a sense, one already did, albiet in another
language ... Or perhaps call a new species of fly 'time', so one can
refer to 'time' flying while you're having fun trying to catch it ...
heh, heh .... that's the sort of thing I'd do if I were lucky enough
to discover a new species of fly. one must try to inject a little fun
into work ...
In other words, you can't determine what the subject of the sentence is
without knowledge of the semantic content.
SB> If YOU cannot determine the subject of the sentence, how do you
SB> expect to write code that determines the subject of the
SB> sentence?
This is, at its heart, the fundamental question.
I do like the example provided because it is a simple, clear
illustration of the fact that natural language, unlike programming
languages, is multivocal. And one can have a bit of fun with it
too.
It is easy enough to find open source code that is useful for checking
spelling, but I wonder what it would take to put together a perl
script (perhaps using some of the lingua packages I installed today)
that classifies a statement in standard english as correct or
incorrect, and then proceeds to identify ambiguities related to a
given sentence having two or more legitimate readings (as determined
by syntax). I expect, though, that human intervention would be
required in all cases to determine which of several legitimate
readings is correct because one can not derive semantics from syntax
and as pointed out already one needs the semantics to determine which
reading of the sentence is correct (again the example provided shows
why syntax is insufficient to determine semantics).
Has anyone seen a perl script that can test a statement for
grammatical correctness, and multivocality?
Cheers,
Ted