1
0
forked from GitHub/gf-core

add API modules for Polish

This commit is contained in:
krasimir
2009-10-23 15:34:09 +00:00
parent 4f8e32cb5d
commit 4f6bd2f1d6
7 changed files with 80 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
--# -path=.:alltenses:prelude
resource CombinatorsPol = Combinators with
(Cat = CatPol),
(Structural = StructuralPol),
(Constructors = ConstructorsPol) ;

View File

@@ -0,0 +1,3 @@
--# -path=.:alltenses:prelude
resource ConstructorsPol = Constructors with (Grammar = GrammarPol) ;

5
lib/src/api/SyntaxPol.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:alltenses:prelude
instance SyntaxPol of Syntax =
ConstructorsPol, CatPol, StructuralPol, CombinatorsPol ;

12
lib/src/api/TryPol.gf Normal file
View File

@@ -0,0 +1,12 @@
--# -path=.:alltenses:prelude
resource TryPol = SyntaxPol, LexiconPol, ParadigmsPol - [mkAdv] **
open (P = ParadigmsPol) in {
oper
mkAdv = overload SyntaxPol {
mkAdv : Str -> Adv = P.mkAdv ;
} ;
}

5
lib/src/polish/AllPol.gf Normal file
View File

@@ -0,0 +1,5 @@
--# -path=.:../abstract:../common:prelude
concrete AllPol of AllPolAbs =
LangPol
** {} ;

View File

@@ -0,0 +1,5 @@
--# -path=.:../abstract:../common:prelude
abstract AllPolAbs =
Lang
** {} ;

View File

@@ -0,0 +1,44 @@
--# -path=.:../abstract:../common
concrete SymbolPol of Symbol = CatPol ** open Prelude, ResPol in {
{-
lin
SymbPN i = {s = addGenitiveS i.s ; g = Neutr} ;
IntPN i = {s = addGenitiveS i.s ; g = Neutr} ;
FloatPN i = {s = addGenitiveS i.s ; g = Neutr} ;
NumPN i = {s = i.s ; g = Neutr} ;
CNIntNP cn i = {
s = \\c => cn.s ! Sg ! Nom ++ (addGenitiveS i.s) ! c ;
a = agrgP3 Sg cn.g
} ;
CNSymbNP det cn xs = {
s = \\c => det.s ++ cn.s ! det.n ! Nom ++ (addGenitiveS xs.s) ! c ;
a = agrgP3 det.n cn.g
} ;
CNNumNP cn i = {
s = \\c => cn.s ! Sg ! Nom ++ i.s ! c ;
a = agrgP3 Sg cn.g
} ;
SymbS sy = sy ;
SymbNum sy = { s = addGenitiveS sy.s ; n = Pl ; hasCard = True } ;
SymbOrd sy = { s = \\c => sy.s ++ (regGenitiveS "th")!c} ;
lincat
Symb, [Symb] = SS ;
lin
MkSymb s = s ;
BaseSymb = infixSS "and" ;
ConsSymb = infixSS "," ;
oper
-- Note: this results in a space before 's, but there's
-- not mauch we can do about that.
addGenitiveS : Str -> Case => Str = \s ->
table { Gen => s ++ "'s"; _ => s } ;
-}
}