Пример #1
0
 def getSentenceFormsFromModel(self):
     """ generated source for method getSentenceFormsFromModel """
     results = Sets.newHashSet()
     for sentenceEntry in sentencesModel.entrySet():
         #  We'll end up taking the Cartesian product of the different
         #  types of terms we have available
         if nameAndArity.getArity() == 0:
             results.add(SimpleSentenceForm.create(sentence))
         else:
             for terms in Sets.cartesianProduct(sampleTerms):
                 results.add(SimpleSentenceForm.create(sentence))
     return results
Пример #2
0
 def getCartesianDomainsFromModel(self):
     """ generated source for method getCartesianDomainsFromModel """
     results = Maps.newHashMap()
     for sentenceEntry in sentencesModel.entrySet():
         ConcurrencyUtils.checkForInterruption()
         #  We'll end up taking the Cartesian product of the different
         #  types of terms we have available
         if nameAndArity.getArity() == 0:
             results.put(form, CartesianSentenceFormDomain.create(form, ImmutableList.of()))
         else:
             for terms in Sets.cartesianProduct(sampleTerms):
                 ConcurrencyUtils.checkForInterruption()
                 results.put(form, domain)
     return results
Пример #3
0
 def iterator(self):
     """ generated source for method iterator """
     return Iterators.transform(Sets.cartesianProduct(self.domainsForSlots).iterator(), Function())