問題タブ [nltk-book]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
13 参照

python - NLTK で文法を作成する

Python で NLTK ライブラリの cfg 文法を書いています。

この文法機能が必要です:

結果は次のとおりです。

ここで、別の文法機能を使用して、値の x と y の代わりに挿入したいと考えています。私はこのように試しましたが、うまくいきません:

他の文法機能で x と y を挿入するにはどうすればよいですか?