Balise : Éditeur de wikicode 2017 |
|
(6 versions intermédiaires par 2 utilisateurs non affichées) |
Ligne 1 : |
Ligne 1 : |
|
| |
| == en construction ==
| |
| [[Catégorie:Vocabulary]]
| |
| [[Catégorie:Traitement du langage naturel]]
| |
| [[Catégorie:UNSW]]
| |
|
| |
|
| |
| == Définition == | | == Définition == |
| xxxxxxx
| | Une grammaire augmentée est ce que vous obtenez si vous prenez des règles de grammaire (généralement à partir d'une grammaire sans contexte) et leur ajoutez des informations supplémentaires, généralement sous la forme d'informations sur les fonctionnalités. |
|
| |
|
| == Français == | | == Français == |
| xxxxxxx
| | '''Grammaire augmentée''' |
| | | |
| == Anglais == | | == Anglais == |
| '''augmented grammar''' | | '''Augmented grammar''' |
|
| |
|
| An augmented grammar is what you get if you take grammar rules (usually from a context-free grammar) and add extra information to them, usually in the form of feature information. For example, the grammar rule s → np vp can be augmented by adding feature information to indicate that say the '''agr''' feature for the vp and the np must agree:<center>s('''agr'''(?agr)) → np('''agr'''(?agr)) vp('''agr'''(?agr))</center>In Prolog, we would write something like:
| |
| s(P1, P3, Agr) :- np(P1, P2, Agr), vp(P2, P3, Agr).
| |
| Actually, this is too tough - the '''agr''' feature of a VP, in particular, is usually fairly ambiguous - for example the verb "love" (and so any VP of which it is the main verb) has '''agr'''=[1s,2s,1p,2p,3p], and we would want it to agree with the NP "we" which has '''agr'''=[1p]. This can be achieved by computing the intersection of the '''agr''' of the NP and the VP and setting the '''agr''' of the S to be this intersection, provided it is non-empty. If it is empty, then the S goal should not succeed.
| |
| s(P1, P3, SAgr) :-
| |
| np(P1, P2, NPAgr),
| |
| vp(P1, P2, VPAgr),
| |
| intersection(NPAgr, VPAgr, SAgr),
| |
| nonempty(SAgr).
| |
| where <code>intersection</code> computes the intersection of two lists (regarded as sets) and binds the third argument to this intersection, and <code>nonempty</code> succeeds if its argument is not the empty list.
| |
|
| |
|
| Augmented grammar rules are also used to record '''sem''' and '''var''' features in computing logical forms, and to express the relationship between the '''sem''' and '''var''' of the left-hand side and the '''sem'''(s) and '''var'''(s) of the right-hand side. For example, for the rule vp → v (i.e. an intransitive verb), the augmented rule with '''sem''' feature could be:
| | ==Sources== |
|
| |
|
| vp('''sem'''(lambda(X, ?semv(?varv, X))), '''var'''(?varv)) →
| | [http://www.cse.unsw.edu.au/~billw/nlpdict.html Source : UNWS Natural Language Processing Dictionary ] |
|
| |
|
| v('''subcat'''(none), '''sem'''(?semv), '''var'''(?varv))
| | [[Catégorie:GRAND LEXIQUE FRANÇAIS]] |
| | |
| where '''subcat''' none indicates that this only works with an intransitive verb.
| |
| | |
| | |
| <small>
| |
| | |
| [http://www.cse.unsw.edu.au/~billw/nlpdict.html Source : UNWS Natural Language Processing Dictionary ] | |