'Construct vocabulary from the given tokens.
Arguments:
tokens(list): List of tokens.
vocab:  (Default value = None)
Returns:
python.set : A set of unique tokens'

@staticmethod
def get_vocab(tokens, vocab=None):

    if (vocab is None):
        return set(tokens)
    else:
        vocab = set(vocab)
        assert (vocab >= set(tokens)), 'the    predefined    vocab    must    contain    all    the    tokens'
        return vocab
