[CWB] agreement checks

Gertrud Faasz gertrud.faasz at up.ac.za
Tue May 27 12:41:46 CEST 2008


Dear all,
just a short question on the cwb macro language:

The Southern Bantu language Sepedi makes use of noun classes, and we 
mark these classes in making them a part of a positional attribute 
(usually part of speech)  by a number, so a noun of class 1 is called 
N01, etc (no separate feature set attribute is encoded).

In order to identify e.g. a noun phrase correctly, these numbers have to 
be compared first, e.g.

Monna/N01     yo/CDEM01
noun                demonstrative concord
man                 this
-> this man.

I've been writing rather simple macros for a while now, and know how to 
read in a known value (using $0, $1, etc.), so firstly I thought I have 
to write a little perl looping one macro over all possible noun classes. 
However, it would be nicer if I could utlize something like the 
following macro (which does not work, the error is in the first line, as 
it seems)

MACRO np($0 =  "[0-9]" | "10" | "1[45]" )
               np_ = [pos = "N.$0] [pos="CDEM.$0];
               cat np_;

I did try the following as well, no luck:
MACRO np($0 =  "[0-9]" | $0 = "10" | $0 = "1[45]" )
..

If one of you knows any way to encode this macro, please help. THANKS in 
advance,
Gertrud



More information about the CWB mailing list