(Som) Implement remaining funs needed for ExtendSom + use ExtendFunctor

This commit is contained in:
Inari Listenmaa
2019-10-03 18:01:26 +02:00
parent c2e0c709a7
commit 6a1ebffcee
4 changed files with 17 additions and 18 deletions

View File

@@ -48,7 +48,9 @@ concrete AdjectiveSom of Adjective = CatSom ** open ResSom, Prelude in {
-- phrases, although the semantics is only clear for some adjectives. -- phrases, although the semantics is only clear for some adjectives.
-- : AP -> SC -> AP ; -- good that she is here -- : AP -> SC -> AP ; -- good that she is here
-- SentAP ap sc = ap ** { } ; SentAP ap sc = ap ** {
s = \\af => ap.s ! af ++ sc.s -- TODO check
} ;
-- An adjectival phrase can be modified by an *adadjective*, such as "very". -- An adjectival phrase can be modified by an *adadjective*, such as "very".

View File

@@ -1,9 +1,9 @@
--# -path=.:../common:../abstract --# -path=.:../common:../abstract
concrete ExtendSom of Extend = CatSom concrete ExtendSom of Extend = CatSom
-- ** ExtendFunctor -- Add this back when all relevant functions are implemented ** ExtendFunctor - [GenModNP, FocusObj, ComplDirectVS, ComplDirectVQ]
-- with (Grammar=GrammarSom) with (Grammar=GrammarSom)
** open Prelude, ResSom in { ** open Prelude, ResSom, NounSom in {
lin lin

View File

@@ -1,27 +1,26 @@
--1 Idiom: Idiomatic Expressions --1 Idiom: Idiomatic Expressions
concrete IdiomSom of Idiom = CatSom ** open Prelude, ResSom, VerbSom in { concrete IdiomSom of Idiom = CatSom ** open Prelude, ResSom, VerbSom, NounSom, StructuralSom in {
-- This module defines constructions that are formed in fixed ways, -- This module defines constructions that are formed in fixed ways,
-- often different even in closely related languages. -- often different even in closely related languages.
lin lin
-- : VP -> Cl ; -- it is hot -- ImpersCl : VP -> Cl ; -- it is hot
--ImpersCl = ; -- GenericCl : VP -> Cl ; -- one sleeps
ImpersCl,
-- : VP -> Cl ; -- one sleeps GenericCl = \vp -> predVP impersNP (passVP vp) ;
GenericCl vp = predVP impersNP (passVP vp) ;
{- {-
CleftNP : NP -> RS -> Cl ; -- it is I who did it CleftNP : NP -> RS -> Cl ; -- it is I who did it
CleftAdv : Adv -> S -> Cl ; -- it is here she slept CleftAdv : Adv -> S -> Cl ; -- it is here she slept
-} -}
-- : NP -> Cl ; -- there is a house -- : NP -> Cl ; -- there is a house
-- ExistNP np = ExistNP np =
-- let vp = UseComp (CompNP np) let vp = UseComp (CompNP np)
-- in ; in predVP impersNP vp ;
{- ExistIP : IP -> QCl ; -- which houses are there {- ExistIP : IP -> QCl ; -- which houses are there

View File

@@ -42,19 +42,17 @@ lin
--2 Embedded sentences --2 Embedded sentences
{-
-- : S -> SC ; -- : S -> SC ;
EmbedS s = { } ; EmbedS s = {s = s.s ! True} ; -- choose subordinate
-- : QS -> SC ; -- : QS -> SC ;
EmbedQS qs = { } ; -- EmbedQS qs = { } ;
-- : VP -> SC ; -- : VP -> SC ;
EmbedVP vp = { s = linVP vp } ; EmbedVP vp = {s = infVP vp} ;
--2 Sentences --2 Sentences
-}
-- : Temp -> Pol -> Cl -> S ; -- : Temp -> Pol -> Cl -> S ;
UseCl t p cls = { UseCl t p cls = {
s = \\isSubord => let cl = cl2sentence isSubord cls in s = \\isSubord => let cl = cl2sentence isSubord cls in