import wikipedia
print(wikipedia.summary("Tomato", sentences=3))
Why does this code return a disambiguation error with "tom tom" and not just a summmary/disambiguation error to the entry "tomato"? The search term is clearly not tom tom or am I missing something here? Why doesnt this work?
Searching for
"Tomato"
leads to the suggestion"tom tom"
. Not sure why... In any case, you can disableauto_suggest
inwikipedia.summary
:The output is
You can see that searching for
"Tomato"
suggests"tom tom"
using thewikipedia.search
function:The
suggestion
is"tom tom"
, andresults
is a list of titles that are closely related to tomato.