当前位置: 首页>>代码示例>>Python>>正文


Python BeerNameMatcher.match_name方法代码示例

本文整理汇总了Python中beernamematcher.BeerNameMatcher.match_name方法的典型用法代码示例。如果您正苦于以下问题:Python BeerNameMatcher.match_name方法的具体用法?Python BeerNameMatcher.match_name怎么用?Python BeerNameMatcher.match_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在beernamematcher.BeerNameMatcher的用法示例。


在下文中一共展示了BeerNameMatcher.match_name方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_la_trappe

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
    def test_la_trappe(self):
        beer_list = [
            {'name': u'La Trappe Witte Trappist'},
            {'name': u'La Trappe Blond'},
            {'name': u'La Trappe Isid’or'},
            {'name': u'La Trappe Tripel'},
            {'name': u'La Trappe Bockbier'},
            {'name': u'La Trappe Dubbel'},
        ]

        matcher = BeerNameMatcher(u'De Koningshoeven (Bavaria - Netherlands)', beer_list)

        matched = matcher.match_name(u'La Trappe Blond Trappist')
        self.assertEqual(u'La Trappe Blond', matched['name'])

        matched = matcher.match_name(u'La Trappe Isid\'or Trappist')
        self.assertEqual(u'La Trappe Isid’or', matched['name'])

        matched = matcher.match_name(u'La Trappe Tripel Trappist ')
        self.assertEqual(u'La Trappe Tripel', matched['name'])

        matched = matcher.match_name(u'La Trappe Dubbel Trappist')
        self.assertEqual(u'La Trappe Dubbel', matched['name'])

        matched = matcher.match_name(u'La Trappe Bockbier Trappistenbier')
        self.assertEqual(u'La Trappe Bockbier', matched['name'])
开发者ID:atlefren,项目名称:beertools,代码行数:28,代码来源:beernamematcher_test.py

示例2: test_dunkles_weizen

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例3: test_hop_it

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例4: test_soy_rodriguez

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例5: test_vuur_vlam

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例6: test_amber_brewery

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例7: test_red_hopster

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例8: test_semicolon

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例9: test_borgo

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例10: test_hanssens

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例11: test_sorting

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例12: test_oyster_stout

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例13: test_lagerol

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例14: test_marstons

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py

示例15: test_apostrophe

# 需要导入模块: from beernamematcher import BeerNameMatcher [as 别名]
# 或者: from beernamematcher.BeerNameMatcher import match_name [as 别名]
 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'])
开发者ID:atlefren,项目名称:beertools,代码行数:9,代码来源:beernamematcher_test.py


注:本文中的beernamematcher.BeerNameMatcher.match_name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。