<commit_before>#!/bin/bash

KEYWORDS_WHALES="Whale|baleen"
KEYWORDS_BLUEWHALE="blue(| )whale"
KEYWORDS_HUMPBACK="humpback"
KEYWORDS_WHALES_EXCLUDE="$KEYWORDS_BLUEWHALE|$KEYWORDS_HUMPBACK|whale(| )shark|killer(| )whale"
KEYWORDS_WHALES_ALL="$KEYWORDS_WHALES|$KEYWORDS_BLUEWHALE|$KEYWORDS_HUMPBACK"

if [ "$1" == "" ];
then
  
  debug_start "Whales"

  WHALES=$(egrep -i "$KEYWORDS_WHALES" "$NEWPAGES" | egrep -iv "$KEYWORDS_WHALES_EXCLUDE")
  BLUEWHALE=$(egrep -i "$KEYWORDS_BLUEWHALE" "$NEWPAGES")
  HUMPBACK=$(egrep -i "$KEYWORDS_HUMPBACK" "$NEWPAGES")

  categorize "WHALES" "Whales"
  categorize "BLUEWHALES" "Blue whales"
  categorize "HUMPBACK" "Humpback whales"

  debug_end "Whales"

fi<commit_msg>Adding exclusion rule to Whales<commit_after>#!/bin/bash

KEYWORDS_WHALES="Whale|baleen"
KEYWORDS_BLUEWHALE="blue(| )whale"
KEYWORDS_HUMPBACK="humpback"
KEYWORDS_WHALES_EXCLUDE="$KEYWORDS_BLUEWHALE|$KEYWORDS_HUMPBACK|whale(| )shark|killer(| )whale|orca"
KEYWORDS_WHALES_ALL="$KEYWORDS_WHALES|$KEYWORDS_BLUEWHALE|$KEYWORDS_HUMPBACK"

if [ "$1" == "" ];
then
  
  debug_start "Whales"

  WHALES=$(egrep -i "$KEYWORDS_WHALES" "$NEWPAGES" | egrep -iv "$KEYWORDS_WHALES_EXCLUDE")
  BLUEWHALE=$(egrep -i "$KEYWORDS_BLUEWHALE" "$NEWPAGES")
  HUMPBACK=$(egrep -i "$KEYWORDS_HUMPBACK" "$NEWPAGES")

  categorize "WHALES" "Whales"
  categorize "BLUEWHALES" "Blue whales"
  categorize "HUMPBACK" "Humpback whales"

  debug_end "Whales"

fi
{'fraction_non_alphanumeric': 0.14863921842288905, 'fraction_numerical': 0.0013956734124214933, 'mean_word_length': 7.906832298136646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2897553', 'n_tokens_mistral': 677, 'n_tokens_neox': 634, 'n_words': 89}