mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
cat Interj in lib
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
-- implementation in all languages in the resource (typically,
|
-- implementation in all languages in the resource (typically,
|
||||||
-- just a string). These categories are
|
-- just a string). These categories are
|
||||||
-- $AdA, AdN, AdV, Adv, Ant, CAdv, IAdv, PConj, Phr$,
|
-- $AdA, AdN, AdV, Adv, Ant, CAdv, IAdv, PConj, Phr$,
|
||||||
-- $Pol, SC, Tense, Text, Utt, Voc$.
|
-- $Pol, SC, Tense, Text, Utt, Voc, Interj$.
|
||||||
--
|
--
|
||||||
-- Moreover, the list categories $ListAdv, ListAP, ListNP, ListS$
|
-- Moreover, the list categories $ListAdv, ListAP, ListNP, ListS$
|
||||||
-- are defined on $Conjunction$ and only used locally there.
|
-- are defined on $Conjunction$ and only used locally there.
|
||||||
|
|||||||
@@ -15,10 +15,11 @@ abstract Common = {
|
|||||||
|
|
||||||
-- Constructed in [``Phrase`` Phrase.html]:
|
-- Constructed in [``Phrase`` Phrase.html]:
|
||||||
|
|
||||||
Phr ; -- phrase in a text e.g. "but be quiet please"
|
Phr ; -- phrase in a text e.g. "but be quiet please"
|
||||||
Utt ; -- sentence, question, word... e.g. "be quiet"
|
Utt ; -- sentence, question, word... e.g. "be quiet"
|
||||||
Voc ; -- vocative or "please" e.g. "my darling"
|
Voc ; -- vocative or "please" e.g. "my darling"
|
||||||
PConj ; -- phrase-beginning conjunction e.g. "therefore"
|
PConj ; -- phrase-beginning conjunction e.g. "therefore"
|
||||||
|
Interj ; -- interjection e.g. "alas"
|
||||||
|
|
||||||
-- Constructed in [``Sentence`` Sentence.html]:
|
-- Constructed in [``Sentence`` Sentence.html]:
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ abstract Lexicon = Cat ** {
|
|||||||
fun
|
fun
|
||||||
add_V3 : V3 ;
|
add_V3 : V3 ;
|
||||||
airplane_N : N ;
|
airplane_N : N ;
|
||||||
|
alas_Interj : Interj ;
|
||||||
already_Adv : Adv ;
|
already_Adv : Adv ;
|
||||||
animal_N : N ;
|
animal_N : N ;
|
||||||
answer_V2S : V2S ;
|
answer_V2S : V2S ;
|
||||||
|
|||||||
@@ -23,17 +23,18 @@ abstract Phrase = Cat ** {
|
|||||||
-- Moreover, in many languages e.g. noun phrases in different cases
|
-- Moreover, in many languages e.g. noun phrases in different cases
|
||||||
-- can be used.
|
-- can be used.
|
||||||
|
|
||||||
UttIP : IP -> Utt ; -- who
|
UttIP : IP -> Utt ; -- who
|
||||||
UttIAdv : IAdv -> Utt ; -- why
|
UttIAdv : IAdv -> Utt ; -- why
|
||||||
UttNP : NP -> Utt ; -- this man
|
UttNP : NP -> Utt ; -- this man
|
||||||
UttAdv : Adv -> Utt ; -- here
|
UttAdv : Adv -> Utt ; -- here
|
||||||
UttVP : VP -> Utt ; -- to sleep
|
UttVP : VP -> Utt ; -- to sleep
|
||||||
UttCN : CN -> Utt ; -- house
|
UttCN : CN -> Utt ; -- house
|
||||||
UttCard : Card -> Utt ; -- five
|
UttCard : Card -> Utt ; -- five
|
||||||
UttAP : AP -> Utt ; -- fine
|
UttAP : AP -> Utt ; -- fine
|
||||||
|
UttInterj : Interj -> Utt ; -- alas
|
||||||
|
|
||||||
-- The phrasal conjunction is optional. A sentence conjunction
|
-- The phrasal conjunction is optional. A sentence conjunction
|
||||||
-- can also used to prefix an utterance.
|
-- can also be used to prefix an utterance.
|
||||||
|
|
||||||
NoPConj : PConj ;
|
NoPConj : PConj ;
|
||||||
PConjConj : Conj -> PConj ; -- and
|
PConjConj : Conj -> PConj ; -- and
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
concrete CommonX of Common = open (R = ParamX) in {
|
concrete CommonX of Common = open (R = ParamX) in {
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
Text = {s : Str} ; --lock_Text : {}} ;
|
Text = {s : Str} ;
|
||||||
Phr = {s : Str} ; --lock_Phr : {}} ;
|
Phr = {s : Str} ;
|
||||||
Utt = {s : Str} ; --lock_Utt : {}} ;
|
Utt = {s : Str} ;
|
||||||
Voc = {s : Str} ; --lock_Voc : {}} ;
|
Voc = {s : Str} ;
|
||||||
SC = {s : Str} ; --lock_SC : {}} ;
|
SC = {s : Str} ;
|
||||||
Adv = {s : Str} ; --lock_Adv : {}} ;
|
Adv = {s : Str} ;
|
||||||
AdV = {s : Str} ; --lock_AdV : {}} ;
|
AdV = {s : Str} ;
|
||||||
AdA = {s : Str} ; --lock_AdA : {}} ;
|
AdA = {s : Str} ;
|
||||||
AdN = {s : Str} ; --lock_AdN : {}} ;
|
AdN = {s : Str} ;
|
||||||
IAdv = {s : Str} ; --lock_IAdv : {}} ;
|
IAdv = {s : Str} ;
|
||||||
CAdv = {s,p : Str} ; --lock_CAdv : {}} ;
|
CAdv = {s,p : Str} ;
|
||||||
PConj = {s : Str} ; --lock_PConj : {}} ;
|
PConj = {s : Str} ;
|
||||||
|
Interj = {s : Str} ;
|
||||||
|
|
||||||
Temp = {s : Str ; t : R.Tense ; a : R.Anteriority} ;
|
Temp = {s : Str ; t : R.Tense ; a : R.Anteriority} ;
|
||||||
Tense = {s : Str ; t : R.Tense} ;
|
Tense = {s : Str ; t : R.Tense} ;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ flags
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
airplane_N = regN "airplane" ;
|
airplane_N = regN "airplane" ;
|
||||||
|
alas_Interj = ss "alas" ;
|
||||||
answer_V2S = mkV2S (mkV "answer" "answered") toP ;
|
answer_V2S = mkV2S (mkV "answer" "answered") toP ;
|
||||||
apartment_N = regN "apartment" ;
|
apartment_N = regN "apartment" ;
|
||||||
apple_N = regN "apple" ;
|
apple_N = regN "apple" ;
|
||||||
|
|||||||
@@ -60,6 +60,10 @@ oper
|
|||||||
-- Prepositions are used in many-argument functions for rection.
|
-- Prepositions are used in many-argument functions for rection.
|
||||||
-- The resource category $Prep$ is used.
|
-- The resource category $Prep$ is used.
|
||||||
|
|
||||||
|
-- The number of a noun phrase can be extracted with the following
|
||||||
|
-- function.
|
||||||
|
|
||||||
|
npNumber : NP -> Number ;
|
||||||
|
|
||||||
|
|
||||||
--2 Nouns
|
--2 Nouns
|
||||||
@@ -341,6 +345,8 @@ mkSubj : Str -> Subj = \s -> lin Subj {s = s} ;
|
|||||||
nominative = Nom ;
|
nominative = Nom ;
|
||||||
genitive = Gen ;
|
genitive = Gen ;
|
||||||
|
|
||||||
|
npNumber np = (fromAgr np.a).n ;
|
||||||
|
|
||||||
Preposition : Type = Str ; -- obsolete
|
Preposition : Type = Str ; -- obsolete
|
||||||
|
|
||||||
regN = \ray ->
|
regN = \ray ->
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ concrete PhraseEng of Phrase = CatEng ** open Prelude, ResEng in {
|
|||||||
UttCN n = {s = n.s ! Sg ! Nom} ;
|
UttCN n = {s = n.s ! Sg ! Nom} ;
|
||||||
UttCard n = {s = n.s ! Nom} ;
|
UttCard n = {s = n.s ! Nom} ;
|
||||||
UttAP ap = {s = ap.s ! agrP3 Sg} ;
|
UttAP ap = {s = ap.s ! agrP3 Sg} ;
|
||||||
|
UttInterj i = i ;
|
||||||
|
|
||||||
NoPConj = {s = []} ;
|
NoPConj = {s = []} ;
|
||||||
PConjConj conj = {s = conj.s2} ; ---
|
PConjConj conj = {s = conj.s2} ; ---
|
||||||
|
|||||||
Reference in New Issue
Block a user