diff --git a/prelude/Predef.gf b/prelude/Predef.gf index 866ce5b6a..961e99eb3 100644 --- a/prelude/Predef.gf +++ b/prelude/Predef.gf @@ -22,6 +22,7 @@ resource Predef = { oper occur : Tok -> Tok -> PBool = variants {} ; -- test if occurs as substring oper show : (P : Type) -> P -> Tok = variants {} ; -- convert param to string oper read : (P : Type) -> Tok -> P = variants {} ; -- convert string to param + oper toStr : (P : Type) -> P -> Str = variants {} ; -- find the "first" string } ; diff --git a/resource/abstract/Lang.gf b/resource/abstract/Lang.gf index 06ec5c624..efebecea5 100644 --- a/resource/abstract/Lang.gf +++ b/resource/abstract/Lang.gf @@ -1,3 +1,5 @@ +--# -path=.:../../prelude + abstract Lang = Rules, Clause, diff --git a/resource/abstract/Resource.gf b/resource/abstract/Resource.gf index fd68f4393..60c4e7abd 100644 --- a/resource/abstract/Resource.gf +++ b/resource/abstract/Resource.gf @@ -1 +1 @@ -interface Resource = reuse AllResource ; \ No newline at end of file +abstract Resource = Rules, Clause, Structural ** {} ; diff --git a/resource/danish/MorphoDan.gf b/resource/danish/MorphoDan.gf index bc6c8884b..8338791bb 100644 --- a/resource/danish/MorphoDan.gf +++ b/resource/danish/MorphoDan.gf @@ -83,7 +83,10 @@ oper mkVoice : Voice -> Str -> Str = \v,s -> case v of { Act => s ; - Pass => s + "s" + Pass => s + case last s of { + "s" => "es" ; + _ => "s" + } } ; vHusk : Str -> Verbum = \husk -> diff --git a/resource/doc/Makefile b/resource/doc/Makefile index da5a7b33b..7caf2a716 100644 --- a/resource/doc/Makefile +++ b/resource/doc/Makefile @@ -1,4 +1,4 @@ -all: gfdoc htmls +all: gfdoc htmls gifs htmls: htmls gf-resource.html @@ -14,3 +14,18 @@ gfdoc: gfdoc ../swedish/ParadigmsSwe.gf ; mv ../swedish/ParadigmsSwe.html . gfdoc ../swedish/BasicSwe.gf ; mv ../swedish/BasicSwe.html . gfdoc ../english/ParadigmsEng.gf ; mv ../english/ParadigmsEng.html . + gfdoc ../english/VerbsEng.gf ; mv ../english/VerbsEng.html . + +gifs: lang scand low + +lang: + echo "pm -printer=graph | wf Lang.dot" | gf ../abstract/Lang.gf + dot -Tgif Lang.dot>Lang.gif + +low: + echo "pm -printer=graph | wf Low.dot" | gf ../english/RulesEng.gf + dot -Tgif Low.dot >Low.gif + +scand: + echo "pm -printer=graph | wf Scand.dot" | gf ../swedish/RulesSwe.gf + dot -Tgif Scand.dot >Scand.gif diff --git a/resource/doc/gf-resource.html b/resource/doc/gf-resource.html index d27e8aa83..41faf0a9e 100644 --- a/resource/doc/gf-resource.html +++ b/resource/doc/gf-resource.html @@ -36,6 +36,35 @@ All morphological paradigms Basic lexicon of structural, common, and irregular words + +
+ +Semantic coverage + +
+ +Usability as library for non-linguists + + + +
+ +Semantic correctness +
+ colourless green ideas sleep furiously + + the time is seventy past forty-two ++ +
+English verbs + +
+ Swedish
@@ -119,19 +152,97 @@ Language-dependent resources -
+ +Language learning: translation and morpho quiz + +
+ +Generate elementary text books from abstract syntax? + + + + +
+ concrete AppNor of App = open LangNor, ParadigmsNor in {...}
+
+No more dummy reuse modules and bulky .gfr files!
+
++ +If you need to convert resource category records to/from strings, use +
+ Predef.toStr : L -> Str ; + Predef.fromStr : Str -> L ; ++L must be a linearization type. + + + +
+ > p -cat=S -v "jag ska åka till Chalmers" + unknown tokens [TS "åka",TS "Chalmers"] + + > p -cat=S "jag ska gå till Danmark" + UseCl (PosTP TFuture ASimul) + (AdvCl (SPredV i_NP go_V) + (AdvPP (PrepNP to_Prep (UsePN (PNCountry Denmark))))) ++Extend vocabulary at need. +
+ åka_V = lexV "åker" ; + Chalmers = regPN "Chalmers" neutrum ; ++ +
+
+| Language | v0.6 | API | Paradigms | Basic lex | Verbs |
| Danish | X | ||||
| English | X | X | X | X | X |
| Finnish | X | ||||
| French | X | * | * | * | |
| German | X | * | |||
| Italian | X | * | * | * | |
| Norwegian | X | ||||
| Russian | X | * | * | ||
| Spanish | * | * | |||
| Swedish | X | X | X | X | * |