Created
October 7, 2011 20:59
-
-
Save jasonbaker/1271338 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parseDisambiguation(self, introtext, categories): | |
''' | |
Some Disambiguation Pages use a category to denote their purpose, | |
while some just use "Title may refer to:" with hardcoded lists | |
''' | |
if self._match_categories(categories, ('disambiguation',)): | |
return True | |
title = self.article.decode('utf8') | |
if introtext.startswith('%s may refer to:' % title): | |
return True | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment