from typing import Set


def load_vocab(file: str) -> Set[str]:
    """
    Loads the vocabulary into a set.

    :param file: Path to vocabulary file
    :return: set of tokens in the vocabulary
    """
    vocab = set()
    with open(file, encoding="utf-8") as f_in:
        for token in f_in:
            token = token.strip()
            if token == "":
                continue
            vocab.add(token)

    return vocab