Is there a simple way to switch the order of a CFG using nltk?

后端 未结 0 1697
梦谈多话
梦谈多话 2021-01-28 04:02

I am using python and CFG from nltk and importing a grammar like this:

grammar = CFG.fromstring("""
S -> NP VP
NP -> Det N 
PP -> P NP
VP          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题