autoprefix style.css and better categorizing.

This commit is contained in:
Joshua Widmann 2015-02-09 09:49:31 +01:00
commit 88e0b27285
2 changed files with 21 additions and 7 deletions

View file

@ -87,12 +87,21 @@ def get_categories(article_body):
"""
bad_words = {
'antisemit': 'antisemitism',
'homophob': 'homophobia',
'jud': 'antisemitism',
'jüd': 'antisemitism',
'homo': 'homophobia',
'schwul': 'homophobia',
'lesb': 'homophobia',
'trans': 'homophobia',
'sexis': 'sexism',
'rassis': 'racism'
'frauenfeind': 'sexism',
'rassis': 'racism',
'fremdenfeind': 'racism',
'flüchtling': 'racism',
'migrant': 'racism'
}
found_categories = [bad_words[key] for key in bad_words
if key in article_body.lower()]
found_categories = set([bad_words[key] for key in bad_words
if key in article_body.lower()])
return found_categories
def get_geoloc(query):