AceWiki Grammar
- Tobias Kuhn, 10 December 2010 -
Below, the grammar rules of the AceWiki grammar are shown:
Texts and Sentences
'text' stands for a complete text consisting of an arbitrary number of complete
sentences (including zero):
A complete sentence is represented by the category 'complete_sentence' and is either
a declarative sentence that ends with a full stop or a question ending with a question mark:
General sentences are represented by 'sentence':
Sentences can be coordinated using "or" ('sentence_coord_1') and "and"
('sentence_coord_2'):
Uncoordinated sentences are represented in two levels by 'simple_sentence_1' and
'simple_sentence_2':
(17) |
simple_sentence_2 | | |
~> |
np | case: nom | id: 4 | pl: 5 | plquant: 6 | qu: 1 | subj: – | whin: 2 | whout: 7 |
| |
vp_coord_1 | pl: 5 | plquant: 6 | qu: 1 | subj: 4 | whin: 7 | whout: 3 |
| |
Verb Phrases
Like sentences, verb phrases can be coordinated using "or" ('vp_coord_1') and "and"
('vp_coord_2'):
(18) |
vp_coord_1 | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
=> |
vp_coord_2 | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
(19) |
vp_coord_1 | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
~> |
// |
vp_coord_2 | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 5 | whout: 7 |
| |
[ or ] |
vp_coord_1 | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 7 | whout: 6 |
| |
(20) |
vp_coord_2 | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
=> |
vp | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
(21) |
vp_coord_2 | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
=> |
vp | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 5 | whout: 7 |
| |
[ and ] |
vp_coord_2 | pl: 1 | plquant: 2 | qu: 3 | subj: 4 | whin: 7 | whout: 6 |
| |
Uncoordinated verb phrases represented by 'vp' can use an auxiliary verb:
(22) |
vp | exist: 1 | pl: 2 | plquant: 3 | qu: 4 | rel: 5 | subj: 6 | whin: 7 | whout: 8 |
| |
~> |
aux | | |
v | be: 9 | exist: 1 | pl: 2 | plquant: 3 | qu: 4 | rel: 5 | subj: 6 | vform: inf | whin: 7 | whout: 8 |
| |
(23) |
vp | exist: + | pl: 1 | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
~> |
v | be: – | exist: + | pl: 1 | qu: 2 | rel: 3 | subj: 4 | vform: fin | whin: 5 | whout: 6 |
| |
The category 'v' represents the main verb or - if "be" is used as a copula verb - the
complementing noun phrase or adjective complement:
(24) |
v | be: – | copula: – | exist: 1 | pl: 2 | vform: 3 | whin: 4 | whout: 4 |
| |
=> |
verb | be: – | exist: 1 | pl: 2 | vcat: itr | vform: 3 |
| |
(25) |
v | be: – | copula: – | embv: 1 | exist: 2 | pl: 3 | qu: 4 | rel: 5 | subj: 6 | vform: 7 | whin: 8 | whout: 9 |
| |
=> |
verb | be: – | exist: 2 | pl: 3 | vcat: tr | vform: 7 |
| |
np | case: acc | embv: 1 | qu: 4 | rel: 5 | subj: 6 | vcat: tr | whin: 8 | whout: 9 |
| |
(26) |
v | be: + | copula: – | embv: 1 | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
=> |
verb | | |
np | case: acc | copula: – | embv: 1 | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
(27) |
v | be: + | copula: + | embv: 1 | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
=> |
np | case: acc | copula: + | embv: 1 | of: + | pl: – | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
(28) |
v | be: + | copula: + | embv: 1 | plquant: – | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
=> |
np | case: acc | copula: + | embv: 1 | of: – | pl: – | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
(29) |
v | be: + | copula: + | embv: 1 | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
=> |
tradj |
np | case: acc | copula: – | embv: 1 | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
Noun Phrases
Noun phrases are represented by 'np' and can consist of proper names, variables,
pronouns, and different noun constructs:
(30) |
np | def: + | embv: 1 | exist: + | id: 2 | of: – | pl: – | qu: 3 | rel: 4 | whin: 5 | whout: 6 |
| |
=> |
propername | gender: 7 | human: 8 | text: 2 |
| |
>> | gender: 7 | hasvar: – | human: 8 | id: 2 | type: prop |
| |
relcl | embv: 1 | human: 8 | qu: 3 | rel: 4 | subj: 2 | whin: 5 | whout: 6 |
| |
(31) |
np | def: + | exist: + | id: 1 | of: – | pl: – | whin: 2 | whout: 2 |
| |
=> |
# | 1 |
newvar | | |
> | hasvar: + | id: 1 | type: var | var: 3 |
| |
(32) |
np | def: + | exist: + | id: 1 | of: – | pl: – | whin: 2 | whout: 2 |
| |
=> |
defnoun | | |
reference | | |
< | gender: 5 | hasvar: + | human: 6 | id: 1 | noun: 3 | type: noun | var: 4 |
| |
> | gender: 5 | hasvar: – | human: 6 | id: 1 | type: ref |
| |
(33) |
np | def: + | exist: + | id: 1 | of: – | pl: – | whin: 2 | whout: 2 |
| |
=> |
defnoun | | |
< | gender: 4 | human: 5 | id: 1 | noun: 3 | type: noun |
| |
> | gender: 4 | hasvar: – | human: 5 | id: 1 | type: ref |
| |
(34) |
np | def: + | exist: + | id: 1 | of: – | pl: – | whin: 2 | whout: 2 |
| |
=> |
reference | | |
< | gender: 4 | hasvar: + | human: 5 | id: 1 | var: 3 |
| |
> | gender: 4 | hasvar: – | human: 5 | id: 1 | type: ref |
| |
(35) |
np | embv: 1 | exist: 2 | id: 3 | of: 4 | pl: – | qu: 5 | rel: 6 | subj: 7 | whin: 8 | whout: 9 |
| |
=> |
quant | | |
nc | embv: 1 | id: 3 | of: 4 | qu: 5 | rel: 6 | subj: 7 | whin: 8 | whout: 9 |
| |
(36) |
np | embv: 1 | exist: 2 | id: 3 | of: – | pl: – | qu: 4 | rel: 5 | whin: 6 | whout: 7 |
| |
=> |
# | 3 |
ipron | | |
opt_newvar | | |
> | hasvar: 9 | human: 8 | id: 3 | type: ipron | var: 10 |
| |
relcl | embv: 1 | human: 8 | qu: 4 | rel: 5 | subj: 3 | whin: 6 | whout: 7 |
| |
(38) |
np | copula: – | exist: + | id: 1 | of: – | pl: – | whin: 2 | whout: 2 |
| |
=> |
num_quant |
[ 1 ] |
# | 1 |
noun | gender: 3 | human: 4 | text: 5 |
| |
> | gender: 3 | hasvar: – | human: 4 | id: 1 | noun: 5 | type: noun |
| |
(39) |
np | exist: + | id: 1 | of: – | pl: – | qu: + | whin: – | whout: + |
| |
=> |
# | 1 |
[ what ] |
> | hasvar: – | human: – | id: 1 | type: wh |
| |
(40) |
np | exist: + | id: 1 | of: – | pl: – | qu: + | whin: – | whout: + |
| |
=> |
# | 1 |
[ who ] |
> | hasvar: – | human: + | id: 1 | type: wh |
| |
(41) |
np | embv: 1 | exist: + | id: 2 | of: 3 | pl: – | qu: + | rel: 4 | subj: 5 | whin: – | whout: + |
| |
=> |
[ which ] |
nc | embv: 1 | id: 2 | of: 3 | qu: + | rel: 4 | subj: 5 | whin: + | whout: + |
| |
(42) |
np | exist: + | id: 1 | of: – | pl: + | plquant: – | qu: + | whin: – | whout: + |
| |
=> |
[ which ] |
# | 1 |
nounpl |
The category 'nc' represents nouns optionally followed by variables, relative clauses,
and of-constructs:
(43) |
nc | embv: 1 | id: 2 | of: – | qu: 3 | rel: 4 | whin: 5 | whout: 6 |
| |
=> |
n | gender: 7 | human: 8 | id: 2 | text: 9 |
| |
opt_newvar | | |
> | gender: 7 | hasvar: 10 | human: 8 | id: 2 | noun: 9 | type: noun | var: 11 |
| |
relcl | embv: 1 | human: 8 | qu: 3 | rel: 4 | subj: 2 | whin: 5 | whout: 6 |
| |
(44) |
nc | embv: 1 | of: + | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
~> |
nounof |
np | case: acc | embv: 1 | qu: 2 | rel: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
The category 'n' stands for nouns:
(45) |
n | gender: 1 | human: 2 | id: 3 | text: 4 |
| |
=> |
# | 3 |
noun | gender: 1 | human: 2 | text: 4 |
| |
New variables, optional and mandatory, are represented by 'opt_newvar' and 'newvar',
respectively:
Relative Clauses
Relative clauses are represented by 'relcl'. They start with a relative pronoun and
are always optional:
(50) |
relcl | embv: + | human: 1 | qu: 2 | rel: + | subj: 3 | whin: 4 | whout: 5 |
| |
=> |
relpron | | |
relcl1 | human: 1 | qu: 2 | relpron: 6 | subj: 3 | whin: 4 | whout: 5 |
| |
Like sentences and verb phrases, relative clauses can be coordinated by "or"
('relcl1') and "and" ('relcl2'):
(51) |
relcl1 | human: 1 | qu: 2 | relpron: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
~> |
// |
relcl2 | human: 1 | qu: 2 | rel: – | relpron: 3 | subj: 4 | whin: 5 | whout: 7 |
| |
or_relpron | | |
relcl1 | human: 1 | qu: 2 | relpron: 3 | subj: 4 | whin: 7 | whout: 6 |
| |
(52) |
relcl1 | human: 1 | qu: 2 | relpron: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
=> |
relcl2 | human: 1 | qu: 2 | relpron: 3 | subj: 4 | whin: 5 | whout: 6 |
| |
(53) |
relcl2 | human: 1 | qu: 2 | rel: 3 | relpron: 4 | subj: 5 | whin: 6 | whout: 7 |
| |
=> |
vp | pl: – | qu: 2 | rel: – | subj: 5 | whin: 6 | whout: 8 |
| |
and_relpron | | |
relcl2 | human: 1 | qu: 2 | rel: 3 | relpron: 4 | subj: 5 | whin: 8 | whout: 7 |
| |
(54) |
relcl2 | qu: 1 | rel: 2 | subj: 3 | whin: 4 | whout: 5 |
| |
=> |
vp | pl: – | qu: 1 | rel: 2 | subj: 3 | whin: 4 | whout: 5 |
| |
(55) |
relcl2 | qu: 1 | subj: 2 | whin: 3 | whout: 4 |
| |
~> |
np | case: nom | copula: – | pl: 5 | qu: 1 | refl: – | rel: – | subj: 2 | whin: 3 | whout: 4 |
| |
aux | | |
verb | be: – | exist: 6 | pl: 5 | vcat: tr | vform: inf |
| |
(56) |
relcl2 | qu: 1 | subj: 2 | whin: 3 | whout: 4 |
| |
~> |
np | case: nom | copula: – | pl: 5 | qu: 1 | refl: – | rel: – | subj: 2 | whin: 3 | whout: 4 |
| |
verb | be: – | exist: + | pl: 5 | vcat: tr | vform: fin |
| |
Relative pronouns are represented by 'relpron' and can be either "that", "who" or
"which":
The categories 'or_relpron' and 'and_relpron' define shortcuts - like "or that" as
one token - for better usability inside of the predictive editor:
Verbs
The category 'verb' represents main verbs:
Auxiliary verbs are represented by 'aux', which includes negation markers:
(73) |
aux | | |
=> |
// |
[ is not ] |
(74) |
aux | | |
=> |
// |
[ is ] |
[ not ] |
(76) |
aux | | |
=> |
// |
[ are not ] |
(77) |
aux | | |
=> |
// |
[ are ] |
[ not ] |
(78) |
aux | | |
=> |
// |
[ does not ] |
(79) |
aux | | |
=> |
// |
[ do not ] |
Quantifiers
Existential and universal quantifiers are represented by 'quant':
(82) |
quant | | |
=> |
// |
[ every ] |
The category 'num_quant' stands for numerical quantifiers:
Indefinite Pronouns
Indefinite pronouns are represented by 'ipron':
(89) |
ipron | | |
=> |
[ something ] |
(90) |
ipron | | |
=> |
[ somebody ] |
(91) |
ipron | | |
=> |
// |
[ everything ] |
(92) |
ipron | | |
=> |
// |
[ everybody ] |
(93) |
ipron | | |
=> |
// |
[ nothing ] |
(94) |
ipron | | |
=> |
// |
[ nobody ] |