Can I Use: Broaden search results by adding more aliases #172
Comments
Would love to do it :D ? I've not been through the code though, might need some help, would it match the time/result productivity ratio of duckduckhack?, then assign me. |
@meetmangukiya thanks for your interest -- we don't have any requirements regarding productivity -- we're just happy to have volunteers to help us out 👍 This isn't exactly a trivial fix though. This is a Fathead Instant Answer so the article titles "css animation" is pulled from www.caniuse.com In order to support the plural, we need to create a redirect. We could have a manually curated file that maps aliases/redirects for specific article titles, or we can try to achieve this programatically by, pluralizing words. I suggest you take a look at the code to understand how this works and then we can determine a plan of action here 👍 |
Then what is this file containing https://raw.githubusercontent.com/Fyrd/caniuse/master/fulldata-json/data-2.0.json ? I assumed it'd be the data which was used 😕 |
@meetmangukiya that's the JSON that Caniuse.com uses to build their site. We parse that (instead of scraping the website) to generate the Fathead. However, we don't own that file and can't/shouldn't modify it for our purposes. You'll see that file is part of the Caniuse organization. |
@moollaza is it advisable to manually curate the Doing it programmatically seems a bit of an overkill when the types of aliases (plurals or non-hyphenated words) may vary amongst the keys. |
@altern8tif yes that's totally fine. For the Perl Fathead, we've created a
Currently no, we don't have them re-running at any set intervals. This is something we're considering. For now we've just been manually re-running the parsing scripts as needed, when the Fatheads become stale. |
@duckduckgo/duckduckhack-contributors Anyone wants to take this? We're experimenting with easier ways to add redirects for a Fathead 😄 |
Neat idea!
We could have something along the line of (pseudo definition for the idea)
( quick test result http://regexr.com/3eq4j ) Too complicated? Riskier? |
@ppython You can definitely use regexes to generate redirects, but the redirects.txt file needs to have the specified format for now, or it won't work 😄 |
Hey everyone DuckDuckHack is now in Maintenance Mode and from now on, we are only accepting issues and PRs for essential bugs and bug fixes. Unfortunately, with the above in mind, this isn't something we can action and will be closed. We appreciate you taking the time to contribute and apologize for not being able to triage this issue. |
Description
The "Can I Use" Instant Answer shows results for the search "can i use css animation", but not for "can i use css animations" or "can i use animations"
What to do
For each line in the articles.txt file, create aliases and store them in a new redirects.txt file, in the same directory.
Each line of the redirects.txt file should be structured as follows: alias,original line.
E.g:
animations,css-animation
The aliases should have:
This change will allow the Instant Answer to trigger for more searches.
IA Page: http://duck.co/ia/view/caniuse
The text was updated successfully, but these errors were encountered: