osome-iu / hoaxy-backend

Backend component for Hoaxy, a tool to visualize the spread of claims and fact checking
http://hoaxy.iuni.iu.edu/
GNU General Public License v3.0
139 stars 44 forks source link

TopArticles API should have an option to exclude satire sources #7

Closed glciampaglia closed 6 years ago

glciampaglia commented 6 years ago

Per title. We would like to add a parameter to the TopArticles API endpoint, e.g. exclude=['satire',].

shaochengcheng commented 6 years ago

Dear @filmenczer @glciampaglia,

I have completed this function. Please read the new Mashape API docs of /top-articles and help me improve the language description. https://market.mashape.com/truthy/hoaxy#toparticles

Please be aware that there are a number of sites that are tagged as satire, either by fakenewswatch.com or opensources.co. Here is a glimpse of the database query with satire tags

 theonion.com               | fakenewswatch.com | satire
 ifyouonlynews.com          | opensources.co    | satire
 amplifyingglass.com        | opensources.co    | satire
 newslo.com                 | opensources.co    | satire
 americannewsx.com          | opensources.co    | satire
 empireherald.com           | opensources.co    | satire
 nationalreport.net         | opensources.co    | satire
 rilenews.com               | opensources.co    | satire
 bigamericannews.com        | opensources.co    | satire
 theuspatriot.com           | opensources.co    | satire
 nahadaily.com              | fakenewswatch.com | satire
 duffelblog.com             | fakenewswatch.com | satire
 worldnewsdailyreport.com   | fakenewswatch.com | satire
 weeklyworldnews.com        | fakenewswatch.com | satire
 thespoof.com               | fakenewswatch.com | satire
 thelapine.ca               | fakenewswatch.com | satire
 rockcitytimes.com          | fakenewswatch.com | satire
 newslo.com                 | fakenewswatch.com | satire
 itaglive.com               | fakenewswatch.com | satire
 huzlers.com                | fakenewswatch.com | satire
 creambmp.com               | opensources.co    | satire
 gomerblog.com              | fakenewswatch.com | satire
 empiresports.co            | fakenewswatch.com | satire
 empirenews.net             | opensources.co    | satire
 amplifyingglass.com        | fakenewswatch.com | satire
 disclose.tv                | opensources.co    | satire
 newsmutiny.com             | opensources.co    | satire
 realnewsrightnow.com       | opensources.co    | satire
 theracketreport.com        | opensources.co    | satire

Also, these tags are not completed. We have more sources to add. I would try to solve it when solving the automation of adding sources.

Thanks Chengcheng

filmenczer commented 6 years ago

Thank you @shaochengcheng !

This list of 'satire' sources is much longer than we expected... Many sites that spread fake news are labeled satire, so we would probably not want to exclude these in the current version of the Hoaxy front-end. But it is a good feature to have, especially if we can get more reliable tags in the future.

For the Mashape API docs, can you write here how this works in your words (is there an optional param 'exclude' that takes a comma-separated list of keywords from a list of available keywords?). Then I can suggest rewording if needed. And how would a user know which keywords are available? Should we only use tags from opensources?

As soon as we take care of the documentation, we can close this issue.

shaochengcheng commented 6 years ago

@filmenczer, I already put a draft version of API docs in the Mashape, please help me reword it.

https://market.mashape.com/truthy/hoaxy#toparticles

Thanks Chengcheng

shaochengcheng commented 6 years ago

@filmenczer, I already put a draft version of API docs in the Mashape, please help me reword it.

https://market.mashape.com/truthy/hoaxy#toparticles

Thanks Chengcheng

filmenczer commented 6 years ago

Great @shaochengcheng !! I updated the description. Could you make it so the default is empty (no exclusion)? That is how I have in the description now. This way the default behavior will not change. Thanks!

shaochengcheng commented 6 years ago

Yes, of course. I altered the code to set [] as the default (no filtering). Please tell @benabus (if his responsibility) to adjust the API query parameters if we would like to exclude the satire sites on Hoaxy frontend.

filmenczer commented 6 years ago

Great, thank you!!! We will discuss the use of filtering on launch. Right now we're leaning toward not filtering because there are too many low-credibility sources that have the satire label, even though they are not really satire. Closing the issue.