class_docstr: Base class for text encoders.
  Translates raw texts into structured token arrays
class_docstr_tok: ["Base","class","for","text","encoders",".","Translates","raw","texts","into","structured","token","arrays"]
docstr: Convert a batch of raw text to a batch of byte-pair encoded token indices.
docstr_tok: ["Convert","a","batch","of","raw","text","to","a","batch","of","byte-pair","encoded","token","indices","."]
code: def _encode(self, texts):
      """
      Convert a batch of raw text to a batch of byte-pair encoded token indices.
      """
      raise NotImplementedError
  
imports: import warnings
  import functools
  from collections import namedtuple, Counter, OrderedDict
  import spacy
  import numpy
label_desc: Use image node_id 5 for calling the BaseEncoder obj's underlying member method code with example usage: obj._encode(texts) without return types