Closed bsstoner closed 7 years ago
This is actually really strange; with the query who is the president-elect of the us
the value of $rem
on https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/POTUS.pm#L22 is who is the
whereas I wouldn't expect it to trigger at all because the string president of the us
isn't present in the query.
Feels like it might be broader than just this IA's interesting triggering mechanism misfiring
@bsstoner @mintsoft I can't seem to be able to trigger the IA. Was it shut down or something due to the aforementioned issues?
I can't seem to be able to trigger the IA. Was it shut down or something due to the aforementioned issues?
Yes it was taken offline
whereas I wouldn't expect it to trigger at all because the string president of the us isn't present in the query.
@mintsoft that's really odd...possibly a bug in DuckDuckGo Repo.
Either way, one big issues is that the regex inside the handle
is not anchored. We need to ensure that the query only matches the phrases we expect and nothing else.
For example it currently triggers on "who is the worst president of the us" which it should not!.
If we anchor the regex and compare it against the whole query we should be able to prevent all false-positives 👍
@moollaza is it worth fixing this or has it been replaced by the wikipedia fatheat thingymabob?
It will likely be made irrelevant in the near future.
Looks like our Wikipedia Instant Answer covers just about all the "Nth president of the US" type queries:
https://duckduckgo.com/?q=23rd+president+of+the+united+states&ia=web
Perhaps we should just remove this IA 👍 -- It's already offline anyways.
We don't seem to handle the "who is/was the nth president" style queries though Wiki is usually the first result. I've merged your PR @mintsoft I suppose we can keep this around a little bit longer if we want.
@moollaza I say delete it if it's not needed 👍
A few users have noticed this IA is offline. There are a few queries that the Wikipedia Fathead doesn't handle, e.g. "potus 15"
I suppose we could keep it around with a reduced trigger space?
IA Page: http://duck.co/ia/view/potus Maintainer: @numbertheory