mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 01:22:51 -06:00
some fixes in Hindi and Finnish
This commit is contained in:
@@ -49,13 +49,14 @@ concrete CatHin of Cat = CommonX ** open ResHin, Prelude in {
|
||||
---- Noun
|
||||
--
|
||||
CN = ResHin.Noun ;
|
||||
NP, Pron = ResHin.NP ;
|
||||
-- Det = {s : Str ; n : Number} ;
|
||||
NP = ResHin.NP ;
|
||||
Pron = {s : PronCase => Str ; a : Agr} ;
|
||||
Det = {s : Gender => Case => Str ; n : Number} ;
|
||||
-- Predet, Ord = {s : Str} ;
|
||||
-- Num = {s : Str; n : Number ; hasCard : Bool} ;
|
||||
Num = {s : Str ; n : Number} ;
|
||||
-- Card = {s : Str; n : Number} ;
|
||||
-- Quant = {s : Number => Str} ;
|
||||
-- Art = {s : Bool => Number => Str} ;
|
||||
Quant = {s : Number => Gender => Case => Str} ;
|
||||
Art = {s : Str} ;
|
||||
--
|
||||
---- Numeral
|
||||
--
|
||||
|
||||
@@ -356,7 +356,7 @@ concrete LexiconHin of Lexicon = CatHin **
|
||||
-- rule_N = regN "rule" ;
|
||||
--
|
||||
---- added 4/6/2007
|
||||
-- john_PN = mkPN (mkN masculine (mkN "John")) ;
|
||||
john_PN = mkPN "jon" ;
|
||||
-- question_N = regN "question" ;
|
||||
-- ready_A = regA "ready" ;
|
||||
-- reason_N = regN "reason" ;
|
||||
|
||||
@@ -3,13 +3,13 @@ concrete NounHin of Noun = CatHin ** open ResHin, Prelude in {
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
-- DetCN det cn = {
|
||||
-- s = \\c => det.s ++ cn.s ! det.n ! c ;
|
||||
-- a = agrgP3 det.n cn.g
|
||||
-- } ;
|
||||
--
|
||||
DetCN det cn = {
|
||||
s = \\c => det.s ! cn.g ! npcase2case c ++ toNP (cn.s ! det.n) c ;
|
||||
a = agrP3 cn.g det.n
|
||||
} ;
|
||||
|
||||
UsePN pn = {s = \\c => toNP pn.s c ; a = agrP3 pn.g Sg} ;
|
||||
UsePron p = p ;
|
||||
UsePron p = {s = \\c => p.s ! np2pronCase c ; a = p.a} ;
|
||||
--
|
||||
-- PredetNP pred np = {
|
||||
-- s = \\c => pred.s ++ np.s ! c ;
|
||||
@@ -35,22 +35,22 @@ concrete NounHin of Noun = CatHin ** open ResHin, Prelude in {
|
||||
-- s = quant.s ! num.n ++ num.s ++ ord.s ;
|
||||
-- n = num.n
|
||||
-- } ;
|
||||
--
|
||||
-- DetQuant quant num = {
|
||||
-- s = quant.s ! num.n ++ num.s ;
|
||||
-- n = num.n
|
||||
-- } ;
|
||||
--
|
||||
|
||||
DetQuant quant num = {
|
||||
s = \\g,c => quant.s ! num.n ! g ! c ++ num.s ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
-- DetNP det = {
|
||||
-- s = \\c => det.s ; ---- case
|
||||
-- a = agrP3 det.n
|
||||
-- } ;
|
||||
--
|
||||
-- PossPron p = {s = \\_ => p.s ! Gen} ;
|
||||
--
|
||||
-- NumSg = {s = []; n = Sg ; hasCard = False} ;
|
||||
-- NumPl = {s = []; n = Pl ; hasCard = False} ;
|
||||
--
|
||||
PossPron p = {s = \\_,_,_ => p.s ! PPoss} ;
|
||||
|
||||
NumSg = {s = []; n = Sg} ;
|
||||
NumPl = {s = []; n = Pl} ;
|
||||
|
||||
-- NumCard n = n ** {hasCard = True} ;
|
||||
--
|
||||
-- NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
||||
|
||||
@@ -29,6 +29,11 @@ oper
|
||||
= \sd,so,sv,pd,po,pv,g -> mkNoun sd so sv pd po pv g ** {lock_N = <>} ;
|
||||
} ;
|
||||
|
||||
mkPN = overload {
|
||||
mkPN : Str -> PN = \s -> let n = regNoun s in {s = n.s ! Sg ; g = n.g ; lock_PN = <>} ;
|
||||
mkPN : N -> Gender -> PN = \n,g -> {s = n.s ! Sg ; g = g ; lock_PN = <>} ;
|
||||
} ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
mkA = overload {
|
||||
|
||||
@@ -144,17 +144,18 @@ resource ResHin = ParamX ** open Prelude in {
|
||||
} ;
|
||||
|
||||
param
|
||||
PronCase = PCase Case | PObj | PPoss ;
|
||||
PronCase = PC Case | PObj | PPoss ;
|
||||
oper
|
||||
personalPronoun : Person -> Number -> {s : PronCase => Str} = \p,n ->
|
||||
case <p,n> of {
|
||||
<P1,Sg> => {s = table PronCase ["mEN" ; "muJ" ; "muJe" ; "merA"]} ;
|
||||
<P1,Pl> => {s = table PronCase ["ham" ; "ham" ; "hameN" ; "hamArA"]} ;
|
||||
<P2,Sg> => {s = table PronCase ["tU" ; "tuJ" ; "tuJe" ; "terA"]} ;
|
||||
<P2,Pl> => {s = table PronCase ["tum" ; "tum" ; "tumheN" ; "tumhArA"]} ;
|
||||
<P3,Sg> => {s = table PronCase ["vah" ; "u-s" ; "u-se" ; "u-skA"]} ;
|
||||
<P3,Pl> => {s = table PronCase ["ve" ; "u-n" ; "u-nheN" ; "u-nkA"]}
|
||||
} ;
|
||||
<P1,Sg> => {s = table PronCase ["mEN" ; "muJ" ; "muJ" ; "muJe" ; "merA"]} ;
|
||||
<P1,Pl> => {s = table PronCase ["ham" ; "ham" ; "ham" ; "hameN" ; "hamArA"]} ;
|
||||
<P2,Sg> => {s = table PronCase ["tU" ; "tuJ" ; "tuJ" ; "tuJe" ; "terA"]} ;
|
||||
<P2,Pl> => {s = table PronCase ["tum" ; "tum" ; "tum" ; "tum" ; "tumhArA"]} ;
|
||||
<P3,Sg> => {s = table PronCase ["vah" ; "u-s" ; "u-s" ; "u-se" ; "u-skA"]} ;
|
||||
<P3,Pl> => {s = table PronCase ["ve" ; "u-n" ; "u-n" ; "u-nheN" ; "u-nkA"]}
|
||||
} ;
|
||||
---- the third is the vocative - is it really this way?
|
||||
|
||||
-- the Hindi verb phrase
|
||||
|
||||
@@ -187,6 +188,11 @@ resource ResHin = ParamX ** open Prelude in {
|
||||
VType = VIntrans | VTrans | VTransPost ;
|
||||
|
||||
oper
|
||||
objVType : VType -> NPCase = \vt -> case vt of {
|
||||
VTrans => NPObj ;
|
||||
_ => NPC Obl
|
||||
} ;
|
||||
|
||||
VPH : Type = {
|
||||
s : Bool => VPHForm => {fin, inf, neg : Str} ;
|
||||
obj : {s : Str ; a : Agr} ;
|
||||
@@ -238,14 +244,14 @@ resource ResHin = ParamX ** open Prelude in {
|
||||
|
||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
||||
s = vps.s ;
|
||||
obj = {s = vps.obj.s ++ np.s ! NPC Obl ++ vps.c2.s ; a = np.a} ;
|
||||
obj = {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a} ;
|
||||
subj = vps.c2.c ;
|
||||
comp = vps.comp
|
||||
} ;
|
||||
|
||||
param
|
||||
Agr = Ag Gender Number Person ;
|
||||
NPCase = NPC Case | NPErg ;
|
||||
NPCase = NPC Case | NPObj | NPErg ;
|
||||
|
||||
oper
|
||||
agrP3 : Gender -> Number -> Agr = \g,n -> Ag g n P3 ;
|
||||
@@ -254,23 +260,24 @@ resource ResHin = ParamX ** open Prelude in {
|
||||
|
||||
npcase2case : NPCase -> Case = \npc -> case npc of {
|
||||
NPC c => c ;
|
||||
NPObj => Obl ;
|
||||
NPErg => Obl
|
||||
} ;
|
||||
|
||||
np2pronCase : NPCase -> PronCase = \np -> case np of {
|
||||
NPC c => PC c ;
|
||||
NPObj => PObj ;
|
||||
NPErg => PC Obl
|
||||
} ;
|
||||
|
||||
toNP : (Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
||||
NPC c => pn ! c ;
|
||||
NPObj => pn ! Obl ;
|
||||
NPErg => pn ! Obl ++ "ne"
|
||||
} ;
|
||||
|
||||
NP : Type = {s : NPCase => Str ; a : Agr} ;
|
||||
|
||||
--- param
|
||||
--- PronCase = PCase Case | PObj | PPoss ;
|
||||
--- oper
|
||||
--- personalPronoun : Person -> Number -> {s : PronCase => Str} = \p,n ->
|
||||
|
||||
|
||||
|
||||
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
||||
s = \\vt,b =>
|
||||
let
|
||||
|
||||
@@ -42,7 +42,7 @@ concrete StructuralHin of Structural = CatHin **
|
||||
----- first_Ord = ss "first" ; DEPRECATED
|
||||
-- for_Prep = ss "for" ;
|
||||
-- from_Prep = ss "from" ;
|
||||
-- he_Pron = mkNP "he" "him" "his" Sg P3 Masc ;
|
||||
he_Pron = personalPronoun P3 Sg ** {a = Ag Masc Sg P3} ;
|
||||
-- here_Adv = ss "here" ;
|
||||
-- here7to_Adv = ss ["to here"] ;
|
||||
-- here7from_Adv = ss ["from here"] ;
|
||||
@@ -50,7 +50,7 @@ concrete StructuralHin of Structural = CatHin **
|
||||
-- how8many_IDet = mkDeterminer Pl ["how many"] ;
|
||||
-- if_Subj = ss "if" ;
|
||||
-- in8front_Prep = ss ["in front of"] ;
|
||||
-- i_Pron = mkNP "I" "me" "my" Sg P1 Masc ;
|
||||
i_Pron = personalPronoun P1 Sg ** {a = Ag Masc Sg P1} ;
|
||||
in_Prep = ss "meN" ;
|
||||
-- it_Pron = mkNP "it" "it" "its" Sg P3 Neutr ;
|
||||
-- less_CAdv = ss "less" ;
|
||||
@@ -101,7 +101,8 @@ concrete StructuralHin of Structural = CatHin **
|
||||
-- under_Prep = ss "under" ;
|
||||
-- very_AdA = ss "very" ;
|
||||
-- want_VV = P.mkVV (P.regV "want") ;
|
||||
-- we_Pron = mkNP "we" "us" "our" Pl P1 Masc ;
|
||||
we_Pron = personalPronoun P1 Pl ** {a = Ag Masc Pl P1} ;
|
||||
|
||||
-- whatPl_IP = mkIP "what" "what" "what's" Sg ;
|
||||
-- whatSg_IP = mkIP "what" "what" "what's" Sg ;
|
||||
-- when_IAdv = ss "when" ;
|
||||
|
||||
Reference in New Issue
Block a user