      return nlp
  
  
  def create_model(lang, probs, oov_prob, clusters, vectors_data, vector_keys, prune_vectors):
      print("Creating model...")
      lang_class = get_lang_class(lang)
 
</s> remove     probs, oov_prob = read_freqs(freqs_loc)
 </s> add     probs, oov_prob = read_freqs(freqs_loc) if freqs_loc is not None else ({}, -20) </s> remove     print("Reading vectors...")
    with vectors_loc.open() as f:
        shape = tuple(int(size) for size in f.readline().split())
        vectors_data = numpy.zeros(shape=shape, dtype='f')
        vectors_keys = []
        for i, line in enumerate(tqdm(f)):
            pieces = line.split()
            word = pieces.pop(0)
            vectors_data[i] = numpy.array([float(val_str) for val_str in pieces], dtype='f')
            vectors_keys.append(word)
 </s> add     print("Reading vectors from %s" % vectors_loc)
    f = open_file(vectors_loc)
    shape = tuple(int(size) for size in next(f).split())
    vectors_data = numpy.zeros(shape=shape, dtype='f')
    vectors_keys = []
    for i, line in enumerate(tqdm(f)):
        pieces = line.split()
        word = pieces.pop(0)
        vectors_data[i] = numpy.asarray(pieces, dtype='f')
        vectors_keys.append(word) </s> remove     if not freqs_loc.exists():
 </s> add     if freqs_loc is not None and not freqs_loc.exists(): </s> remove def init_model(lang, output_dir, freqs_loc, clusters_loc=None, vectors_loc=None, prune_vectors=-1):
 </s> add def init_model(lang, output_dir, freqs_loc=None, clusters_loc=None, vectors_loc=None, prune_vectors=-1):
def open_file(loc):
    '''Handle .gz, .tar.gz or unzipped files'''
    loc = ensure_path(loc)
    if tarfile.is_tarfile(str(loc)):
        return tarfile.open(str(loc), 'r:gz')
    elif loc.parts[-1].endswith('gz'):
        return (line.decode('utf8') for line in gzip.open(str(loc), 'r'))
    else:
        return loc.open('r', encoding='utf8')

      return nlp
  
def open_file(loc):
    '''Handle .gz, .tar.gz or unzipped files'''
    loc = ensure_path(loc)
    if tarfile.is_tarfile(str(loc)):
        return tarfile.open(str(loc), 'r:gz')
    elif loc.parts[-1].endswith('gz'):
        return (line.decode('utf8') for line in gzip.open(str(loc), 'r'))
    else:
        return loc.open('r', encoding='utf8')

  
  def create_model(lang, probs, oov_prob, clusters, vectors_data, vector_keys, prune_vectors):
      print("Creating model...")
      lang_class = get_lang_class(lang)
keep add keep keep keep keep
 Support .gz and .tar.gz files in spacy init-model 
spacy/cli/init_model.py