(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.
-- : 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".

View File

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

View File

@@ -1,27 +1,26 @@
--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,
-- often different even in closely related languages.
lin
-- : VP -> Cl ; -- it is hot
--ImpersCl = ;
-- : VP -> Cl ; -- one sleeps
GenericCl vp = predVP impersNP (passVP vp) ;
-- ImpersCl : VP -> Cl ; -- it is hot
-- GenericCl : VP -> Cl ; -- one sleeps
ImpersCl,
GenericCl = \vp -> predVP impersNP (passVP vp) ;
{-
CleftNP : NP -> RS -> Cl ; -- it is I who did it
CleftAdv : Adv -> S -> Cl ; -- it is here she slept
-}
-- : NP -> Cl ; -- there is a house
-- ExistNP np =
-- let vp = UseComp (CompNP np)
-- in ;
ExistNP np =
let vp = UseComp (CompNP np)
in predVP impersNP vp ;
{- ExistIP : IP -> QCl ; -- which houses are there

View File

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