ieml/tools.py
def _build_pools(self):
        """
        Slow method, retrieve all the terms from the database.
        :return:
        """
        if self.level >= Topic:
            # words
            self.topics_pool = set(self.topic() for i in range(self.pool_size))

        if self.level >= Fact:
            # sentences
            self.facts_pool = set(self.fact() for i in range(self.pool_size))

        if self.level >= Theory:
            self.theories_pool = set(self.theory() for i in range(self.pool_size))

        if self.level >= Text:
            self.propositions_pool = set(chain.from_iterable((self.topics_pool, self.facts_pool, self.theories_pool)))
def _build_pools(self):
        """
        Slow method, retrieve all the terms from the database.
        :return:
        """
        if self.level >= Topic:
            # words
            self.topics_pool = set(self.topic() for i in range(self.pool_size))

        if self.level >= Fact:
            # sentences
            self.facts_pool = set(self.fact() for i in range(self.pool_size))

        if self.level >= Theory:
            self.theories_pool = set(self.theory() for i in range(self.pool_size))

        if self.level >= Text:
            self.propositions_pool = set(chain.from_iterable((self.topics_pool, self.facts_pool, self.theories_pool)))
def _build_pools ( self ) : if self . level >= Topic : # words self . topics_pool = set ( self . topic ( ) for i in range ( self . pool_size ) ) if self . level >= Fact : # sentences self . facts_pool = set ( self . fact ( ) for i in range ( self . pool_size ) ) if self . level >= Theory : self . theories_pool = set ( self . theory ( ) for i in range ( self . pool_size ) ) if self . level >= Text : self . propositions_pool = set ( chain . from_iterable ( ( self . topics_pool , self . facts_pool , self . theories_pool ) ) )
Slow method, retrieve all the terms from the database.
        :return:
Slow method retrieve all the terms from the database . : return :