mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-24 02:12:50 -06:00
inspected ParadigmsX
This commit is contained in:
@@ -24,15 +24,17 @@
|
|||||||
-- video recorder dialogue systems, software specifications, and a
|
-- video recorder dialogue systems, software specifications, and a
|
||||||
-- health-related phrase book. Each new application helped to identify some
|
-- health-related phrase book. Each new application helped to identify some
|
||||||
-- missing structures in the resource and suggested some additions, but the
|
-- missing structures in the resource and suggested some additions, but the
|
||||||
-- number of them was usually small.
|
-- number of required additions was usually small.
|
||||||
--
|
--
|
||||||
-- To use the resource in applications, you need the following
|
-- To use the resource in applications, you need the following
|
||||||
-- $cat$ and $fun$ rules in $oper$ form, completed by taking the
|
-- $cat$ and $fun$ rules in $oper$ form, completed by taking the
|
||||||
-- $lincat$ and $lin$ judgements of a particular language. This is done
|
-- $lincat$ and $lin$ judgements of a particular language. This is done
|
||||||
-- by using, instead of this module, the $reuse$ module which has the name
|
-- by using, instead of this module, the $reuse$ module which has the name
|
||||||
-- $ResourceX$
|
-- $ResourceX$. It is located in the subdirectory
|
||||||
|
-- $grammars/resource/lang$ where $lang$ is the full name of the language.
|
||||||
|
|
||||||
abstract Combinations = {
|
|
||||||
|
abstract Combinations = PredefAbs ** {
|
||||||
--!
|
--!
|
||||||
--2 Categories
|
--2 Categories
|
||||||
--
|
--
|
||||||
@@ -221,9 +223,9 @@ fun
|
|||||||
PosVG,NegVG : VG -> VP ; --
|
PosVG,NegVG : VG -> VP ; --
|
||||||
|
|
||||||
--!
|
--!
|
||||||
--3 Adverbials
|
--3 Adverbs
|
||||||
--
|
--
|
||||||
-- Here is how complex adverbials can be formed and used.
|
-- Here is how complex adverbs can be formed and used.
|
||||||
|
|
||||||
AdjAdv : AP -> AdV ; -- "freely", "more consciously than you"
|
AdjAdv : AP -> AdV ; -- "freely", "more consciously than you"
|
||||||
PrepNP : Prep -> NP -> AdV ; -- "in London", "after the war"
|
PrepNP : Prep -> NP -> AdV ; -- "in London", "after the war"
|
||||||
@@ -237,7 +239,7 @@ fun
|
|||||||
--
|
--
|
||||||
|
|
||||||
PredVP : NP -> VP -> S ; -- "John walks"
|
PredVP : NP -> VP -> S ; -- "John walks"
|
||||||
PosSlashTV, NegSlashTV : NP -> TV -> Slash ; -- "John sees", "John doesn's see"
|
PosSlashTV,NegSlashTV : NP -> TV -> Slash ; -- "John sees", "John doesn's see"
|
||||||
OneVP : VP -> S ; -- "one walks"
|
OneVP : VP -> S ; -- "one walks"
|
||||||
ThereNP : NP -> S ; -- "there is a bar","there are 86 bars"
|
ThereNP : NP -> S ; -- "there is a bar","there are 86 bars"
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ fun
|
|||||||
-- Depending on language, all, some, or none of there verbs belong to
|
-- Depending on language, all, some, or none of there verbs belong to
|
||||||
-- a separate class of *auxiliary* verbs. The list is incomplete.
|
-- a separate class of *auxiliary* verbs. The list is incomplete.
|
||||||
|
|
||||||
CanVV, CanKnowVV, MustVV : VV ; -- can (pouvoir/savoir), must
|
CanVV, CanKnowVV, MustVV : VV ; -- can (pouvoir,savoir), must
|
||||||
WantVV : VV ; -- want (to do)
|
WantVV : VV ; -- want (to do)
|
||||||
|
|
||||||
--!
|
--!
|
||||||
@@ -65,7 +65,7 @@ fun
|
|||||||
--!
|
--!
|
||||||
--2 Prepositions
|
--2 Prepositions
|
||||||
--
|
--
|
||||||
-- We have carefully chosen a set of semantic relations expressible
|
-- We have chosen a set of semantic relations expressible
|
||||||
-- by prepositions in some languages, by cases or postpositions in
|
-- by prepositions in some languages, by cases or postpositions in
|
||||||
-- others. Complement uses of prepositions are not included, and
|
-- others. Complement uses of prepositions are not included, and
|
||||||
-- should be treated by the use of many-place verbs, adjectives, and
|
-- should be treated by the use of many-place verbs, adjectives, and
|
||||||
|
|||||||
@@ -13,8 +13,9 @@
|
|||||||
--
|
--
|
||||||
-- The main difference with $MorphoEng.gf$ is that the types
|
-- The main difference with $MorphoEng.gf$ is that the types
|
||||||
-- referred to are compiled resource grammar types. We have moreover
|
-- referred to are compiled resource grammar types. We have moreover
|
||||||
-- had the design principle of always having existing forms as string
|
-- had the design principle of always having existing forms, rather
|
||||||
-- arguments of the paradigms, not stems.
|
-- than stems, as string
|
||||||
|
-- arguments of the paradigms.
|
||||||
--
|
--
|
||||||
-- The following modules are presupposed:
|
-- The following modules are presupposed:
|
||||||
|
|
||||||
@@ -33,6 +34,11 @@ oper
|
|||||||
singular : Number ;
|
singular : Number ;
|
||||||
plural : Number ;
|
plural : Number ;
|
||||||
|
|
||||||
|
-- To abstract over case names, we define the following.
|
||||||
|
|
||||||
|
nominative : Case ;
|
||||||
|
genitive : Case ;
|
||||||
|
|
||||||
|
|
||||||
--2 Nouns
|
--2 Nouns
|
||||||
|
|
||||||
@@ -69,8 +75,8 @@ oper
|
|||||||
|
|
||||||
pnReg : (John : Str) -> PN ; -- John, John's
|
pnReg : (John : Str) -> PN ; -- John, John's
|
||||||
|
|
||||||
-- The most common cases on the top level havee shortcuts.
|
-- The most common cases on the higher-level category $CN$ have shortcuts.
|
||||||
-- The regular "y"/"s" variation is taken into account in $CN$.
|
-- The regular "y"/"s" variation is taken into account.
|
||||||
|
|
||||||
cnNonhuman : Str -> CN ;
|
cnNonhuman : Str -> CN ;
|
||||||
cnHuman : Str -> CN ;
|
cnHuman : Str -> CN ;
|
||||||
@@ -102,7 +108,7 @@ oper
|
|||||||
aFat : (fat : Str) -> AdjDeg ; -- fat, fatter, fattest
|
aFat : (fat : Str) -> AdjDeg ; -- fat, fatter, fattest
|
||||||
aRidiculous : (ridiculous : Str) -> AdjDeg ; -- -/more/most ridiculous
|
aRidiculous : (ridiculous : Str) -> AdjDeg ; -- -/more/most ridiculous
|
||||||
|
|
||||||
-- On top level, there are adjectival phrases. The most common case is
|
-- On higher level, there are adjectival phrases. The most common case is
|
||||||
-- just to use a one-place adjective.
|
-- just to use a one-place adjective.
|
||||||
|
|
||||||
apReg : Str -> AP ;
|
apReg : Str -> AP ;
|
||||||
@@ -167,9 +173,9 @@ oper
|
|||||||
|
|
||||||
-- Ditransitive verbs.
|
-- Ditransitive verbs.
|
||||||
|
|
||||||
mkV3 : V -> Str -> Str -> V3 ; -- prata, med, om
|
mkV3 : V -> Str -> Str -> V3 ; -- speak, with, about
|
||||||
v3Dir : V -> Str -> V3 ; -- ge,_,till
|
v3Dir : V -> Str -> V3 ; -- give,_,to
|
||||||
v3DirDir : V -> V3 ; -- ge,_,_
|
v3DirDir : V -> V3 ; -- give,_,_
|
||||||
|
|
||||||
-- The definitions should not bother the user of the API. So they are
|
-- The definitions should not bother the user of the API. So they are
|
||||||
-- hidden from the document.
|
-- hidden from the document.
|
||||||
@@ -177,10 +183,11 @@ oper
|
|||||||
|
|
||||||
human = Hum ;
|
human = Hum ;
|
||||||
nonhuman = NoHum ;
|
nonhuman = NoHum ;
|
||||||
-- singular defined in types.Eng
|
singular = Sg ;
|
||||||
-- plural defined in types.Eng
|
plural = Pl ;
|
||||||
|
|
||||||
nominative = Nom ;
|
nominative = Nom ;
|
||||||
|
genitive = Nom ;
|
||||||
|
|
||||||
mkN = \man,men,man's,men's,g ->
|
mkN = \man,men,man's,men's,g ->
|
||||||
mkNoun man men man's men's ** {g = g ; lock_N = <>} ;
|
mkNoun man men man's men's ** {g = g ; lock_N = <>} ;
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
-- Closed categories (determiners, pronouns, conjunctions) are
|
-- Closed categories (determiners, pronouns, conjunctions) are
|
||||||
-- accessed through the resource syntax API, $Structural.gf$.
|
-- accessed through the resource syntax API, $Structural.gf$.
|
||||||
--
|
--
|
||||||
-- The main difference with $morpho.Fin.gf$ is that the types
|
-- The main difference with $MorphoFin.gf$ is that the types
|
||||||
-- referred to are compiled resource grammar types. We have moreover
|
-- referred to are compiled resource grammar types. We have moreover
|
||||||
-- had the design principle of always having existing forms as string
|
-- had the design principle of always having existing forms, not
|
||||||
-- arguments of the paradigms, not stems.
|
-- stems, as string arguments of the paradigms, not stems.
|
||||||
--
|
--
|
||||||
-- This is the path to read the grammar from the same directory.
|
-- This is the path to read the grammar from the same directory.
|
||||||
--# -path=.:../abstract:../../prelude
|
--# -path=.:../abstract:../../prelude
|
||||||
@@ -30,8 +30,8 @@ oper
|
|||||||
human : Gender ;
|
human : Gender ;
|
||||||
nonhuman : Gender ;
|
nonhuman : Gender ;
|
||||||
|
|
||||||
-- singular : Number ;
|
singular : Number ;
|
||||||
-- singular : Number ;
|
plural : Number ;
|
||||||
|
|
||||||
nominative : Case ;
|
nominative : Case ;
|
||||||
genitive : Case ;
|
genitive : Case ;
|
||||||
@@ -50,7 +50,8 @@ oper
|
|||||||
-- stems, vowel alternation, and vowel harmony.
|
-- stems, vowel alternation, and vowel harmony.
|
||||||
|
|
||||||
oper
|
oper
|
||||||
mkN : (talo,talon,talona,taloa,taloon,taloina,taloissa,talojen,taloja,taloihin
|
mkN :
|
||||||
|
(talo,talon,talona,taloa,taloon,taloina,taloissa,talojen,taloja,taloihin
|
||||||
: Str) -> Gender -> N ;
|
: Str) -> Gender -> N ;
|
||||||
|
|
||||||
-- Nouns with partitive "a"/"ä" are a large group.
|
-- Nouns with partitive "a"/"ä" are a large group.
|
||||||
@@ -151,6 +152,7 @@ oper
|
|||||||
fGen : N -> Fun ;
|
fGen : N -> Fun ;
|
||||||
|
|
||||||
-- Proper names can be formed by using declensions for nouns.
|
-- Proper names can be formed by using declensions for nouns.
|
||||||
|
-- The plural forms are filtered away by the compiler.
|
||||||
|
|
||||||
mkPN : N -> PN ;
|
mkPN : N -> PN ;
|
||||||
|
|
||||||
@@ -225,8 +227,8 @@ oper
|
|||||||
-- The definitions should not bother the user of the API. So they are
|
-- The definitions should not bother the user of the API. So they are
|
||||||
-- hidden from the document.
|
-- hidden from the document.
|
||||||
--.
|
--.
|
||||||
-- singular defined in types.Fin
|
singular = Sg ;
|
||||||
-- plural defined in types.Fin
|
plural = Pl ;
|
||||||
|
|
||||||
human = Human ;
|
human = Human ;
|
||||||
nonhuman = NonHuman ;
|
nonhuman = NonHuman ;
|
||||||
|
|||||||
@@ -13,13 +13,13 @@
|
|||||||
--
|
--
|
||||||
-- The main difference with $MorphoFre.gf$ is that the types
|
-- The main difference with $MorphoFre.gf$ is that the types
|
||||||
-- referred to are compiled resource grammar types. We have moreover
|
-- referred to are compiled resource grammar types. We have moreover
|
||||||
-- had the design principle of always having existing forms as string
|
-- had the design principle of always having existing forms, not stems, as string
|
||||||
-- arguments of the paradigms, not stems.
|
-- arguments of the paradigms.
|
||||||
--
|
--
|
||||||
-- The following modules are presupposed:
|
-- The following modules are presupposed:
|
||||||
|
|
||||||
resource ParadigmsFre =
|
resource ParadigmsFre =
|
||||||
open (Predef=Predef), Prelude, (Types = TypesFre), SyntaxFre, MorphoFre,
|
open Prelude, (Types = TypesFre), SyntaxFre, MorphoFre,
|
||||||
ResourceFre in {
|
ResourceFre in {
|
||||||
|
|
||||||
--2 Parameters
|
--2 Parameters
|
||||||
@@ -30,18 +30,21 @@ oper
|
|||||||
masculine : Gender ;
|
masculine : Gender ;
|
||||||
feminine : Gender ;
|
feminine : Gender ;
|
||||||
|
|
||||||
-- To abstract over case names, we define the following.
|
-- To abstract over number names, we define the following.
|
||||||
|
|
||||||
|
singular : Number ;
|
||||||
|
plural : Number ;
|
||||||
|
|
||||||
|
-- To abstract over case names, we define the following. (Except for
|
||||||
|
-- some pronouns, the accusative is equal to the nominative, the
|
||||||
|
-- dative is formed by the preposition "à", and the genitive by the
|
||||||
|
-- preposition "de".)
|
||||||
|
|
||||||
nominative : Case ;
|
nominative : Case ;
|
||||||
accusative : Case ;
|
accusative : Case ;
|
||||||
dative : Case ;
|
dative : Case ;
|
||||||
genitive : Case ;
|
genitive : Case ;
|
||||||
|
|
||||||
-- To abstract over number names, we define the following.
|
|
||||||
|
|
||||||
singular : Number ;
|
|
||||||
plural : Number ;
|
|
||||||
|
|
||||||
|
|
||||||
--2 Nouns
|
--2 Nouns
|
||||||
|
|
||||||
@@ -115,7 +118,7 @@ oper
|
|||||||
--
|
--
|
||||||
-- The fragment only has present tense so far, but in all persons.
|
-- The fragment only has present tense so far, but in all persons.
|
||||||
-- These are examples of standard conjugations are available. The full list
|
-- These are examples of standard conjugations are available. The full list
|
||||||
-- of Bescherelle conjugations is given in $morpho.Fra.gf$, with all forms
|
-- of Bescherelle conjugations is given in $MorphoFra.gf$, with all forms
|
||||||
-- (their type is $Verbum$). The present-tense forms can be extracted by the
|
-- (their type is $Verbum$). The present-tense forms can be extracted by the
|
||||||
-- function $extractVerb$.
|
-- function $extractVerb$.
|
||||||
|
|
||||||
|
|||||||
@@ -15,13 +15,13 @@
|
|||||||
--
|
--
|
||||||
-- The main difference with $MorphoGer.gf$ is that the types
|
-- The main difference with $MorphoGer.gf$ is that the types
|
||||||
-- referred to are compiled resource grammar types. We have moreover
|
-- referred to are compiled resource grammar types. We have moreover
|
||||||
-- had the design principle of always having existing forms as string
|
-- had the design principle of always having existing forms, not stems, as string
|
||||||
-- arguments of the paradigms, not stems.
|
-- arguments of the paradigms.
|
||||||
--
|
--
|
||||||
-- The following modules are presupposed:
|
-- The following modules are presupposed:
|
||||||
|
|
||||||
resource ParadigmsGer = open (Predef=Predef), Prelude,
|
resource ParadigmsGer =
|
||||||
(Morpho=MorphoGer), SyntaxGer, ResourceGer in {
|
open Prelude, (Morpho=MorphoGer), SyntaxGer, ResourceGer in {
|
||||||
|
|
||||||
|
|
||||||
--2 Parameters
|
--2 Parameters
|
||||||
|
|||||||
@@ -13,13 +13,13 @@
|
|||||||
--
|
--
|
||||||
-- The main difference with $MorphoIta.gf$ is that the types
|
-- The main difference with $MorphoIta.gf$ is that the types
|
||||||
-- referred to are compiled resource grammar types. We have moreover
|
-- referred to are compiled resource grammar types. We have moreover
|
||||||
-- had the design principle of always having existing forms as string
|
-- had the design principle of always having existing forms, not stems, as string
|
||||||
-- arguments of the paradigms, not stems.
|
-- arguments of the paradigms.
|
||||||
--
|
--
|
||||||
-- The following modules are presupposed:
|
-- The following modules are presupposed:
|
||||||
|
|
||||||
resource ParadigmsIta =
|
resource ParadigmsIta =
|
||||||
open (Predef=Predef), Prelude, (Types = TypesIta), SyntaxIta, MorphoIta,
|
open Prelude, (Types = TypesIta), SyntaxIta, MorphoIta,
|
||||||
ResourceIta in {
|
ResourceIta in {
|
||||||
|
|
||||||
--2 Parameters
|
--2 Parameters
|
||||||
@@ -30,7 +30,15 @@ oper
|
|||||||
masculine : Gender ;
|
masculine : Gender ;
|
||||||
feminine : Gender ;
|
feminine : Gender ;
|
||||||
|
|
||||||
-- To abstract over case names, we define the following.
|
-- To abstract over number names, we define the following.
|
||||||
|
|
||||||
|
singular : Number ;
|
||||||
|
plural : Number ;
|
||||||
|
|
||||||
|
-- To abstract over case names, we define the following. (Except for
|
||||||
|
-- some pronouns, the accusative is equal to the nominative, the
|
||||||
|
-- dative is formed by the preposition "a", and the genitive by the
|
||||||
|
-- preposition "di".)
|
||||||
|
|
||||||
nominative : Case ;
|
nominative : Case ;
|
||||||
accusative : Case ;
|
accusative : Case ;
|
||||||
@@ -44,10 +52,6 @@ oper
|
|||||||
prep_su : Case ;
|
prep_su : Case ;
|
||||||
prep_con : Case ;
|
prep_con : Case ;
|
||||||
|
|
||||||
-- To abstract over number names, we define the following.
|
|
||||||
|
|
||||||
singular : Number ;
|
|
||||||
plural : Number ;
|
|
||||||
|
|
||||||
--2 Nouns
|
--2 Nouns
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
--
|
--
|
||||||
-- The main difference with $MorphoSwe.gf$ is that the types
|
-- The main difference with $MorphoSwe.gf$ is that the types
|
||||||
-- referred to are compiled resource grammar types. We have moreover
|
-- referred to are compiled resource grammar types. We have moreover
|
||||||
-- had the design principle of always having existing forms as string
|
-- had the design principle of always having existing forms, not stems, as string
|
||||||
-- arguments of the paradigms, not stems.
|
-- arguments of the paradigms.
|
||||||
--
|
--
|
||||||
-- The following modules are presupposed:
|
-- The following modules are presupposed:
|
||||||
|
|
||||||
@@ -195,8 +195,8 @@ oper
|
|||||||
nonmasculine = NoMasc ;
|
nonmasculine = NoMasc ;
|
||||||
nominative = Nom ;
|
nominative = Nom ;
|
||||||
genitive = Gen ;
|
genitive = Gen ;
|
||||||
-- singular defined in Types
|
singular = Sg ;
|
||||||
-- plural defined in Types
|
plural = Pl ;
|
||||||
|
|
||||||
mkN = \apa, apan, apor, aporna, g, x -> let
|
mkN = \apa, apan, apor, aporna, g, x -> let
|
||||||
{nom = table {
|
{nom = table {
|
||||||
|
|||||||
Reference in New Issue
Block a user