def kw_bigram_score(concept, segment):
    """
    Rank the segment using the key word search algorithm
    :param segment (list): a list of the tokens in the segment
    :param concept (str): the concept
    :return: a numeric score of the number of occurences of the concept word normalized by document length
    """
    score = 0
    prev = None
    for word in segment:

        if prev is not None:
            if prev.lower() == concept[0].lower() and word.lower() == concept[1].lower():
                score += 1
        prev = word
    return score/len(segment)