summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorramona.enache <ramona.enache@chalmers.se>2013-08-21 13:05:22 +0000
committerramona.enache <ramona.enache@chalmers.se>2013-08-21 13:05:22 +0000
commit9f1a2e5b67a1808e65606e9884e85eccd501bb72 (patch)
tree4153487b0aebb9655f8d85083a9d33da3bbf2b16
parent1f4b55735e64c34b8fc9778d32cecfd412c8e6f6 (diff)
added Facebook grammar from SummerSchool tutorial on best practices for grammar writing
-rw-r--r--contrib/summerschool/2013/bestPractices/Facebook.gf35
-rw-r--r--contrib/summerschool/2013/bestPractices/FacebookEng.gf14
-rw-r--r--contrib/summerschool/2013/bestPractices/FacebookI.gf29
-rw-r--r--contrib/summerschool/2013/bestPractices/LexFacebook.gf8
-rw-r--r--contrib/summerschool/2013/bestPractices/LexFacebookEng.gf16
-rw-r--r--contrib/summerschool/2013/bestPractices/corpus.txt7
6 files changed, 109 insertions, 0 deletions
diff --git a/contrib/summerschool/2013/bestPractices/Facebook.gf b/contrib/summerschool/2013/bestPractices/Facebook.gf
new file mode 100644
index 000000000..859f6abff
--- /dev/null
+++ b/contrib/summerschool/2013/bestPractices/Facebook.gf
@@ -0,0 +1,35 @@
+abstract Facebook = {
+
+flags startcat = Action ;
+
+cat
+ SPerson;
+ Person;
+ Place;
+ Page;
+ Action;
+ Item ;
+
+fun
+ CheckIn : SPerson -> Place -> Action ;
+ BeFriends : SPerson -> Person -> Action ;
+ Like : SPerson -> Item -> Action ;
+
+ SPersonToPerson : SPerson -> Person ;
+ MorePersons : SPerson -> Person -> Person ;
+
+ PlaceToItem : Place -> Item ;
+ PageToItem : Page -> Item ;
+ ActionToItem : Action -> Item ;
+
+
+---------
+
+You : SPerson ;
+John : SPerson;
+Mary : SPerson;
+
+Frauinsel : Place;
+GF : Page;
+
+} \ No newline at end of file
diff --git a/contrib/summerschool/2013/bestPractices/FacebookEng.gf b/contrib/summerschool/2013/bestPractices/FacebookEng.gf
new file mode 100644
index 000000000..6f4a448d8
--- /dev/null
+++ b/contrib/summerschool/2013/bestPractices/FacebookEng.gf
@@ -0,0 +1,14 @@
+
+concrete FacebookEng of Facebook = FacebookI with
+ (Syntax = SyntaxEng),
+ (LexFacebook = LexFacebookEng) **
+ open ParadigmsEng in {
+
+lin
+You = you_NP ;
+John = mkNP (mkPN "John") ;
+Mary = mkNP (mkPN "Mary") ;
+Frauinsel = mkNP (mkPN "Frauinsel") ;
+GF = mkNP (mkPN "GF") ;
+
+} \ No newline at end of file
diff --git a/contrib/summerschool/2013/bestPractices/FacebookI.gf b/contrib/summerschool/2013/bestPractices/FacebookI.gf
new file mode 100644
index 000000000..5c798e1e3
--- /dev/null
+++ b/contrib/summerschool/2013/bestPractices/FacebookI.gf
@@ -0,0 +1,29 @@
+incomplete concrete FacebookI of Facebook =
+ open
+ Syntax,
+ Prelude,
+ LexFacebook
+ in
+{
+lincat
+ SPerson = NP ;
+ Person = NP ;
+ Place = NP ;
+ Page = NP ;
+ Action = S ;
+ Item = NP ;
+
+
+lin
+SPersonToPerson sperson = sperson ;
+MorePersons sperson person = mkNP and_Conj sperson person ;
+
+PlaceToItem place = place ;
+PageToItem page = page ;
+ActionToItem action = nounFromS action ;
+
+CheckIn sperson place = mkS pastTense (mkCl sperson (checkIn place)) ;
+BeFriends sperson person = mkS pastTense (mkCl sperson (beFriends person)) ;
+Like sperson item = like sperson item ;
+
+} \ No newline at end of file
diff --git a/contrib/summerschool/2013/bestPractices/LexFacebook.gf b/contrib/summerschool/2013/bestPractices/LexFacebook.gf
new file mode 100644
index 000000000..e6ee7b5c8
--- /dev/null
+++ b/contrib/summerschool/2013/bestPractices/LexFacebook.gf
@@ -0,0 +1,8 @@
+interface LexFacebook = open Syntax in
+{
+oper
+nounFromS : S -> NP ;
+checkIn : NP -> VP ;
+beFriends : NP -> VP ;
+like : NP -> NP -> S ;
+} \ No newline at end of file
diff --git a/contrib/summerschool/2013/bestPractices/LexFacebookEng.gf b/contrib/summerschool/2013/bestPractices/LexFacebookEng.gf
new file mode 100644
index 000000000..1d065fdb4
--- /dev/null
+++ b/contrib/summerschool/2013/bestPractices/LexFacebookEng.gf
@@ -0,0 +1,16 @@
+instance LexFacebookEng of LexFacebook =
+ open SyntaxEng,
+ ParadigmsEng,
+ --ExtraEng,
+ IrregEng in
+{
+oper
+ nounFromS s = mkNP (mkNP the_Det (mkCN (mkN "fact"))) (SyntaxEng.mkAdv that_Subj s) ;
+
+ checkIn np = mkVP (mkV2 (partV (mkV "check") "in") (mkPrep "to")) np ;
+
+ beFriends np = mkVP (mkVP (dirV2 become_V) (mkNP a_Art plNum (mkCN (mkN "friend")))) (SyntaxEng.mkAdv (mkPrep "with") np) ;
+
+ like np1 np2 = mkS (mkCl np1 (mkVP (dirV2 (mkV "like")) np2)) ;
+
+} \ No newline at end of file
diff --git a/contrib/summerschool/2013/bestPractices/corpus.txt b/contrib/summerschool/2013/bestPractices/corpus.txt
new file mode 100644
index 000000000..7ff207000
--- /dev/null
+++ b/contrib/summerschool/2013/bestPractices/corpus.txt
@@ -0,0 +1,7 @@
+You and John are now friends. You became friends with John.
+You became friends with John and Mary.
+You checked in to Frauinsel.
+You like GF.
+You like Frauinsel.
+You like that John checked in to Frauinsel.
+You like that you became friends with John and Mary.