You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to find terms on Wikipedia that are specifically unambiguous so I was hoping that I could detect ambiguity by just catching the DisambiguationError, but it seems there are some cases where this doesn't work. Can someone explain the following example? Why isn't Acceleration being caught as ambiguous unless I specifically look for the disambiguation page?
>>>wikipedia.summary("Bert", auto_suggest=False)
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/util.py", line28, in__call__ret=self._cache[key] =self.fn(*args, **kwargs)
File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/wikipedia.py", line231, insummarypage_info=page(title, auto_suggest=auto_suggest, redirect=redirect)
File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/wikipedia.py", line276, inpagereturnWikipediaPage(title, redirect=redirect, preload=preload)
File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/wikipedia.py", line299, in__init__self.__load(redirect=redirect, preload=preload)
File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/wikipedia.py", line393, in__loadraiseDisambiguationError(getattr(self, 'title', page['title']), may_refer_to)
wikipedia.exceptions.DisambiguationError: "Bert"mayreferto:
Bert (name)
Bert (SesameStreet)
Bert (horse)
Bert (MaryPoppins)
IronBertBerdBert, AllierBert, WestVirginiaQ*bertBiterrorratetestBiterrorratetesterBert (TVseries)
HPBertBERT (languagemodel)
HereComesaSongAllpageswithtitlesbeginningwithBertBertDiariesBirt (disambiguation)
Burt (disambiguation)
>>>wikipedia.summary("Acceleration", auto_suggest=False)
"Inmechanics, accelerationistherateofchangeofthevelocityofanobjectwithrespecttotime. Accelerationsarevectorquantities (inthattheyhavemagnitudeanddirection). Theorientationofanobject's acceleration is given by the orientation of the net force acting on that object. The magnitude of an object'sacceleration, asdescribedbyNewton's Second Law, is the combined effect of two causes:\n\nthe net balance of all external forces acting onto that object — magnitude is directly proportional to this net resulting force;\nthat object'smass, dependingonthematerialsoutofwhichitismade — magnitudeisinverselyproportionaltotheobject's mass.The SI unit for acceleration is metre per second squared (m⋅s−2, \n\n\n\n\n\n\n m\n\n s\n\n 2\n\n\n\n\n\n\n\n {\\displaystyle {\\tfrac {\\operatorname {m} }{\\operatorname {s} ^{2}}}}\n ).\nForexample, whenavehiclestartsfromastandstill (zerovelocity, inaninertialframeofreference) andtravelsinastraightlineatincreasingspeeds, itisacceleratinginthedirectionoftravel. Ifthevehicleturns, anaccelerationoccurstowardthenewdirectionandchangesitsmotionvector. Theaccelerationofthevehicleinitscurrentdirectionofmotioniscalledalinear (ortangentialduringcircularmotions) acceleration, thereactiontowhichthepassengersonboardexperienceasaforcepushingthembackintotheirseats. Whenchangingdirection, theeffectingaccelerationiscalledradial (ororthogonalduringcircularmotions) acceleration, thereactiontowhichthepassengersexperienceasacentrifugalforce. Ifthespeedofthevehicledecreases, thisisanaccelerationintheoppositedirectionandmathematicallyanegative, sometimescalleddecelerationorretardation , andpassengersexperiencethereactiontodecelerationasaninertialforcepushingthemforward. Suchnegativeaccelerationsareoftenachievedbyretrorocketburninginspacecraft. Bothaccelerationanddecelerationaretreatedthesame, astheyarebothchangesinvelocity. Eachoftheseaccelerations (tangential, radial, deceleration) isfeltbypassengersuntiltheirrelative (differential) velocityareneutralizedinreferencetothevehicle.">>> wikipedia.summary("Acceleration (disambiguation)", auto_suggest=False)
Traceback (mostrecentcalllast):
File"<stdin>", line1, in<module>File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/util.py", line28, in__call__ret=self._cache[key] =self.fn(*args, **kwargs)
File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/wikipedia.py", line231, insummarypage_info=page(title, auto_suggest=auto_suggest, redirect=redirect)
File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/wikipedia.py", line276, inpagereturnWikipediaPage(title, redirect=redirect, preload=preload)
File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/wikipedia.py", line299, in__init__self.__load(redirect=redirect, preload=preload)
File"/home/manav/s2orc/env/lib/python3.6/site-packages/wikipedia/wikipedia.py", line393, in__loadraiseDisambiguationError(getattr(self, 'title', page['title']), may_refer_to)
wikipedia.exceptions.DisambiguationError: "Acceleration (disambiguation)"mayreferto:
Acceleration (biology)
Acceleration (differentialgeometry)
Acceleration (human)
Acceleration (law)
AcademicaccelerationCardiotocographicaccelerationthrottleThesensationSeriesaccelerationAcceleration (album)
Acceleration (film)
Accelerate (disambiguation)
AccelerationismAccelerator (disambiguation)
Thanks for the help!
The text was updated successfully, but these errors were encountered:
I'm trying to find terms on Wikipedia that are specifically unambiguous so I was hoping that I could detect ambiguity by just catching the DisambiguationError, but it seems there are some cases where this doesn't work. Can someone explain the following example? Why isn't Acceleration being caught as ambiguous unless I specifically look for the disambiguation page?
Thanks for the help!
The text was updated successfully, but these errors were encountered: