mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-23 18:02:54 -06:00
Japanese added to RGL Make and synopsis
This commit is contained in:
@@ -28,6 +28,7 @@ exx: exx-script
|
|||||||
gf -retain -s ../alltenses/TryGer.gfo <api-examples.gfs >api-examples-Ger.txt
|
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/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/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/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/TryNep.gfo <api-examples.gfs >api-examples-Nep.txt
|
||||||
gf -retain -s ../alltenses/TryNor.gfo <api-examples.gfs >api-examples-Nor.txt
|
gf -retain -s ../alltenses/TryNor.gfo <api-examples.gfs >api-examples-Nor.txt
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ revealedLang = "Eng"
|
|||||||
|
|
||||||
-- all languages shown
|
-- all languages shown
|
||||||
apiExxFiles = ["api-examples-" ++ lang ++ ".txt" | lang <- words
|
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
|
main = do
|
||||||
xx <- getArgs
|
xx <- getArgs
|
||||||
@@ -248,6 +248,7 @@ paradigmFiles = [
|
|||||||
("Hindi", srcPath "/hindi/ParadigmsHin.gf"),
|
("Hindi", srcPath "/hindi/ParadigmsHin.gf"),
|
||||||
-- ("Interlingua", srcPath "/interlingua/ParadigmsIna.gf"),
|
-- ("Interlingua", srcPath "/interlingua/ParadigmsIna.gf"),
|
||||||
("Italian", srcPath "/italian/ParadigmsIta.gf"),
|
("Italian", srcPath "/italian/ParadigmsIta.gf"),
|
||||||
|
("Japanese", srcPath "/japanese/ParadigmsJap.gf"),
|
||||||
("Latvian", srcPath "/latvian/ParadigmsLav.gf"),
|
("Latvian", srcPath "/latvian/ParadigmsLav.gf"),
|
||||||
("Nepali", srcPath "/nepali/ParadigmsNep.gf"),
|
("Nepali", srcPath "/nepali/ParadigmsNep.gf"),
|
||||||
("Norwegian", srcPath "/norwegian/ParadigmsNor.gf"),
|
("Norwegian", srcPath "/norwegian/ParadigmsNor.gf"),
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -42,6 +42,7 @@ langsCoding = [
|
|||||||
(("german", "Ger"),""),
|
(("german", "Ger"),""),
|
||||||
(("interlingua","Ina"),""),
|
(("interlingua","Ina"),""),
|
||||||
(("italian", "Ita"),"Romance"),
|
(("italian", "Ita"),"Romance"),
|
||||||
|
(("japanese", "Jap"),""),
|
||||||
(("latin", "Lat"),""),
|
(("latin", "Lat"),""),
|
||||||
(("latvian", "Lav"),""),
|
(("latvian", "Lav"),""),
|
||||||
(("nepali", "Nep"),""),
|
(("nepali", "Nep"),""),
|
||||||
@@ -71,7 +72,7 @@ langsLangAll = langs
|
|||||||
langsLang = langs `except` langsIncomplete
|
langsLang = langs `except` langsIncomplete
|
||||||
|
|
||||||
-- languagues that have notpresent marked
|
-- 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
|
-- languages for which Lang can be compiled but which are incomplete
|
||||||
langsIncomplete = ["Amh","Ara","Lat","Tur"]
|
langsIncomplete = ["Amh","Ara","Lat","Tur"]
|
||||||
@@ -80,7 +81,7 @@ langsIncomplete = ["Amh","Ara","Lat","Tur"]
|
|||||||
langsAPI = langsLang `except` langsIncomplete
|
langsAPI = langsLang `except` langsIncomplete
|
||||||
|
|
||||||
-- languages for which to compile Symbolic
|
-- 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
|
-- languages for which to compile minimal Syntax
|
||||||
langsMinimal = langs `only` ["Ara","Eng","Bul","Rus"]
|
langsMinimal = langs `only` ["Ara","Eng","Bul","Rus"]
|
||||||
|
|||||||
6
lib/src/api/CombinatorsJap.gf
Normal file
6
lib/src/api/CombinatorsJap.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:alltenses:prelude
|
||||||
|
|
||||||
|
resource CombinatorsJap = Combinators with
|
||||||
|
(Cat = CatJap),
|
||||||
|
(Structural = StructuralJap),
|
||||||
|
(Constructors = ConstructorsJap) ;
|
||||||
3
lib/src/api/ConstructorsJap.gf
Normal file
3
lib/src/api/ConstructorsJap.gf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
--# -path=.:alltenses:prelude
|
||||||
|
|
||||||
|
resource ConstructorsJap = Constructors with (Grammar = GrammarJap) ;
|
||||||
5
lib/src/api/SyntaxJap.gf
Normal file
5
lib/src/api/SyntaxJap.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
--# -path=.:./alltenses
|
||||||
|
|
||||||
|
instance SyntaxJap of Syntax =
|
||||||
|
ConstructorsJap, CatJap, StructuralJap, CombinatorsJap ;
|
||||||
|
|
||||||
26
lib/src/api/TryJap.gf
Normal file
26
lib/src/api/TryJap.gf
Normal 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 ;
|
||||||
|
-- } ;
|
||||||
|
|
||||||
|
|
||||||
|
-}
|
||||||
6
lib/src/japanese/AllJap.gf
Normal file
6
lib/src/japanese/AllJap.gf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--# -path=.:../abstract:../common:../prelude
|
||||||
|
|
||||||
|
concrete AllJap of AllJapAbs =
|
||||||
|
LangJap
|
||||||
|
-- ExtraJap
|
||||||
|
** {} ;
|
||||||
4
lib/src/japanese/AllJapAbs.gf
Normal file
4
lib/src/japanese/AllJapAbs.gf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
abstract AllJapAbs =
|
||||||
|
Lang
|
||||||
|
-- ExtraJapAbs
|
||||||
|
** {} ;
|
||||||
@@ -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 ;
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
|||||||
54
lib/src/japanese/SymbolJap.gf
Normal file
54
lib/src/japanese/SymbolJap.gf
Normal 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 "दा" } ;
|
||||||
|
-}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user