Package pywikipedia :: Module solve_disambiguation :: Class DisambiguationRobot
[show private | hide private]
[frames | no frames]

Class DisambiguationRobot


Method Summary
  __init__(self, always, alternatives, getAlternatives, solve_redirect, page_list, primary, main_only)
  checkContents(self, text)
For a given text, returns False if none of the regular expressions given in the dictionary at the top of this class matches a substring of the text.
  listAlternatives(self)
  makeAlternativesUnique(self)
  run(self)
  treat(self, refpl, disambPl)
Parameters: disambPl - The disambiguation page or redirect we don't want anything to link on refpl - A page linking to disambPl Returns False if the user pressed q to completely quit the program.

Class Variable Summary
dict ignore_contents = {'de': (u'{{[Ii]nuse}}', u'{{[Ll]\xf6s...

Method Details

checkContents(self, text)

For a given text, returns False if none of the regular expressions given in the dictionary at the top of this class matches a substring of the text. Otherwise returns the substring which is matched by one of the regular expressions.

treat(self, refpl, disambPl)

Parameters:
    disambPl - The disambiguation page or redirect we don't want anything
             to link on
    refpl - A page linking to disambPl
Returns False if the user pressed q to completely quit the program.
Otherwise, returns True.

Class Variable Details

ignore_contents

Type:
dict
Value:
{'de': (u'{{[Ii]nuse}}', u'{{[Ll]\xf6schen}}')}                        

Generated by Epydoc 2.1 on Sun Jul 03 17:07:34 2005 http://epydoc.sf.net