예제 #1
0
if __name__ == "__main__":

    #name = u"Урлівська"
    #print add_streettype_to(change_streettype_place(name))

    # address = {}
    # shape_address(address,'15/4',u'Хрещатик/Заньковецкої')
    # for el in address:
    #     print el, address[el]


    #print translit("zhylianskaya", 'ru')

    from mytranslit import translit2ru, translit2uk
    print translit2ru("zhylianskaya")
    print translit2uk("Gogolevska")
    # TODO заменить гоголевску страду на Гоголівська вулиця
"""
    with open("filename.txt", "rb") as f:
        fmap = f.read()

        start = time.time()

        statfile = "statistics.csv"
        save_stats(statfile, get_stats(fmap))



        end = time.time()
        print "finished in %d seconds!" % (end-start)
예제 #2
0
 def test_translit2ru(self):
     self.assertEqual(translit2ru(u'zhylianskaya'), u'жилянская')
     self.assertEqual(translit2ru(u'Zhylianskaya'), u'Жилянская')
     self.assertEqual(translit2ru(u'gertsena'), u'герцена')