def buildGrammar(self, chain):
     """build grammar.
     
     This stub generically iterates over the alphabet and
     calls self.addTransitions for each pair of letters.
     """
     ChainComponent.buildGrammar(self, chain)
     alphabet = self.mChainGenerator.getAlphabet()
     l = len(alphabet)
     for l1 in range(0, l - 1):
         a = alphabet[l1]
         for l2 in range(l1 + 1, l):
             self.addTransitions(chain, a, alphabet[l2])
Example #2
0
 def buildGrammar(self, chain):
     """build grammar.
     
     This stub generically iterates over the alphabet and
     calls self.addTransitions for each pair of letters.
     """
     ChainComponent.buildGrammar(self, chain)
     alphabet = self.mChainGenerator.getAlphabet()
     l = len(alphabet)
     for l1 in range(0, l - 1):
         a = alphabet[l1]
         for l2 in range(l1 + 1, l):
             self.addTransitions(chain, a, alphabet[l2])
 def buildGrammar(self, chain):
     """build grammar for chain by adding initial states."""
     ChainComponent.buildGrammar(self, chain)
Example #4
0
 def buildGrammar(self, chain):
     """build grammar for chain by adding initial states."""        
     ChainComponent.buildGrammar(self,chain)