コード例 #1
0
    def testBOSSFoldTitles(self):
        """This algorithm queries BOSS, gathers each result's title and folds
        the title into synonyms."""

        boss = proxy.BOSS()
        results = boss.get_results(self.query)
        titles = [wordle.clean(result['title']) for result in results]

        folder = wordle.TitleFolder()
        synonyms = folder.get_synonyms(titles, self.query)

        pprint.pprint(synonyms)
コード例 #2
0
		def testClean(self):
				"""Test the clean function"""

				phrase = 'this!@/.is!-a-!phrase'
				assert 'this-is-a-phrase' == wordle.clean(phrase), wordle.clean(phrase)