parameters: (splits=['train'], min_count=5, start_vocab=base_vocab)
return_statement: return vocab
docstring: Build a vocab, starting with base vocab containing a few useful tokens.
docstring_summary: Build a vocab, starting with base vocab containing a few useful tokens.
docstring_tokens: Build a vocab starting with base vocab containing a few useful tokens .
function: def build_vocab(splits=['train'], min_count=5, start_vocab=base_vocab):
      ''' Build a vocab, starting with base vocab containing a few useful tokens. '''
      count = Counter()
      t = Tokenizer()
      data = load_datasets(splits)
      for item in data:
          for instr in item['instructions']:
              count.update(t.split_sentence(instr))
      vocab = list(start_vocab)
      for word,num in count.most_common():
          if num >= min_count:
              vocab.append(word)
          else:
              break
      return vocab
function_tokens: def build_vocab ( splits = [ 'train' ] , min_count = 5 , start_vocab = base_vocab ) : count = Counter ( ) t = Tokenizer ( ) data = load_datasets ( splits ) for item in data : for instr in item [ 'instructions' ] : count . update ( t . split_sentence ( instr ) ) vocab = list ( start_vocab ) for word , num in count . most_common ( ) : if num >= min_count : vocab . append ( word ) else : break return vocab