mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
add API modules for Polish
This commit is contained in:
6
lib/src/api/CombinatorsPol.gf
Normal file
6
lib/src/api/CombinatorsPol.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsPol = Combinators with
|
||||
(Cat = CatPol),
|
||||
(Structural = StructuralPol),
|
||||
(Constructors = ConstructorsPol) ;
|
||||
3
lib/src/api/ConstructorsPol.gf
Normal file
3
lib/src/api/ConstructorsPol.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsPol = Constructors with (Grammar = GrammarPol) ;
|
||||
5
lib/src/api/SyntaxPol.gf
Normal file
5
lib/src/api/SyntaxPol.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxPol of Syntax =
|
||||
ConstructorsPol, CatPol, StructuralPol, CombinatorsPol ;
|
||||
|
||||
12
lib/src/api/TryPol.gf
Normal file
12
lib/src/api/TryPol.gf
Normal 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
5
lib/src/polish/AllPol.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
concrete AllPol of AllPolAbs =
|
||||
LangPol
|
||||
** {} ;
|
||||
5
lib/src/polish/AllPolAbs.gf
Normal file
5
lib/src/polish/AllPolAbs.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:../abstract:../common:prelude
|
||||
|
||||
abstract AllPolAbs =
|
||||
Lang
|
||||
** {} ;
|
||||
44
lib/src/polish/SymbolPol.gf
Normal file
44
lib/src/polish/SymbolPol.gf
Normal 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 } ;
|
||||
-}
|
||||
}
|
||||
Reference in New Issue
Block a user