class_docstr: Tagger base class that defines the interface. 
class_docstr_tok: ["Tagger","base","class","that","defines","the","interface","."]
docstr: Convert ngrams into feature vectors.
docstr_tok: ["Convert","ngrams","into","feature","vectors","."]
code: def sent2examples(self, sent):
      """Convert ngrams into feature vectors."""
  
      # TODO(rmyeid): use expanders.
      words = [
          w if w in self.embeddings else TaggerBase.UNK for w in sent
      ]
      ngrams = TaggerBase.ngrams(words, self.context, self.transfer)
      fvs = []
      for word, ngram in zip(sent, ngrams):
          fv = np.array(
              [
                  self.embeddings.get(w, self.embeddings.zero_vector())
                  for w in ngram
              ]
          ).flatten()
          if self.add_bias:
              fv = np.hstack((fv, np.array(1)))
          yield word, fv
  
imports: import numpy
  from six.moves import range
  from ..decorators import memoize
  from ..load import load_embeddings, load_ner_model, load_pos_model, load_unified_pos_model
label_desc: Use image node_id 5 for calling the TaggerBase obj's underlying member method code with example usage: obj.sent2examples(sent) without return types