mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-30 11:08:35 -06:00
LargeFin with no lexicon, but just one word in each category+inherent features; still incomplete
This commit is contained in:
@@ -7,17 +7,18 @@ concrete LargeFin of LargeFinAbs =
|
||||
VerbFin,
|
||||
AdjectiveFin,
|
||||
AdverbFin,
|
||||
NumeralFin,
|
||||
-- NumeralFin,
|
||||
SentenceFin,
|
||||
QuestionFin,
|
||||
RelativeFin,
|
||||
ConjunctionFin,
|
||||
PhraseFin,
|
||||
StructuralFin,
|
||||
-- StructuralFin - [mkPronoun],
|
||||
IdiomFin,
|
||||
TenseX,
|
||||
ExtraFin,
|
||||
WordsFin ** open TagFin, StemFin in {
|
||||
TenseX
|
||||
---- ,ExtraFin
|
||||
-- ,WordsFin
|
||||
** open TagFin, StemFin, ResFin, ParadigmsFin, Prelude in {
|
||||
|
||||
lincat
|
||||
Top = {s : Str} ;
|
||||
@@ -26,5 +27,32 @@ lin
|
||||
PhrPunctTop phr pu = {s = phr.s ++ pu.s} ;
|
||||
PhrTop phr = phr ;
|
||||
|
||||
fullstopPunct = {s = tagPOS "PUNCT" "."} ;
|
||||
thePunct = {s = tagPOS "PUNCT" ""} ;
|
||||
|
||||
lin
|
||||
theN = mkN [] ;
|
||||
theA = mkA [] ;
|
||||
theV = mkSVerb [] ** {sc = SCNom ; p = []} ;
|
||||
theAdv = mkAdv [] ;
|
||||
|
||||
theV2 = mkV2 theV ; ---- plus other complement cases?
|
||||
|
||||
sg1Pron = mkPron Sg P1 ;
|
||||
sg2Pron = mkPron Sg P2 ;
|
||||
sg3Pron = mkPron Sg P3 ;
|
||||
pl1Pron = mkPron Pl P1 ;
|
||||
pl2Pron = mkPron Pl P2 ;
|
||||
pl3Pron = mkPron Pl P3 ;
|
||||
|
||||
|
||||
|
||||
oper
|
||||
mkPron : Number -> Person -> Pron = \n,p -> lin Pron {
|
||||
s = \\npf => tagWord (tagPron "Prs" (Ag n p) npf) (mkTag "PRON") ;
|
||||
a = Ag n p ;
|
||||
hasPoss = True ;
|
||||
poss = [] ; ----
|
||||
} ;
|
||||
|
||||
|
||||
}
|
||||
@@ -5,17 +5,18 @@ abstract LargeFinAbs =
|
||||
Verb,
|
||||
Adjective,
|
||||
Adverb,
|
||||
Numeral,
|
||||
-- Numeral,
|
||||
Sentence,
|
||||
Question,
|
||||
Relative,
|
||||
Conjunction,
|
||||
Phrase,
|
||||
Idiom,
|
||||
Structural,
|
||||
Tense,
|
||||
ExtraFinAbs,
|
||||
WordsFinAbs ** {
|
||||
-- Structural,
|
||||
Tense
|
||||
---- ,ExtraFinAbs
|
||||
-- ,WordsFinAbs
|
||||
** {
|
||||
|
||||
flags startcat = Top ;
|
||||
|
||||
@@ -25,8 +26,29 @@ cat
|
||||
fun
|
||||
PhrPunctTop : Phr -> Punct -> Top ;
|
||||
PhrTop : Phr -> Top ;
|
||||
fullstopPunct : Punct ;
|
||||
|
||||
thePunct : Punct ;
|
||||
fun
|
||||
theN : N ;
|
||||
theA : A ;
|
||||
theV : V ;
|
||||
theAdv : Adv ;
|
||||
|
||||
theV2 : V2 ;
|
||||
|
||||
sg1Pron : Pron ;
|
||||
sg2Pron : Pron ;
|
||||
sg3Pron : Pron ;
|
||||
sg4Pron : Pron ;
|
||||
sg5Pron : Pron ;
|
||||
sg6Pron : Pron ;
|
||||
|
||||
theConj : Conj ;
|
||||
theDistrConj : Conj ;
|
||||
theSubj : Subj ;
|
||||
|
||||
theSgDet : Det ;
|
||||
thePlDet : Det ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ oper
|
||||
-- other classes not treated below are POS tagged when the grammar is used with Omorfi
|
||||
|
||||
tagPOS : Str -> Str -> Str = \p,s -> tagWord ("+" + p) s ;
|
||||
tagFeature : Str -> Str -> Str -> Str = \s,f,v -> s ++ mkTag f v ;
|
||||
|
||||
oper
|
||||
SNForm : Type = Predef.Ints 0 ; --- not really needed
|
||||
|
||||
@@ -33,6 +33,20 @@ oper
|
||||
NCompound => pairTag (mkTag "Form" "Comp") (tagNumber Sg) ---- TODO: how is this in UD?
|
||||
} ;
|
||||
|
||||
tagPron : Str -> Agr -> NPForm -> Tag = \typ,agr,npf ->
|
||||
let tagr : Number * Person = case agr of {
|
||||
Ag n p => <n, p> ;
|
||||
AgPol => <Pl, P2> ---- Plur in ud?
|
||||
} ;
|
||||
n = tagr.p1 ; p = tagr.p2 ;
|
||||
pt : Tag = mkTag "PronType" typ ; -- Dem Ind Int Prs Rel
|
||||
in
|
||||
case npf of {
|
||||
NPCase c => consTag (tagNForm (NCase n c))(tagPerson p) pt ;
|
||||
NPAcc => consTag (mkTag "Case" "Acc") (tagNumber n) (tagPerson p) pt ; ---- effect for pronouns only?
|
||||
NPSep => consTag (tagNForm (NCase n Nom))(tagPerson p) pt ---- correct pro-drop effect?
|
||||
} ;
|
||||
|
||||
tagDegreeAForm : Degree -> AForm -> Str = \d,af -> case af of {
|
||||
AN nf => let ts = tagNForms nf in consTag ts.p1 (tagDegree d) ts.p2 ;
|
||||
AAdv => consTag adverbTag (tagDegree d) ---- TODO: how is this in UD?
|
||||
|
||||
Reference in New Issue
Block a user