mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
continuing with resource.txt
This commit is contained in:
@@ -4,7 +4,8 @@ This document is about the
|
|||||||
GF Resource Grammar Library. It presuppose knowledge of GF and its
|
GF Resource Grammar Library. It presuppose knowledge of GF and its
|
||||||
module system, knowledge that can be acquired e.g. from the GF
|
module system, knowledge that can be acquired e.g. from the GF
|
||||||
tutorial. We start with an introduction to the library, and proceed to
|
tutorial. We start with an introduction to the library, and proceed to
|
||||||
covering all that one needs to know in order to use the library.
|
details with the aim of covering all that one needs to know
|
||||||
|
in order to use the library.
|
||||||
How to write one's own resource grammar (i.e. implement the API for
|
How to write one's own resource grammar (i.e. implement the API for
|
||||||
a new language), is covered by a separate Resource-HOWTO document.
|
a new language), is covered by a separate Resource-HOWTO document.
|
||||||
|
|
||||||
@@ -473,23 +474,23 @@ the same tree.
|
|||||||
The following syntax tree of the Text "John walks." gives an overview
|
The following syntax tree of the Text "John walks." gives an overview
|
||||||
of the structural levels.
|
of the structural levels.
|
||||||
|
|
||||||
Node Constructor Type of subtree Alternative constructors
|
Node Constructor Value type Other constructors
|
||||||
|
-----------------------------------------------------------
|
||||||
1. TFullStop : Text TQuestMark
|
1. TFullStop Text TQuestMark
|
||||||
2. (PhrUtt : Phr
|
2. (PhrUtt Phr
|
||||||
3. NoPConj : PConj but_PConj
|
3. NoPConj PConj but_PConj
|
||||||
4. (UttS : Utt UttQS
|
4. (UttS Utt UttQS
|
||||||
5. (UseCl : S UseQCl
|
5. (UseCl S UseQCl
|
||||||
6. TPres : Tense TPast
|
6. TPres Tense TPast
|
||||||
7. ASimul : Anter AAnter
|
7. ASimul Anter AAnter
|
||||||
8. PPos : Pol PNeg
|
8. PPos Pol PNeg
|
||||||
9. (PredVP : Cl
|
9. (PredVP Cl
|
||||||
10. (UsePN : NP UsePron, DetCN
|
10. (UsePN NP UsePron, DetCN
|
||||||
11. john_PN) : PN mary_PN
|
11. john_PN) PN mary_PN
|
||||||
12. (UseV : VP ComplV2, ComplV3
|
12. (UseV VP ComplV2, ComplV3
|
||||||
13. walk_V)))) : V sleep_V
|
13. walk_V)))) V sleep_V
|
||||||
14. NoVoc) : Voc please_Voc
|
14. NoVoc) Voc please_Voc
|
||||||
15. TEmpty : Text
|
15. TEmpty Text
|
||||||
|
|
||||||
Here are some examples of the results of changing constructors.
|
Here are some examples of the results of changing constructors.
|
||||||
|
|
||||||
@@ -534,16 +535,17 @@ NPs and VPs. Here is a brief overview:
|
|||||||
|
|
||||||
Noun: How to construct NPs. The main three mechanisms
|
Noun: How to construct NPs. The main three mechanisms
|
||||||
for constructing NPs are
|
for constructing NPs are
|
||||||
|
|
||||||
- from proper names: John
|
- from proper names: John
|
||||||
- from pronouns: we
|
- from pronouns: we
|
||||||
- from common nouns by determiners: this man
|
- from common nouns by determiners: this man
|
||||||
|
|
||||||
The Noun module also defines the construction of common nouns. The most frequent ways are
|
|
||||||
|
|
||||||
|
The Noun module also defines the construction of common nouns. The most frequent ways are
|
||||||
- lexical noun items: man
|
- lexical noun items: man
|
||||||
- adjectival modification: old man
|
- adjectival modification: old man
|
||||||
- relative clause modification: man who sleeps
|
- relative clause modification: man who sleeps
|
||||||
|
- application of relational nouns: successor of the number
|
||||||
|
|
||||||
|
|
||||||
Verb: How to construct VPs. The main mechanism is verbs with their arguments, for instance,
|
Verb: How to construct VPs. The main mechanism is verbs with their arguments, for instance,
|
||||||
- one-place verbs: walks
|
- one-place verbs: walks
|
||||||
@@ -552,6 +554,7 @@ Verb: How to construct VPs. The main mechanism is verbs with their arguments, fo
|
|||||||
- sentence-complement verbs: says that it is cold
|
- sentence-complement verbs: says that it is cold
|
||||||
- VP-complement verbs: wants to give her a kiss
|
- VP-complement verbs: wants to give her a kiss
|
||||||
|
|
||||||
|
|
||||||
A special verb is the copula, "be" in English but not even realized
|
A special verb is the copula, "be" in English but not even realized
|
||||||
by a verb in all languages.
|
by a verb in all languages.
|
||||||
A copula can take different kinds of complement:
|
A copula can take different kinds of complement:
|
||||||
@@ -560,9 +563,14 @@ A copula can take different kinds of complement:
|
|||||||
- a noun phrase: (John is) a man
|
- a noun phrase: (John is) a man
|
||||||
|
|
||||||
|
|
||||||
Adjective: How to constuct APs.
|
Adjective: How to constuct APs. The main ways are
|
||||||
|
- positive forms of adjectives: old
|
||||||
|
- comparative forms with object of comparison: older than John
|
||||||
|
|
||||||
|
|
||||||
|
Adverb: How to construct Advs. The main ways are
|
||||||
|
- from adjectives: slowly
|
||||||
|
|
||||||
Adverb: How to construct Advs.
|
|
||||||
|
|
||||||
|
|
||||||
===Modules and their names===
|
===Modules and their names===
|
||||||
@@ -570,13 +578,13 @@ Adverb: How to construct Advs.
|
|||||||
The resource modules are named after the kind of phrases that are constructed in them,
|
The resource modules are named after the kind of phrases that are constructed in them,
|
||||||
and they can be roughly classified by the "level" or "size" of expressions that are
|
and they can be roughly classified by the "level" or "size" of expressions that are
|
||||||
formed in them:
|
formed in them:
|
||||||
|
|
||||||
- Larger than sentence: Text, Phrase
|
- Larger than sentence: Text, Phrase
|
||||||
- Same level as sentence: Sentence, Question, Relative
|
- Same level as sentence: Sentence, Question, Relative
|
||||||
- Parts of sentence: Adjective, Adverb, Noun, Verb
|
- Parts of sentence: Adjective, Adverb, Noun, Verb
|
||||||
- Cross-cut: Conjunction
|
- Cross-cut: Conjunction
|
||||||
|
|
||||||
Because of mutual recursion such as embedded sentences, this classification is
|
|
||||||
|
Because of mutual recursion such as in embedded sentences, this classification is
|
||||||
not a complete order. However, no mutual dependence is needed between the
|
not a complete order. However, no mutual dependence is needed between the
|
||||||
modules in a formal sense - they can all be compiled separately. This is due
|
modules in a formal sense - they can all be compiled separately. This is due
|
||||||
to the module Cat, which defines the type system common to the other modules.
|
to the module Cat, which defines the type system common to the other modules.
|
||||||
@@ -586,7 +594,8 @@ a rule such as
|
|||||||
|
|
||||||
Verb.ComplV2 : V2 -> NP -> VP
|
Verb.ComplV2 : V2 -> NP -> VP
|
||||||
|
|
||||||
it is enough to know the linearization type of NP (given in Cat), not what
|
it is enough to know the linearization type of NP (as well as those of V2 and VP, all
|
||||||
|
given in Cat). It is not necessary to know what
|
||||||
ways there are to build NPs (given in Noun), since all these ways must
|
ways there are to build NPs (given in Noun), since all these ways must
|
||||||
conform to the linearization type defined in Cat.
|
conform to the linearization type defined in Cat.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user