(self, filename=None)
Initialize and read from a file, if provided.

    Args:
      filename: filename from which to read vocab. If None, do not load a vocab
Initialize and read from a file, if provided.
Initialize and read from a file if provided .
def __init__(self, filename=None):
    """Initialize and read from a file, if provided.

    Args:
      filename: filename from which to read vocab. If None, do not load a vocab
    """
    self._alphabet = set()
    self.filename = filename
    if filename is not None:
      self._load_from_file(filename)
    super(SubwordTextEncoder, self).__init__()
def __init__ ( self , filename = None ) : self . _alphabet = set ( ) self . filename = filename if filename is not None : self . _load_from_file ( filename ) super ( SubwordTextEncoder , self ) . __init__ ( )