code: def sentence_vectorizer(text: str, use_mean: bool = True):
      
      words = word_tokenize(text, engine="ulmfit")
      vec = np.zeros((1, WV_DIM))
  
      for word in words:
          if word == " ":
              word = "xxspace"
          elif word == "\n":
              word = "xxeol"
  
          if word in _MODEL.wv.index2word:
              vec += _MODEL.wv.word_vec(word)
          else:
              pass
  
      if use_mean:
          vec /= len(words)
  
      return vec
docs: Get sentence vector from text
      If a word is not in the vocabulary, KeyError will be raised.
  
      :param string text: text input
      :param boolean use_mean: if `True` use mean of all word vectors else use summation
  
      :return: sentence vector of given input text