forked from GitHub/gf-rgl
documented Combinators
This commit is contained in:
10
index.txt
10
index.txt
@@ -24,13 +24,15 @@ give some introduction to this idea.
|
|||||||
This library covers basic linguistic structures of
|
This library covers basic linguistic structures of
|
||||||
different languages.
|
different languages.
|
||||||
|
|
||||||
[Version 1.0 resource-1.0/doc] released 22 June 2006.
|
[Version 1.1 resource-1.0/doc] released 22 December 2006
|
||||||
|
(enhanced version of 1.0).
|
||||||
Covers Danish, English, Finnish, French, German, Italian, Norwegian,
|
Covers Danish, English, Finnish, French, German, Italian, Norwegian,
|
||||||
Russian, Spanish, and Swedish.
|
Russian, Spanish, and Swedish.
|
||||||
|
|
||||||
[Version 0.9 resource/].
|
Two older versions are also available:
|
||||||
|
[Version 0.9 resource/]
|
||||||
[Version 0.6 resource-0.6/]. Old version with 7 languages.
|
and
|
||||||
|
[Version 0.6 resource-0.6/].
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ RTS=+RTS -M800M -K100M
|
|||||||
RTSS=+RTS -M1000M -K100M
|
RTSS=+RTS -M1000M -K100M
|
||||||
|
|
||||||
#may need this on amd64
|
#may need this on amd64
|
||||||
#RTS=+RTS -M2000M -K200M
|
RTS=+RTS -M2000M -K200M
|
||||||
#RTSS=+RTS -M2000M -K200M
|
RTSS=+RTS -M2000M -K200M
|
||||||
|
|
||||||
GFCA=$(GF) -nocf
|
GFCA=$(GF) -nocf
|
||||||
GFCC=$(GF) -nocf -make
|
GFCC=$(GF) -nocf -make
|
||||||
@@ -47,9 +47,9 @@ langs:
|
|||||||
echo "s ;; pm | wf langs.gfcm" | $(GFCA) -path=alltenses:prelude ../alltenses/Lang???.gfc $(RTSS)
|
echo "s ;; pm | wf langs.gfcm" | $(GFCA) -path=alltenses:prelude ../alltenses/Lang???.gfc $(RTSS)
|
||||||
|
|
||||||
api:
|
api:
|
||||||
$(GFC) api/Constructors???.gf
|
$(GFCC) api/Constructors???.gf
|
||||||
$(GFC) api/Combinators???.gf
|
$(GFCC) api/Combinators???.gf
|
||||||
$(GFC) api/Symbolic???.gf
|
$(GFCC) api/Symbolic???.gf
|
||||||
cp -p api/*.gfc api/*.gfr ../api
|
cp -p api/*.gfc api/*.gfr ../api
|
||||||
|
|
||||||
present:
|
present:
|
||||||
|
|||||||
@@ -1,7 +1,86 @@
|
|||||||
|
--1 Combinators: a High-Level Syntax API
|
||||||
|
|
||||||
|
-- This module defines some "grammatical functions" that give shortcuts to
|
||||||
|
-- typical constructions. [``Constructors`` Constructors.html] and the
|
||||||
|
-- language-specific ``Paradigms`` modules are usually needed
|
||||||
|
-- to construct arguments of these functions.
|
||||||
|
|
||||||
incomplete resource Combinators = open Grammar in {
|
incomplete resource Combinators = open Grammar in {
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
|
--2 Predication
|
||||||
|
|
||||||
|
pred : overload {
|
||||||
|
pred : V -> NP -> Cl ;
|
||||||
|
pred : V2 -> NP -> NP -> Cl ;
|
||||||
|
pred : V3 -> NP -> NP -> NP -> Cl ;
|
||||||
|
pred : V -> NP -> NP -> Cl ;
|
||||||
|
pred : A -> NP -> Cl ;
|
||||||
|
pred : A2 -> NP -> NP -> Cl ;
|
||||||
|
pred : A -> NP -> NP -> Cl ;
|
||||||
|
pred : N -> NP -> Cl ;
|
||||||
|
pred : CN -> NP -> Cl ;
|
||||||
|
pred : NP -> NP -> Cl ;
|
||||||
|
pred : N -> NP -> NP -> Cl ;
|
||||||
|
pred : Adv -> NP -> Cl ;
|
||||||
|
pred : Prep -> NP -> NP -> Cl
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--2 Function application
|
||||||
|
|
||||||
|
app : overload {
|
||||||
|
app : N -> NP ;
|
||||||
|
app : N2 -> NP -> NP ;
|
||||||
|
app : N3 -> NP -> NP -> NP ;
|
||||||
|
app : N2 -> NP -> NP -> NP ;
|
||||||
|
app : N2 -> N -> CN
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--2 Coordination
|
||||||
|
|
||||||
|
coord : overload {
|
||||||
|
coord : Conj -> Adv -> Adv -> Adv ;
|
||||||
|
coord : Conj -> AP -> AP -> AP ;
|
||||||
|
coord : Conj -> NP -> NP -> NP ;
|
||||||
|
coord : Conj -> S -> S -> S ;
|
||||||
|
coord : DConj -> Adv -> Adv -> Adv ;
|
||||||
|
coord : DConj -> AP -> AP -> AP ;
|
||||||
|
coord : DConj -> NP -> NP -> NP ;
|
||||||
|
coord : DConj -> S -> S -> S ;
|
||||||
|
coord : Conj -> ListAdv -> Adv ;
|
||||||
|
coord : Conj -> ListAP -> AP ;
|
||||||
|
coord : Conj -> ListNP -> NP ;
|
||||||
|
coord : Conj -> ListS -> S ;
|
||||||
|
coord : DConj -> ListAdv -> Adv ;
|
||||||
|
coord : DConj -> ListAP -> AP ;
|
||||||
|
coord : DConj -> ListNP -> NP ;
|
||||||
|
coord : DConj -> ListS -> S
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--2 Modification
|
||||||
|
|
||||||
|
mod : overload {
|
||||||
|
mod : A -> N -> CN ;
|
||||||
|
mod : AP -> CN -> CN ;
|
||||||
|
mod : AdA -> A -> AP ;
|
||||||
|
mod : Quant -> N -> NP ;
|
||||||
|
mod : Quant -> CN -> NP ;
|
||||||
|
mod : Predet -> N -> NP ;
|
||||||
|
mod : Numeral -> N -> NP
|
||||||
|
|
||||||
|
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--2 Text append
|
||||||
|
|
||||||
|
-- This is not in ground API, because it would destroy parsing.
|
||||||
|
|
||||||
|
appendText : Text -> Text -> Text ;
|
||||||
|
|
||||||
|
--.
|
||||||
|
|
||||||
pred = overload {
|
pred = overload {
|
||||||
pred : V -> NP -> Cl
|
pred : V -> NP -> Cl
|
||||||
= \v,np -> PredVP np (UseV v) ;
|
= \v,np -> PredVP np (UseV v) ;
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
--1 Symbolic: Noun Phrases with mathematical symbols
|
||||||
|
|
||||||
incomplete resource Symbolic = open Symbol, Grammar in {
|
incomplete resource Symbolic = open Symbol, Grammar in {
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
|||||||
Reference in New Issue
Block a user