;    mmorph, MULTEXT morphology tool
;    Version 2.3, October 1995
;    Copyright (c) 1994,1995 ISSCO/SUISSETRA, Geneva, Switzerland

; This file shows various constructs possible in the declarations.
; It is also an small example to show how Grammar and Spelling interact
; for the morphology of French adjectives.
; It makes no claim as for the linguistic soundness of the approach :-)

; declaration of lexical and surface alphabet
@ Alphabets

lexical	: a b c d e f g h i j k l m n o p q r s t u v w x y z       
	   " " "\"" "." "," "?" "!"

surface	: a b c d e f g h i j k l m n o p q r s t u v w x y z        
	  " " "\"" "." "," "?" "!"

; Declarations of attribute with their possible values
@ Attributes
    gender : masculine feminine none
    number : singular plural none
    person : 1 2 3
    form : stem surface

; Declarations of category types with their associated attribute list
; the bar | separates the attributes to keep from those to throw away
@ Types
    Adjective : gender number | form
    Noun : gender number | form
    AdjSuffix : gender number
    NounSuffix : number

; Composition rules
@ Grammar

SurfaceA : Adjective[form=surface]


Plural : Adjective[ gender=$1 number=plural form=surface ]
	 <- Adjective[number=singular gender=$1]
	    AdjSuffix[number=plural]

s	:  "s" AdjSuffix[number=plural gender=none]


; make females out of males
Feminine : Adjective[ gender=feminine number=singular form=$A=surface|stem]
	    <- Adjective[gender=masculine number=singular form=$A]
	                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      