18.02.2013 Views

GF Russian Resource Library

GF Russian Resource Library

GF Russian Resource Library

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Adjective : Type = {s : AdjForm => Str} ;<br />

A special type of adjectives just having positive forms (for semantic reasons) is<br />

useful, e.g. finski� (Finnish).<br />

AdjPhrase = Adjective ** {p : IsPostfixAdj} ;<br />

mkAdjPhrase : Adjective -> IsPostfixAdj -> AdjPhrase =<br />

\novuj ,p -> novuj ** {p = p} ;<br />

3.5 For Numeral<br />

Parameters and operations for cardinal numbers:<br />

param DForm = unit | teen | ten | hund ;<br />

param Place = attr | indep ;<br />

param Size = nom | sgg | plg ;<br />

oper mille : Size => Str = table {<br />

{nom} => "tys�qa" ;<br />

{sgg} => "tys�qi" ;<br />

=> "tys�q"} ;<br />

oper gg : Str -> Gender => Str = \s -> table {_ => s} ;<br />

3.6 Transformations between parameter types<br />

Extracting Number value from SubstForm (see subsection 3.2) value:<br />

oper<br />

numSF: SubstForm -> Number = \sf -> case sf of<br />

{<br />

SF Sg _ => Sg ;<br />

_ => Pl<br />

} ;<br />

Extracting Case value from SubstForm (see subsection 3.2) value:<br />

}<br />

caseSF: SubstForm -> Case = \sf -> case sf of<br />

{<br />

SF _ Nom => Nom ;<br />

SF _ Gen => Gen ;<br />

SF _ Dat => Dat ;<br />

SF _ Inst => Inst ;<br />

SF _ Acc => Acc ;<br />

SF _ Prepos => Prepos<br />

} ;<br />

4 Categories<br />

4.1 Abstract API<br />

The category system is central to the library in the sense that the other modules<br />

(Adjective, Adverb, Noun, Verb etc) communicate through it. This means that a<br />

e.g. a function using NPs in Verb need not know how NPs are constructed in Noun:<br />

15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!