本文整理汇总了Python中beernamematcher.BeerNameMatcher类的典型用法代码示例。如果您正苦于以下问题:Python BeerNameMatcher类的具体用法?Python BeerNameMatcher怎么用?Python BeerNameMatcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BeerNameMatcher类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_dunkles_weizen
def test_dunkles_weizen(self):
beer_list = [
{'name': u'Coisbo Pinnekjøttøl Dunkles Weizen'}
]
matcher = BeerNameMatcher(u'Coisbo Beer', beer_list)
matched = matcher.match_name(u'Coisbo Weissbier Pinnekjøt-øl')
self.assertEqual(u'Coisbo Pinnekjøttøl Dunkles Weizen', matched['name'])
示例2: test_soy_rodriguez
def test_soy_rodriguez(self):
beer_list = [
{'name': u'Edge Brewing Soy Rodríguez', 'abv': 5.3}
]
matcher = BeerNameMatcher(u'Edge Brewing Barcelona', beer_list)
matched = matcher.match_name(u'Edge Soy Rodriguez Rye IPA')
self.assertEqual(u'Edge Brewing Soy Rodríguez', matched['name'])
示例3: test_hop_it
def test_hop_it(self):
beer_list = [
{'name': u'Urthel Hop-it'}
]
matcher = BeerNameMatcher(u'Microbrouwerij Urthel', beer_list)
matched = matcher.match_name(u'Urthel Hop-It Superior Hoppig Blond')
self.assertEqual(u'Urthel Hop-it', matched['name'])
示例4: test_amber_brewery
def test_amber_brewery(self):
beer_list = [
{'name': u'Amber Złote Lwy'}
]
matcher = BeerNameMatcher(u'Browar Amber', beer_list)
matched = matcher.match_name(u'Zlote LWY Lys')
self.assertEqual(u'Amber Złote Lwy', matched['name'])
示例5: test_vuur_vlam
def test_vuur_vlam(self):
beer_list = [
{'name': u'De Molen Vuur & Vlam (Fire & Flames)'}
]
matcher = BeerNameMatcher(u'Brouwerij de Molen', beer_list)
matched = matcher.match_name(u'Brouwerij de Molen Vuur Vlam')
self.assertEqual(u'De Molen Vuur & Vlam (Fire & Flames)', matched['name'])
示例6: test_semicolon
def test_semicolon(self):
beer_list = [
{'name': u'Fantôme Artist: Gaelle Boulanger'}
]
matcher = BeerNameMatcher(u'Brasserie Fantôme ', beer_list)
matched = matcher.match_name(u'Fantome Artist')
self.assertEqual(u'Fantôme Artist: Gaelle Boulanger', matched['name'])
示例7: test_red_hopster
def test_red_hopster(self):
beer_list = [
{'name': u'Lindheim Red Hopster'}
]
matcher = BeerNameMatcher(u'Lindheim Ølkompani', beer_list)
matched = matcher.match_name(u'Lindheim Red Hopster Imperial Red Ale')
self.assertEqual(u'Lindheim Red Hopster', matched['name'])
示例8: test_hanssens
def test_hanssens(self):
beer_list = [
{'name': u'Hanssens Oude Schaarbeekse Kriek'}
]
matcher = BeerNameMatcher(u'Hanssens Artisanaal', beer_list)
matched = matcher.match_name(u'Hanssens Oude Kriek Handgeplukte Schaerbeekske Krieken')
self.assertEqual(u'Hanssens Oude Schaarbeekse Kriek', matched['name'])
示例9: test_borgo
def test_borgo(self):
beer_list = [
{'name': u'Birra del Borgo Re Ale'}
]
matcher = BeerNameMatcher(u'Birra del Borgo', beer_list)
matched = matcher.match_name(u'Birra del Borga ReAle')
self.assertEqual(u'Birra del Borgo Re Ale', matched['name'])
示例10: test_oyster_stout
def test_oyster_stout(self):
beer_list = [
{'name': u'Ægir / Garage Project First Wave'}
]
matcher = BeerNameMatcher(u'Ægir Bryggeri', beer_list)
matched = matcher.match_name(u'Garage Project/Ægir Bryggeri First Wave Oyster Stout')
self.assertEqual(u'Ægir / Garage Project First Wave', matched['name'])
示例11: test_sorting
def test_sorting(self):
beer_list = [
{'name': u'CAP Jernteppet Hammerfest'}
]
matcher = BeerNameMatcher(u'CAP Brewery', beer_list)
matched = matcher.match_name(u'CAP Hammerfest Jernteppet Pale Ale')
self.assertEqual(u'CAP Jernteppet Hammerfest', matched['name'])
示例12: test_lagerol
def test_lagerol(self):
beer_list = [
{'name': u'Rådanäs Lageröl'}
]
matcher = BeerNameMatcher(u'Rådanäs Bryggeri', beer_list)
matched = matcher.match_name(u'Rådanäs Lager')
self.assertEqual(u'Rådanäs Lageröl', matched['name'])
示例13: test_marstons
def test_marstons(self):
beer_list = [
{'name': u'Marstons Old Empire (Bottle)'}
]
matcher = BeerNameMatcher(u'Marstons', beer_list)
matched = matcher.match_name(u'Marston\'s Old Empire IPA')
self.assertEqual(u'Marstons Old Empire (Bottle)', matched['name'])
示例14: test_apostrophe
def test_apostrophe(self):
beer_list = [
{'name': u'Fuller’s 1845'}
]
matcher = BeerNameMatcher(u'Fuller’s', beer_list)
matched = matcher.match_name(u'Fuller`s 1845')
self.assertEqual(u'Fuller’s 1845', matched['name'])
示例15: test_herb
def test_herb(self):
beer_list = [
{'name': u'Szigeti Beer'}
]
matcher = BeerNameMatcher(u'Sektkellerei Gebrüder Szigeti', beer_list)
matched = matcher.match_name(u'Szigeti Beer Herb')
self.assertEqual(u'Szigeti Beer', matched['name'])