def scalar_inc_dec(word, valence, is_cap_diff):
scalar = <NUM_LIT:0.0><EOL>word_lower = word.lower()<EOL>if word_lower in BOOSTER_DICT:<EOL><INDENT>scalar = BOOSTER_DICT[word_lower]<EOL>if valence < <NUM_LIT:0>:<EOL><INDENT>scalar *= -<NUM_LIT:1><EOL><DEDENT>if word.isupper() and is_cap_diff:<EOL><INDENT>if valence > <NUM_LIT:0>:<EOL><INDENT>scalar += C_INCR<EOL><DEDENT>else:<EOL><INDENT>scalar -= C_INCR<EOL><DEDENT><DEDENT><DEDENT>return scalar<EOL>
Check if the preceding words increase, decrease, or negate/nullify the
valence