1
0
forked from GitHub/gf-core

Construction: a repository of idiomatic constructions involving special lexical items. Started with some Phrasebook ones and implemented for Eng,Fin,Fre,Swe

This commit is contained in:
aarne
2013-12-06 15:44:45 +00:00
parent 4280c885dd
commit b9afa70236
5 changed files with 145 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
abstract Construction = Cat ** {
-- started by AR 6/12/2013. (c) Aarne Ranta under LGPL and BSD
-- This module is, in the spirit of construction grammar, "between syntax and lexicon".
-- So is the module Idiom, but the difference is that the constructions in Idiom
-- apply to categories in a general way (e.g. existentials) whereas here they
-- are typically about particular predicates such as "NP is hungry" which are found
-- to work differently in different languages. The purpose of this module is hence
-- not so much to widen the scope of string recognition, but to provide trees that
-- are abstract enough to yield correct translations.
-- The first examples are from the MOLTO Phrasebook
fun
hungry_VP : VP ; -- x is hungry / x a faim (Fre)
thirsty_VP : VP ; -- x is thirsty / x a soif (Fre)
has_age_VP : Card -> VP ; -- x is y years old / x a y ans (Fre)
have_name_Cl : NP -> NP -> Cl ; -- x's name is y / x s'appelle y (Fre)
married_Cl : NP -> NP -> Cl ; -- x is married to y / x on naimisissa y:n kanssa (Fin)
what_name_QCl : NP -> QCl ; -- what is x's name / wie heisst x (Ger)
how_old_QCl : NP -> QCl ; -- how old is x / quanti anni ha x (Ita)
how_far_QCl : NP -> QCl ; -- how far is x / quanto dista x (Ita)
-- some more things
weather_adjCl : AP -> Cl ; -- it is warm / il fait chaud (Fre)
is_right_VP : VP ; -- he is right / il a raison (Fre)
is_wrong_VP : VP ; -- he is wrong / han har fel (Swe)
n_units_AP : Card -> CN -> A -> AP ; -- x inches long
}

View File

@@ -0,0 +1,27 @@
--# -path=.:../abstract
concrete ConstructionEng of Construction = CatEng **
open SyntaxEng, ParadigmsEng, (L = LexiconEng), (E = ExtraEng), (G = GrammarEng), Prelude in {
lin
hungry_VP = mkVP (mkA "hungry") ;
thirsty_VP = mkVP (mkA "thirsty") ;
has_age_VP card = mkVP (mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> L.year_N))) L.old_A) ;
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) (lin NP y) ;
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) | mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "married") ;
what_name_QCl x = mkQCl (mkIComp whatSg_IP) (mkNP (E.GenNP x) L.name_N) ;
how_old_QCl x = mkQCl (E.ICompAP (mkAP L.old_A)) (lin NP x) ;
how_far_QCl x = mkQCl (E.IAdvAdv (ss "far")) (lin NP x) ;
-- some more things
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
is_right_VP = mkVP (ParadigmsEng.mkA "right") ;
is_wrong_VP = mkVP (ParadigmsEng.mkA "wrong") ;
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
}

View File

@@ -0,0 +1,27 @@
--# -path=alltenses:.:../abstract
concrete ConstructionFin of Construction = CatFin **
open SyntaxFin, ParadigmsFin, (L = LexiconFin), (E = ExtraFin), Prelude in {
lin
hungry_VP = mkVP have_V2 (mkNP (ParadigmsFin.mkN "nälkä")) ;
thirsty_VP = mkVP have_V2 (mkNP (ParadigmsFin.mkN "jano")) ;
has_age_VP card = mkVP (mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> L.year_N))) L.old_A) ;
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) (lin NP y) ;
married_Cl x y = mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (ParadigmsFin.mkAdv "naimisissa") ;
what_name_QCl x = mkQCl (mkIComp whatSg_IP) (mkNP (E.GenNP x) L.name_N) ;
how_old_QCl x = mkQCl (E.ICompAP (mkAP L.old_A)) (lin NP x) ;
how_far_QCl x = mkQCl (E.IAdvAdv L.far_Adv) (lin NP x) ;
-- some more things
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
is_right_VP = mkVP (ParadigmsFin.mkAdv "oikeassa") ;
is_wrong_VP = mkVP (ParadigmsFin.mkAdv "väärässä") ;
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
}

View File

@@ -0,0 +1,27 @@
--# -path=alltenses:.:../abstract
concrete ConstructionFre of Construction = CatFre **
open SyntaxFre, ParadigmsFre, (L = LexiconFre), (E = ExtraFre), Prelude in {
lin
hungry_VP = mkVP have_V2 (mkNP (ParadigmsFre.mkN "faim" feminine)) ;
thirsty_VP = mkVP have_V2 (mkNP (ParadigmsFre.mkN "soif" feminine)) ;
has_age_VP card = mkVP have_V2 (mkNP <lin Card card : Card> L.year_N) ;
have_name_Cl x y = mkCl x (mkV2 (reflV (mkV "appeler"))) y ;
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) | mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "marié") ;
what_name_QCl x = mkQCl how_IAdv (mkCl (lin NP x) (reflV (mkV "appeler"))) ;
how_old_QCl x = mkQCl (mkIP whichSg_IDet (mkN "âge" masculine)) (lin NP x) have_V2 ;
how_far_QCl x = mkQCl (mkIAdv dative (mkIP which_IDet (mkN "distance"))) x ;
-- some more things
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
is_right_VP = mkVP have_V2 (mkNP (mkN "raison")) ;
is_wrong_VP = mkVP have_V2 (mkNP (mkN "tort")) ;
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
}

View File

@@ -0,0 +1,27 @@
--# -path=.:../abstract
concrete ConstructionSwe of Construction = CatSwe **
open SyntaxSwe, ParadigmsSwe, (L = LexiconSwe), (E = ExtraSwe), (G = GrammarSwe), Prelude in {
lin
hungry_VP = mkVP (mkA "hungrig") ;
thirsty_VP = mkVP (mkA "törstig") ;
has_age_VP card = mkVP (lin AP (mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> L.year_N))) L.old_A)) ;
have_name_Cl x y = mkCl (mkNP (E.GenNP x) L.name_N) (lin NP y) ;
married_Cl x y = mkCl (lin NP x) L.married_A2 (lin NP y) | mkCl (mkNP and_Conj (lin NP x) (lin NP y)) (mkA "gift") ;
what_name_QCl x = mkQCl (mkIComp whatSg_IP) (mkNP (E.GenNP x) L.name_N) ;
how_old_QCl x = mkQCl (E.ICompAP (mkAP L.old_A)) (lin NP x) ;
how_far_QCl x = mkQCl (E.IAdvAdv L.far_Adv) (mkCl (mkVP (SyntaxSwe.mkAdv to_Prep (lin NP x)))) ;
-- some more things
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
is_right_VP = mkVP have_V2 (mkNP (ParadigmsSwe.mkN "rätt")) ;
is_wrong_VP = mkVP have_V2 (mkNP (ParadigmsSwe.mkN "fel")) ;
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) (lin A a) ;
}