# Racial and ethnic bias detection
# Uses conditional logic: BLOCK if an identifier word + block word appear in same sentence
category_name: "bias_racial"
description: "Detects racial and ethnic discrimination, hate speech, and biased content using identifier + block word combinations"
default_action: "BLOCK"

# Inherit racial slurs and offensive terms from harm_toxic_abuse.json
inherit_from: "harm_toxic_abuse.json"

# ADDITIONAL BLOCK WORDS - Harmful concepts and dehumanizing language
additional_block_words:
  # Inferiority/superiority
  - "inferior"
  - "superior"
  - "subhuman"
  - "sub-human"
  - "less than"
  - "better than"
  - "worse than"
  - "lower"
  - "primitive"
  - "backwards"
  - "backward"
  - "uncivilized"
  - "savage"
  - "savages"
  - "barbaric"
  - "barbarian"
  
  # Elimination/violence language
  - "eliminate"
  - "eliminated"
  - "elimination"
  - "remove"
  - "removed"
  - "removal"
  - "purge"
  - "purged"
  - "purging"
  - "cleanse"
  - "cleansing"
  - "exterminate"
  - "extermination"
  - "eradicate"
  - "eradication"
  - "get rid of"
  - "wipe out"
  - "destroy"
  - "destruction"
  - "annihilate"
  - "should be killed"
  - "deserve to die"
  - "need to die"
  - "must die"
  
  # Threat/danger framing
  - "dangerous"
  - "threat"
  - "problem"
  - "issue"
  - "plague"
  - "disease"
  - "infection"
  - "parasite"
  - "parasites"
  - "vermin"
  - "rats"
  - "cockroaches"
  - "invading"
  - "invasion"
  - "invaders"
  - "taking over"
  - "replacing"
  - "replacement"
  - "infiltrating"
  - "infiltration"
  
  # Negative stereotypes
  - "lazy"
  - "criminals"
  - "criminal"
  - "terrorists"
  - "terrorist"
  - "violent"
  - "dirty"
  - "filthy"
  - "disgusting"
  - "smell"
  - "stink"
  - "stupid"
  - "dumb"
  - "ignorant"
  - "uneducated"
  - "uncivilized"
  
  # Exclusion/deportation
  - "go back"
  - "send back"
  - "deport"
  - "deportation"
  - "don't belong"
  - "not welcome"
  - "get out"
  - "leave"
  - "kick out"
  
  # Supremacy concepts
  - "pure"
  - "purity"
  - "master"
  - "supremacy"
  - "supremacist"
  - "nationalist"
  - "nationalism"
  
  # Economic/social stereotypes
  - "stealing jobs"
  - "taking jobs"
  - "welfare"
  - "benefits"
  - "leeches"
  - "moochers"
  
  # Animalistic/dehumanizing
  - "animals"
  - "animal"
  - "beasts"
  - "beast"
  - "monkeys"
  - "apes"
  - "dogs"

# IDENTIFIER WORDS - Comprehensive list of racial, ethnic, and national origin groups
identifier_words:
  # Major racial categories
  - "black"
  - "blacks"
  - "black people"
  - "black person"
  - "african american"
  - "african americans"
  - "white"
  - "whites"
  - "white people"
  - "white person"
  - "caucasian"
  - "caucasians"
  - "asian"
  - "asians"
  - "asian people"
  - "asian person"
  - "hispanic"
  - "hispanics"
  - "hispanic people"
  - "latino"
  - "latina"
  - "latinos"
  - "latinas"
  - "latinx"
  - "indigenous"
  - "native"
  - "natives"
  - "native american"
  - "native americans"
  - "aboriginal"
  - "aboriginals"
  - "indigenous people"
  
  # Specific ethnic/national groups - Americas
  - "mexican"
  - "mexicans"
  - "puerto rican"
  - "puerto ricans"
  - "cuban"
  - "cubans"
  - "dominican"
  - "dominicans"
  - "colombian"
  - "colombians"
  - "venezuelan"
  - "venezuelans"
  - "brazilian"
  - "brazilians"
  - "haitian"
  - "haitians"
  - "jamaican"
  - "jamaicans"
  - "salvadoran"
  - "salvadorans"
  - "guatemalan"
  - "guatemalans"
  - "nicaraguan"
  - "nicaraguans"
  - "honduran"
  - "hondurans"
  
  # Specific ethnic/national groups - Asia
  - "chinese"
  - "japanese"
  - "korean"
  - "koreans"
  - "vietnamese"
  - "filipino"
  - "filipinos"
  - "thai"
  - "cambodian"
  - "cambodians"
  - "laotian"
  - "laotians"
  - "indonesian"
  - "indonesians"
  - "malaysian"
  - "malaysians"
  - "singaporean"
  - "singaporeans"
  - "indian"
  - "indians"
  - "pakistani"
  - "pakistanis"
  - "bangladeshi"
  - "bangladeshis"
  - "sri lankan"
  - "sri lankans"
  - "nepalese"
  - "afghan"
  - "afghans"
  
  # Specific ethnic/national groups - Middle East/North Africa
  - "arab"
  - "arabs"
  - "middle eastern"
  - "saudi"
  - "saudis"
  - "iraqi"
  - "iraqis"
  - "iranian"
  - "iranians"
  - "syrian"
  - "syrians"
  - "lebanese"
  - "egyptian"
  - "egyptians"
  - "moroccan"
  - "moroccans"
  - "algerian"
  - "algerians"
  - "tunisian"
  - "tunisians"
  - "libyan"
  - "libyans"
  - "palestinian"
  - "palestinians"
  - "israeli"
  - "israelis"
  - "jewish"
  - "jews"
  - "muslim"
  - "muslims"
  - "islamic"
  
  # Specific ethnic/national groups - Africa
  - "african"
  - "africans"
  - "nigerian"
  - "nigerians"
  - "ethiopian"
  - "ethiopians"
  - "somali"
  - "somalis"
  - "kenyan"
  - "kenyans"
  - "ghanaian"
  - "ghanaians"
  - "south african"
  - "south africans"
  - "ugandan"
  - "ugandans"
  - "tanzanian"
  - "tanzanians"
  - "sudanese"
  - "congolese"
  
  # Specific ethnic/national groups - Europe
  - "eastern european"
  - "eastern europeans"
  - "russian"
  - "russians"
  - "polish"
  - "ukrainian"
  - "ukrainians"
  - "romanian"
  - "romanians"
  - "albanian"
  - "albanians"
  - "bosnian"
  - "bosnians"
  - "serbian"
  - "serbians"
  - "croatian"
  - "croatians"
  - "turkish"
  - "roma"
  - "romani"
  - "gypsy"
  - "gypsies"
  
  # Immigration status
  - "immigrant"
  - "immigrants"
  - "migrant"
  - "migrants"
  - "refugee"
  - "refugees"
  - "asylum seeker"
  - "asylum seekers"
  - "illegal alien"
  - "illegal aliens"
  - "undocumented"
  - "foreigner"
  - "foreigners"
  - "expat"
  - "expats"
  
  # Group descriptors
  - "minority"
  - "minorities"
  - "ethnic group"
  - "ethnic groups"
  - "race"
  - "races"
  - "people of color"
  - "poc"
  - "non-white"
  - "non-whites"

# ALWAYS BLOCK - Explicit hate speech and supremacist phrases
always_block_keywords:
  # Supremacist ideologies
  - keyword: "white supremacy"
    severity: "high"
  - keyword: "white supremacist"
    severity: "high"
  - keyword: "white nationalist"
    severity: "high"
  - keyword: "white nationalism"
    severity: "high"
  - keyword: "white power"
    severity: "high"
  - keyword: "master race"
    severity: "high"
  - keyword: "superior race"
    severity: "high"
  - keyword: "inferior race"
    severity: "high"
  - keyword: "racial purity"
    severity: "high"
  - keyword: "pure blood"
    severity: "high"
  - keyword: "race traitor"
    severity: "high"
  - keyword: "race mixing"
    severity: "high"
  - keyword: "blood and soil"
    severity: "high"
  
  # Genocide/replacement theories
  - keyword: "white genocide"
    severity: "high"
  - keyword: "great replacement"
    severity: "high"
  - keyword: "replacement theory"
    severity: "high"
  - keyword: "ethnic cleansing"
    severity: "high"
  - keyword: "racial cleansing"
    severity: "high"
  - keyword: "final solution"
    severity: "high"
  
  # Explicit combinations
  - keyword: "subhuman race"
    severity: "high"
  - keyword: "inferior people"
    severity: "high"
  - keyword: "savage race"
    severity: "high"
  - keyword: "diversity hire"
    severity: "high"
  - keyword: "ghetto culture"
    severity: "high"
  - keyword: "thug culture"
    severity: "high"
  - keyword: "black crime"
    severity: "high"
  - keyword: "immigrant crime"
    severity: "high"
  - keyword: "muslim terrorist"
    severity: "high"
  - keyword: "arab terrorist"
    severity: "high"
  - keyword: "mexican rapist"
    severity: "high"
  - keyword: "stealing our jobs"
    severity: "high"
  - keyword: "taking our jobs"
    severity: "high"
  - keyword: "send them back"
    severity: "high"
  - keyword: "go back to your country"
    severity: "high"

# Exceptions - legitimate discussions about race, diversity, anti-racism
exceptions:
  # Anti-racism and justice
  - "racial equality"
  - "racial justice"
  - "racial discrimination"
  - "anti-racism"
  - "combat racism"
  - "racial bias"
  - "systemic racism"
  - "structural racism"
  - "racial equity"
  - "diversity and inclusion"
  - "black lives matter"
  - "civil rights"
  - "fight racism"
  - "address racism"
  - "racial disparities"
  - "racism is"
  - "racist is"
  - "against racism"
  - "oppose racism"
  - "condemn racism"
  
  # Cultural and historical
  - "study shows"
  - "research indicates"
  - "research shows"
  - "studies show"
  - "historical"
  - "history"
  - "black history"
  - "black culture"
  - "asian culture"
  - "hispanic culture"
  - "latino culture"
  - "indigenous culture"
  - "native culture"
  - "african culture"
  - "cultural heritage"
  - "cultural traditions"
  - "celebrate"
  - "celebrating"
  - "heritage"
  - "traditions"
  
  # Rights and support
  - "immigrant rights"
  - "immigrant support"
  - "protect immigrants"
  - "minority rights"
  - "protect minorities"
  - "refugee support"
  - "refugee rights"
  - "human rights"
  - "equal rights"
  - "equal treatment"
  
  # Education and awareness
  - "education about"
  - "learn about"
  - "understanding"
  - "awareness"
  - "teach about"
  - "cultural sensitivity"
  - "cultural competency"
  - "diversity training"
  
  # Positive representation
  - "representation matters"
  - "diverse perspectives"
  - "inclusive"
  - "inclusion"
  - "belonging"
  - "empower"
  - "empowerment"
