入力を解析するためにProlog DCGを使用すると、文法の付随するBNFを持つことがうれしいです。例えば非終端記号の引数を持つBNFはありますか?
:として
BNF
<Sentence> ::= <Noun_phrase> <Verb_phrase>
<Noun_phrase> ::= <Determiner> <Noun>
<Verb_phrase> ::= <Verb> <Phrase>
<Determiner> ::= a
<Determiner> ::= the
<Noun> ::= cat
<Noun> ::= mouse
<Verb> ::= scares
<Verb> ::= hates
PrologのDCG
sentence --> noun_phrase, verb_phrase.
verb_phrase --> verb, noun_phrase.
noun_phrase --> determiner, noun.
determiner --> [a].
determiner --> [the].
noun --> [cat].
noun --> [mouse].
verb --> [scares].
verb --> [hates].
しかしPrologのDCGもsingular
かplural
Number
で
として引数を持つことができます
sentence(Number) --> noun_phrase(Number), verb_phrase(Number).
verb_phrase(Number) --> verb(Number), noun_phrase(Number).
noun_phrase(Number) --> determiner(Number), noun(Number).
determiner(singular) --> [a].
determiner(singular) --> [the].
determiner(plural) --> [the].
noun(singular) --> [cat].
noun(plural) --> [cats].
noun(singular) --> [mouse].
noun(plural) --> [mice].
verb(singular) --> [scares].
verb(plural) --> [scare].
verb(singular) --> [hates].
verb(plural) --> [hate].
非ターミナルの引数を含むBNFの標準または受け入れ拡張がありますか?
もしそうなら、私はそれへのリンクが必要です。
私は、ATN(Augmented Transition Networks)がボールパーク内にあり、唯一の標準的な答えかもしれないと思っていますが、私は、何らかの形の頂点/エッジグラフとは対照的に線形テキストを期待しています。
対象:[PrologコードでFSA、RTNなどを含む入門NLPコース](http://www.ccunix.ccu.edu.tw/~lngwujs/Courses/CL/NLP_prolog_Blackburn.pdf) –