[Corpora-List] context-DEPENDENT grammar simulator.
Mike Maxwell
maxwell at umiacs.umd.edu
Fri Apr 11 03:36:26 UTC 2008
(Rob and Torbjörn, perhaps we should take this off-line, before someone
blows the whistle on us... If anyone wants to join this discussion, let
us know)
Torbjörn Lager wrote:
> On Thu, Apr 10, 2008 at 6:27 PM, Rob Malouf <rmalouf at mail.sdsu.edu> wrote:
>>> Rob Malouf wrote:
> ...
>> I think it should be fairly easy to write an HPSG grammar for the
>> a^nb^nc^n language using subcat lists [notice the hedges... meaning I
>> haven't actually done it].
>
> I just did it, but in Definite Clause Grammar (DCG):
>
> s --> a(N), b(N), c(N).
>
> a(0) --> "".
> a(s(N)) --> [a], a(N).
>
> b(0) --> "".
> b(s(N)) --> [b], b(N).
>
> c(0) --> "".
> c(s(N)) --> [c], c(N).
Prolog used to be my favorite programming language, but I forget... I
presume that s(N) means "successor of N", i.e. the number that comes
after N (N >= 0; otherwise a 'cut' would be needed to prevent this from
going on infinitely, with N becoming negative, and no guarantee that the
a's, b's and c's would then be equal). If that's the right
interpretation, then this is taking advantage of the fact that Prolog
can do infinite arithmetic. But arithmetic cannot be defined in CFPSG,
AFAIK (beyond the trivial listing of a finite number of arithmetic
facts), so I don't think this counts as a counterexample to the claim
that HPSG cannot do strictly CSPSG (or possibly "mildly context
sensitive PSG").
> So that's a context sensitive _language_. I would hesitate to call the
> DCG a context sensitive _grammar_ though. As far as I remember, a
> context sensitive grammar has to have a particular form, with rules
> allowing more than one symbol on the left hand side.
That's how it's usually defined, but the unchanged symbols can be moved
over to an environment, giving you CSPSG rules that look much like
phonological rules. It's just a different notation. I suspect DCGs
have general cspsg capacity, since they can contain arbitrary Prolog
clauses.
--
Mike Maxwell
"We signify something too narrow when we say:
Man is a grammatical animal. For although there
is no animal except man with a knowledge of grammar,
yet not every man has a knowledge of grammar."
--Martianus Capella, "The Seven Liberal Arts"
_______________________________________________
Corpora mailing list
Corpora at uib.no
http://mailman.uib.no/listinfo/corpora
More information about the Corpora
mailing list