From bf0f5bcd9a7375c7e3bae66415369dd1371d6bb8 Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 24 Mar 2016 20:35:51 +0000 Subject: [PATCH] some fragments of adjectives and nouns in Slovenian --- lib/src/slovenian/AdjectiveSlv.gf | 13 +++++++++++++ lib/src/slovenian/CatSlv.gf | 16 ++++++++++++---- lib/src/slovenian/GrammarSlv.gf | 22 ++++++++++++++++++++++ lib/src/slovenian/LexiconSlv.gf | 11 +++++++++++ lib/src/slovenian/NounSlv.gf | 11 +++++++++++ 5 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 lib/src/slovenian/AdjectiveSlv.gf create mode 100644 lib/src/slovenian/GrammarSlv.gf create mode 100644 lib/src/slovenian/LexiconSlv.gf create mode 100644 lib/src/slovenian/NounSlv.gf diff --git a/lib/src/slovenian/AdjectiveSlv.gf b/lib/src/slovenian/AdjectiveSlv.gf new file mode 100644 index 000000000..34060deb1 --- /dev/null +++ b/lib/src/slovenian/AdjectiveSlv.gf @@ -0,0 +1,13 @@ +concrete AdjectiveSlv of Adjective = CatSlv ** open ResSlv in { + + lin + PositA a = { + s = \\spec,g,c,n => + case of { + => a.s ! APositDefNom ; + => a.s ! APositDefAcc ; + _ => a.s ! APosit g n c + } + } ; + +} diff --git a/lib/src/slovenian/CatSlv.gf b/lib/src/slovenian/CatSlv.gf index c301d1bfa..c99f3b02c 100644 --- a/lib/src/slovenian/CatSlv.gf +++ b/lib/src/slovenian/CatSlv.gf @@ -1,13 +1,21 @@ concrete CatSlv of Cat = open ResSlv in { lincat + -- Adjective + AP = {s : Species => Gender => Case => Number => Str} ; + + -- Noun + CN = {s : Species => Case => Number => Str; g : Gender} ; + + -- Structural Prep = {s : Str; c : Case} ; + -- Open lexical classes, e.g. Lexicon + V = {s : VForm => Str}; + + A = {s : AForm => Str}; + N = {s : Case => Number => Str; g : Gender}; PN = {s : Case => Number => Str; g : Gender}; - A = {s : AForm => Str}; - - V = {s : VForm => Str}; - } diff --git a/lib/src/slovenian/GrammarSlv.gf b/lib/src/slovenian/GrammarSlv.gf new file mode 100644 index 000000000..627193678 --- /dev/null +++ b/lib/src/slovenian/GrammarSlv.gf @@ -0,0 +1,22 @@ +--# -path=.:../abstract:../common:prelude + +concrete GrammarSlv of Grammar = + NounSlv, +-- VerbEng, + AdjectiveSlv +{- AdverbEng, + NumeralEng, + SentenceEng, + QuestionEng, + RelativeEng, + ConjunctionEng, + PhraseEng, + TextX - [Pol,PPos,PNeg], + StructuralEng, + IdiomEng, + TenseX -} + ** { + +flags startcat = Phr ; unlexer = text ; lexer = text ; + +} ; diff --git a/lib/src/slovenian/LexiconSlv.gf b/lib/src/slovenian/LexiconSlv.gf new file mode 100644 index 000000000..4fc826424 --- /dev/null +++ b/lib/src/slovenian/LexiconSlv.gf @@ -0,0 +1,11 @@ +concrete LexiconSlv of Lexicon = CatSlv ** + open ParadigmsSlv, Prelude in { + +flags + optimize=values ; + +lin + apple_N = mkN "jabolko" "jabolka" "jabolku" "jabolko" "jabolku" "jabolkom" "jabolki" "jabolk" "jabolkoma" "jabolki" "jabolkih" "jabolkoma" "jabolka" "jabolk" "jabolkom" "jabolka" "jabolkih" "jabolki" neuter ; + red_A = mkA "rdeč" "rdeči" "rdečega" "rdečemu" "rdečega" "rdeč" "rdeči" "rdečem" "rdečim" "rdeča" "rdečih" "rdečima" "rdeča" "rdečih" "rdečima" "rdeči" "rdečih" "rdečim" "rdeče" "rdečih" "rdečimi" "rdeča" "rdeče" "rdeči" "rdečo" "rdeči" "rdečo" "rdeči" "rdečih" "rdečima" "rdeči" "rdečih" "rdečima" "rdeče" "rdečih" "rdečim" "rdeče" "rdečih" "rdečimi" "rdeče" "rdečega" "rdečemu" "rdeče" "rdečem" "rdečim" "rdeči" "rdečih" "rdečima" "rdeči" "rdečih" "rdečima" "rdeča" "rdečih" "rdečim" "rdeča" "rdečih" "rdečimi" nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist nonExist ; + +} ; diff --git a/lib/src/slovenian/NounSlv.gf b/lib/src/slovenian/NounSlv.gf new file mode 100644 index 000000000..5e13fa425 --- /dev/null +++ b/lib/src/slovenian/NounSlv.gf @@ -0,0 +1,11 @@ +concrete NounSlv of Noun = CatSlv ** open ResSlv in { + + lin + UseN n = {s = \\_ => n.s; g = n.g} ; + + AdjCN ap cn = { + s = \\spec,c,n => ap.s ! spec ! cn.g ! c ! n ++ cn.s ! Indef ! c ! n ; + g = cn.g + } ; + +}