Esempio n. 1
0
    def testEventMatching(self):
        events = fetcher.getWikiFightByName()

        for event in events:

            eventname = event.name.encode('utf-8')
            fetchedEvent = fetcher.getEventPageFromName(eventname)[0].encode('utf-8')
            ratio = fetcher.compareStringSimilarity(eventname, fetchedEvent)

            if(ratio< 0.9):
                print eventname+" |\t | "+fetchedEvent+'|\t ratio:'+str(ratio)
Esempio n. 2
0
    def testCompareString(self):
        ratio  = fetcher.compareStringSimilarity('hello','hello')

        self.assertEqual(1,ratio)