mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 09:32:53 -06:00
Added Swe databaseCVS: ----------------------------------------------------------------------
This commit is contained in:
46
grammars/database/DatabaseSwe.gf
Normal file
46
grammars/database/DatabaseSwe.gf
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
--# -path=.:../newresource/abstract:../newresource/swedish:../prelude
|
||||||
|
|
||||||
|
--- This is actually the same set of definitions as in DatabaseEng. So
|
||||||
|
--- we could use an interface instead of ResourceSwe.
|
||||||
|
|
||||||
|
concrete DatabaseSwe of Database = open Prelude, ResourceSwe in {
|
||||||
|
|
||||||
|
flags lexer=text ; unlexer=text ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
Query = Phr ;
|
||||||
|
Subject = NP ;
|
||||||
|
Category = CN ;
|
||||||
|
Property = AP ;
|
||||||
|
Comparison = AdjDeg ;
|
||||||
|
Relation = Adj2 ;
|
||||||
|
Feature = Fun ;
|
||||||
|
Value = NP ;
|
||||||
|
Name = PN ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
WhichAre A B = QuestPhrase (IntVP (NounIPMany A) (PosVG (PredAP B))) ;
|
||||||
|
IsThere A = QuestPhrase (IsThereNP (IndefOneNP A)) ;
|
||||||
|
AreThere A = QuestPhrase (IsThereNP (IndefManyNP NoNum A)) ;
|
||||||
|
WhatIs val = QuestPhrase (IntVP WhatOne (PosVG (PredNP val))) ;
|
||||||
|
IsIt Q A = QuestPhrase (QuestVP Q (PosVG (PredAP A))) ;
|
||||||
|
|
||||||
|
MoreThan = ComparAdjP ;
|
||||||
|
TheMost = SuperlNP ;
|
||||||
|
Relatively C _ = PositAdjP C ;
|
||||||
|
|
||||||
|
RelatedTo = ComplAdj ;
|
||||||
|
|
||||||
|
FeatureOf f x = DefOneNP (AppFun f x) ;
|
||||||
|
ValueOf f x = DefOneNP (AppFun f (UsePN x)) ;
|
||||||
|
|
||||||
|
WithProperty A B = ModAdj B A ;
|
||||||
|
|
||||||
|
Individual = UsePN ;
|
||||||
|
|
||||||
|
AllN = DetNP (AllsDet NoNum) ;
|
||||||
|
MostN = DetNP MostsDet ;
|
||||||
|
EveryN = DetNP EveryDet ;
|
||||||
|
Any = DetNP (AnysDet NoNum) ;
|
||||||
|
|
||||||
|
} ;
|
||||||
30
grammars/database/RestaurantSwe.gf
Normal file
30
grammars/database/RestaurantSwe.gf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
--# -path=.:../newresource/abstract:../newresource/swedish:../prelude
|
||||||
|
|
||||||
|
concrete RestaurantSwe of Restaurant =
|
||||||
|
DatabaseSwe ** open Prelude, ResourceSwe, ParadigmsSwe in {
|
||||||
|
|
||||||
|
lin
|
||||||
|
Restaurant = UseN (nRisk "restaurang") ;
|
||||||
|
Bar = UseN (nRisk "bar") ;
|
||||||
|
French = AdjP1 (adjReg "fransk") ;
|
||||||
|
Italian = AdjP1 (adjReg "italiensk") ;
|
||||||
|
Indian = AdjP1 (adjReg "indisk") ;
|
||||||
|
Japanese = AdjP1 (adjReg "japansk") ;
|
||||||
|
|
||||||
|
address = funAv (nRisk "adress") ;
|
||||||
|
phone = funTill (nPapper "nummer") ;
|
||||||
|
priceLevel = funPaa (nRisk "prisnivå") ;
|
||||||
|
|
||||||
|
Cheap = aReg "billig" ;
|
||||||
|
Expensive = aReg "dyr" ;
|
||||||
|
|
||||||
|
WhoRecommend rest =
|
||||||
|
ss2 ["vem rekommenderade"] (rest.s ! nominative) ** {lock_Phr = <>} ;
|
||||||
|
WhoHellRecommend rest =
|
||||||
|
ss2 ["vem fan rekommenderade"] (rest.s ! nominative) ** {lock_Phr = <>} ;
|
||||||
|
|
||||||
|
LucasCarton = pnReg ["Lucas-Carton"] neutrum nonmasculine ; --- -
|
||||||
|
LaCoupole = pnReg ["La-Coupole"] neutrum nonmasculine ;
|
||||||
|
BurgerKing = pnReg ["Burger-King"] neutrum nonmasculine ;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user