1
0
forked from GitHub/gf-core

Japanese added to RGL Make and synopsis

This commit is contained in:
aarne
2012-05-07 12:31:34 +00:00
parent 245a2b0007
commit ddf3a01c9b
12 changed files with 743 additions and 477 deletions

View File

@@ -28,6 +28,7 @@ exx: exx-script
gf -retain -s ../alltenses/TryGer.gfo <api-examples.gfs >api-examples-Ger.txt
gf -retain -s ../alltenses/TryHin.gfo <api-examples.gfs >api-examples-Hin.txt
gf -retain -s ../alltenses/TryIta.gfo <api-examples.gfs >api-examples-Ita.txt
gf -retain -s ../alltenses/TryJap.gfo <api-examples.gfs >api-examples-Jap.txt
gf -retain -s ../alltenses/TryLav.gfo <api-examples.gfs >api-examples-Lav.txt
gf -retain -s ../alltenses/TryNep.gfo <api-examples.gfs >api-examples-Nep.txt
gf -retain -s ../alltenses/TryNor.gfo <api-examples.gfs >api-examples-Nor.txt

View File

@@ -17,7 +17,7 @@ revealedLang = "Eng"
-- all languages shown
apiExxFiles = ["api-examples-" ++ lang ++ ".txt" | lang <- words
"Afr Bul Cat Dan Dut Eng Fin Fre Ger Hin Ita Lav Nep Nor Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd"]
"Afr Bul Cat Dan Dut Eng Fin Fre Ger Hin Ita Jap Lav Nep Nor Pes Pnb Pol Ron Rus Snd Spa Swe Tha Urd"]
main = do
xx <- getArgs
@@ -248,6 +248,7 @@ paradigmFiles = [
("Hindi", srcPath "/hindi/ParadigmsHin.gf"),
-- ("Interlingua", srcPath "/interlingua/ParadigmsIna.gf"),
("Italian", srcPath "/italian/ParadigmsIta.gf"),
("Japanese", srcPath "/japanese/ParadigmsJap.gf"),
("Latvian", srcPath "/latvian/ParadigmsLav.gf"),
("Nepali", srcPath "/nepali/ParadigmsNep.gf"),
("Norwegian", srcPath "/norwegian/ParadigmsNor.gf"),

File diff suppressed because it is too large Load Diff

View File

@@ -42,6 +42,7 @@ langsCoding = [
(("german", "Ger"),""),
(("interlingua","Ina"),""),
(("italian", "Ita"),"Romance"),
(("japanese", "Jap"),""),
(("latin", "Lat"),""),
(("latvian", "Lav"),""),
(("nepali", "Nep"),""),
@@ -71,7 +72,7 @@ langsLangAll = langs
langsLang = langs `except` langsIncomplete
-- languagues that have notpresent marked
langsPresent = langsLang `except` ["Nep","Pes","Snd","Tha"]
langsPresent = langsLang `except` ["Jap","Nep","Pes","Snd","Tha"]
-- languages for which Lang can be compiled but which are incomplete
langsIncomplete = ["Amh","Ara","Lat","Tur"]
@@ -80,7 +81,7 @@ langsIncomplete = ["Amh","Ara","Lat","Tur"]
langsAPI = langsLang `except` langsIncomplete
-- languages for which to compile Symbolic
langsSymbolic = langsLang `except` (langsIncomplete ++ ["Afr","Ina","Nep","Pnb","Rus", "Snd"])
langsSymbolic = langsLang `except` (langsIncomplete ++ ["Afr","Ina","Jap","Nep","Pnb","Rus", "Snd"])
-- languages for which to compile minimal Syntax
langsMinimal = langs `only` ["Ara","Eng","Bul","Rus"]

View File

@@ -0,0 +1,6 @@
--# -path=.:alltenses:prelude
resource CombinatorsJap = Combinators with
(Cat = CatJap),
(Structural = StructuralJap),
(Constructors = ConstructorsJap) ;

View File

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

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

@@ -0,0 +1,5 @@
--# -path=.:./alltenses
instance SyntaxJap of Syntax =
ConstructorsJap, CatJap, StructuralJap, CombinatorsJap ;

26
lib/src/api/TryJap.gf Normal file
View File

@@ -0,0 +1,26 @@
--# -path=.:alltenses:prelude
resource TryJap =
SyntaxJap - [mkAdN] ,
LexiconJap,
ParadigmsJap - [mkAdv,mkDet,mkIP,mkAdN,mkQuant] **
open (P = ParadigmsJap) in {
}
{-
oper
mkAdv = overload SyntaxJap {
mkAdv : Str -> Adv = P.mkAdv ;
} ;
mkAdN = overload {
mkAdN : CAdv -> AdN = SyntaxJap.mkAdN ;
--- mkAdN : Str -> AdN = P.mkAdN ;
} ;
-- mkOrd = overload SyntaxJap {
-- mkOrd : A -> Ord = SyntaxJap.OrdSuperl ;
-- } ;
-}

View File

@@ -0,0 +1,6 @@
--# -path=.:../abstract:../common:../prelude
concrete AllJap of AllJapAbs =
LangJap
-- ExtraJap
** {} ;

View File

@@ -0,0 +1,4 @@
abstract AllJapAbs =
Lang
-- ExtraJapAbs
** {} ;

View File

@@ -1,4 +1,4 @@
concrete LexiconJap of Lexicon = GrammarJap ** open ParadigmsJap, ResJap, Prelude in {
concrete LexiconJap of Lexicon = CatJap ** open ParadigmsJap, ResJap, Prelude in {
flags coding = utf8 ;

View File

@@ -0,0 +1,54 @@
--# -path=.:../abstract:../common
concrete SymbolJap of Symbol = CatJap ** open Prelude, ResJap in {
flags coding = utf8;
{-
lin
SymbPN i = {s = addGenitiveS i.s ; g = Masc ; t = NonLiving ; h = Pers3_L } ;
IntPN i = {s = addGenitiveS i.s ; g = Masc ; t = NonLiving ; h = Pers3_L } ;
FloatPN i = {s = addGenitiveS i.s ; g = Masc ; t = NonLiving ; h = Pers3_L } ;
NumPN i = {s = \\_ =>i.s ; g = Masc ; t = NonLiving ; h = Pers3_L } ;
CNIntNP cn i = {
s = \\c => cn.s ! Sg ! Nom ++ i.s ;
a = agrP3 cn.g Sg ;
t = NonLiving
} ;
CNSymbNP det cn xs = {
s = \\c => det.s!Sg!Masc ++ cn.s ! det.n ! Nom ++ xs.s ;
a = agrP3 cn.g det.n ;
t = NonLiving
} ;
CNNumNP cn i = {
s = \\c => cn.s ! Sg ! Nom ++ i.s ;
a = agrP3 cn.g Sg ;
t = NonLiving
} ;
SymbS sy = sy ;
SymbNum sy = { s = sy.s ; n = Pl } ;
SymbOrd sy = { s = sy.s ++ "ौँ" ; n = Pl} ;
lincat
Symb, [Symb] = SS ;
lin
MkSymb s = s ;
BaseSymb = infixSS "र" ;
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 {_ => Prelude.glue s "दा" } ;
-}
}