def p_spam_given_word(word_prob):
    """Uses byes therom to compute p(spam | message contains word)"""
    word, prob_if_spam, prob_if_not_spam=word_prob
    return prob_if_spam/(prob_if_spam+prob_if_not_spam)