Skip to content

Instantly share code, notes, and snippets.

@jasonbaker
Created October 7, 2011 20:59
Show Gist options
  • Save jasonbaker/1271338 to your computer and use it in GitHub Desktop.
Save jasonbaker/1271338 to your computer and use it in GitHub Desktop.
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