mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-24 18:28:55 -06:00
Diff interface for Phrasebook
This commit is contained in:
8
examples/phrasebook/DiffPhrasebook.gf
Normal file
8
examples/phrasebook/DiffPhrasebook.gf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
interface DiffPhrasebook = open Syntax in {
|
||||||
|
|
||||||
|
oper
|
||||||
|
want_V2 : V2 ;
|
||||||
|
like_V2 : V2 ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
12
examples/phrasebook/DiffPhrasebookFin.gf
Normal file
12
examples/phrasebook/DiffPhrasebookFin.gf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
instance DiffPhrasebookFin of DiffPhrasebook = open
|
||||||
|
SyntaxFin,
|
||||||
|
ParadigmsFin
|
||||||
|
in {
|
||||||
|
|
||||||
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
want_V2 = mkV2 (mkV "haluta") ;
|
||||||
|
like_V2 = mkV2 (mkV "pitää") elative ;
|
||||||
|
|
||||||
|
}
|
||||||
12
examples/phrasebook/DiffPhrasebookRon.gf
Normal file
12
examples/phrasebook/DiffPhrasebookRon.gf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
instance DiffPhrasebookRon of DiffPhrasebook = open
|
||||||
|
SyntaxRon,
|
||||||
|
ParadigmsRon
|
||||||
|
in {
|
||||||
|
|
||||||
|
flags coding = utf8 ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
want_V2 = dirV2 (lin V want_VV) ; -- mkVV (v_besch74 "vrea")
|
||||||
|
like_V2 = dirV2 (mkV "părăsi") ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ abstract Sentences = Numeral ** {
|
|||||||
IsNot : Item -> Quality -> Sentence ;
|
IsNot : Item -> Quality -> Sentence ;
|
||||||
|
|
||||||
IWant : Object -> Sentence ;
|
IWant : Object -> Sentence ;
|
||||||
|
ILike : Item -> Sentence ;
|
||||||
DoYouHave : Kind -> Sentence ;
|
DoYouHave : Kind -> Sentence ;
|
||||||
WhetherIs : Item -> Quality -> Sentence ;
|
WhetherIs : Item -> Quality -> Sentence ;
|
||||||
ObjItem : Item -> Object ;
|
ObjItem : Item -> Object ;
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
concrete SentencesFin of Sentences = NumeralFin ** SentencesI with
|
concrete SentencesFin of Sentences = NumeralFin ** SentencesI with
|
||||||
|
(DiffPhrasebook = DiffPhrasebookFin),
|
||||||
(Syntax = SyntaxFin) ;
|
(Syntax = SyntaxFin) ;
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
incomplete concrete SentencesI of Sentences = Numeral **
|
incomplete concrete SentencesI of Sentences = Numeral **
|
||||||
open Syntax in {
|
open
|
||||||
|
DiffPhrasebook,
|
||||||
|
Syntax
|
||||||
|
in {
|
||||||
lincat
|
lincat
|
||||||
Sentence = Utt ;
|
Sentence = Utt ;
|
||||||
Item = NP ;
|
Item = NP ;
|
||||||
@@ -10,7 +13,8 @@ incomplete concrete SentencesI of Sentences = Numeral **
|
|||||||
Is item quality = mkUtt (mkCl item quality) ;
|
Is item quality = mkUtt (mkCl item quality) ;
|
||||||
IsNot item quality = mkUtt (mkS negativePol (mkCl item quality)) ;
|
IsNot item quality = mkUtt (mkS negativePol (mkCl item quality)) ;
|
||||||
WhetherIs item quality = mkUtt (mkQCl (mkCl item quality)) ;
|
WhetherIs item quality = mkUtt (mkQCl (mkCl item quality)) ;
|
||||||
IWant obj = mkUtt (mkCl (mkNP i_Pron) want_VV (mkVP have_V2 obj)) ;
|
IWant obj = mkUtt (mkCl (mkNP i_Pron) want_V2 obj) ;
|
||||||
|
ILike item = mkUtt (mkCl (mkNP i_Pron) like_V2 item) ;
|
||||||
DoYouHave kind =
|
DoYouHave kind =
|
||||||
mkUtt (mkQCl (mkCl (mkNP youPol_Pron) have_V2 (mkNP kind))) ;
|
mkUtt (mkQCl (mkCl (mkNP youPol_Pron) have_V2 (mkNP kind))) ;
|
||||||
ObjItem i = i ;
|
ObjItem i = i ;
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
concrete SentencesRon of Sentences = NumeralRon ** SentencesI with
|
concrete SentencesRon of Sentences = NumeralRon ** SentencesI with
|
||||||
|
(DiffPhrasebook = DiffPhrasebookRon),
|
||||||
(Syntax = SyntaxRon) ;
|
(Syntax = SyntaxRon) ;
|
||||||
|
|||||||
Reference in New Issue
Block a user