import typing


def convert_title_tokens_to_vector(title_tokens: typing.Set[str], word_lookup: typing.Dict[str, int],
                                   words: typing.List[str]) -> typing.List[int]:
    """Take a title that has been converted to tokens (list of str) to an integer vector."""
    title_vector = [0] * len(words)
    for token in title_tokens:
        if token in word_lookup:
            title_vector[word_lookup[token]] = 1
    return title_vector