mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 00:52:51 -06:00
fixing number of interrogatives in English Structural
This commit is contained in:
@@ -102,7 +102,7 @@ concrete StructuralEng of Structural = CatEng **
|
|||||||
very_AdA = ss "very" ;
|
very_AdA = ss "very" ;
|
||||||
want_VV = P.mkVV (P.regV "want") ;
|
want_VV = P.mkVV (P.regV "want") ;
|
||||||
we_Pron = mkNP "we" "us" "our" Pl P1 Masc ;
|
we_Pron = mkNP "we" "us" "our" Pl P1 Masc ;
|
||||||
whatPl_IP = mkIP "what" "what" "what's" Sg ;
|
whatPl_IP = mkIP "what" "what" "what's" Pl ;
|
||||||
whatSg_IP = mkIP "what" "what" "what's" Sg ;
|
whatSg_IP = mkIP "what" "what" "what's" Sg ;
|
||||||
when_IAdv = ss "when" ;
|
when_IAdv = ss "when" ;
|
||||||
when_Subj = ss "when" ;
|
when_Subj = ss "when" ;
|
||||||
@@ -110,8 +110,8 @@ concrete StructuralEng of Structural = CatEng **
|
|||||||
which_IQuant = {s = \\_ => "which"} ;
|
which_IQuant = {s = \\_ => "which"} ;
|
||||||
---b whichPl_IDet = mkDeterminer Pl ["which"] ;
|
---b whichPl_IDet = mkDeterminer Pl ["which"] ;
|
||||||
---b whichSg_IDet = mkDeterminer Sg ["which"] ;
|
---b whichSg_IDet = mkDeterminer Sg ["which"] ;
|
||||||
whoSg_IP = mkIP "who" "whom" "whose" Sg ;
|
|
||||||
whoPl_IP = mkIP "who" "whom" "whose" Pl ;
|
whoPl_IP = mkIP "who" "whom" "whose" Pl ;
|
||||||
|
whoSg_IP = mkIP "who" "whom" "whose" Sg ;
|
||||||
why_IAdv = ss "why" ;
|
why_IAdv = ss "why" ;
|
||||||
without_Prep = ss "without" ;
|
without_Prep = ss "without" ;
|
||||||
with_Prep = ss "with" ;
|
with_Prep = ss "with" ;
|
||||||
|
|||||||
@@ -336,9 +336,7 @@ computeLType gr t = do
|
|||||||
where
|
where
|
||||||
comp ty = case ty of
|
comp ty = case ty of
|
||||||
_ | Just _ <- isTypeInts ty -> return ty ---- shouldn't be needed
|
_ | Just _ <- isTypeInts ty -> return ty ---- shouldn't be needed
|
||||||
| ty == typeInt -> return ty ---- shouldn't be needed
|
| isPredefConstant ty -> return ty ---- shouldn't be needed
|
||||||
| ty == typeFloat -> return ty ---- shouldn't be needed
|
|
||||||
| ty == typeError -> return ty ---- shouldn't be needed
|
|
||||||
|
|
||||||
Q m ident -> checkIn ("module" +++ prt m) $ do
|
Q m ident -> checkIn ("module" +++ prt m) $ do
|
||||||
ty' <- checkErr (lookupResDef gr m ident)
|
ty' <- checkErr (lookupResDef gr m ident)
|
||||||
@@ -409,14 +407,6 @@ inferLType gr trm = case trm of
|
|||||||
,
|
,
|
||||||
checkErr (lookupResDef gr m ident) >>= infer
|
checkErr (lookupResDef gr m ident) >>= infer
|
||||||
,
|
,
|
||||||
{-
|
|
||||||
do
|
|
||||||
over <- getOverload gr Nothing trm
|
|
||||||
case over of
|
|
||||||
Just trty -> return trty
|
|
||||||
_ -> prtFail "not overloaded" trm
|
|
||||||
,
|
|
||||||
-}
|
|
||||||
prtFail "cannot infer type of constant" trm
|
prtFail "cannot infer type of constant" trm
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ prRefinement t = case t of
|
|||||||
prOperSignature :: (QIdent,Type) -> String
|
prOperSignature :: (QIdent,Type) -> String
|
||||||
prOperSignature (f, t) = prQIdent f +++ ":" +++ prt t
|
prOperSignature (f, t) = prQIdent f +++ ":" +++ prt t
|
||||||
|
|
||||||
-- to look up a constant etc in a search tree
|
-- to look up a constant etc in a search tree --- why here? AR 29/5/2008
|
||||||
|
|
||||||
lookupIdent :: Ident -> BinTree Ident b -> Err b
|
lookupIdent :: Ident -> BinTree Ident b -> Err b
|
||||||
lookupIdent c t = case lookupTree prt c t of
|
lookupIdent c t = case lookupTree prt c t of
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ isInPredefined = err (const True) (const False) . typPredefined
|
|||||||
typPredefined :: Ident -> Err Type
|
typPredefined :: Ident -> Err Type
|
||||||
typPredefined c@(IC f) = case f of
|
typPredefined c@(IC f) = case f of
|
||||||
"Int" -> return typePType
|
"Int" -> return typePType
|
||||||
"Float" -> return typePType
|
"Float" -> return typeType
|
||||||
"Error" -> return typeType
|
"Error" -> return typeType
|
||||||
"Ints" -> return $ mkFunType [cnPredef "Int"] typePType
|
"Ints" -> return $ mkFunType [cnPredef "Int"] typePType
|
||||||
"PBool" -> return typePType
|
"PBool" -> return typePType
|
||||||
|
|||||||
@@ -307,6 +307,9 @@ isTypeInts ty = case ty of
|
|||||||
constPredefRes :: String -> Term
|
constPredefRes :: String -> Term
|
||||||
constPredefRes s = Q (IC "Predef") (zIdent s)
|
constPredefRes s = Q (IC "Predef") (zIdent s)
|
||||||
|
|
||||||
|
constPredefAbs :: String -> Term
|
||||||
|
constPredefAbs s = Q (IC "Predef") (zIdent s)
|
||||||
|
|
||||||
isPredefConstant :: Term -> Bool
|
isPredefConstant :: Term -> Bool
|
||||||
isPredefConstant t = case t of
|
isPredefConstant t = case t of
|
||||||
Q (IC "Predef") _ -> True
|
Q (IC "Predef") _ -> True
|
||||||
|
|||||||
Reference in New Issue
Block a user