(self)
Check that necessary data is found on disk, or raise an OSError.
Check that necessary data is found on disk, or raise an OSError.
Check that necessary data is found on disk or raise an OSError .
def _check_data(self):
        """Check that necessary data is found on disk, or raise an OSError."""
        if not self._texts_dirpath.is_dir():
            raise OSError(
                f"data directory {self._texts_dirpath} not found; "
                "has the dataset been downloaded?"
            )
        if not self._index_filepath.is_file():
            raise OSError(
                f"data index file {self._index_filepath} not found; "
                "has the dataset been downloaded?"
            )
def _check_data ( self ) : if not self . _texts_dirpath . is_dir ( ) : raise OSError ( f"data directory {self._texts_dirpath} not found; " "has the dataset been downloaded?" ) if not self . _index_filepath . is_file ( ) : raise OSError ( f"data index file {self._index_filepath} not found; " "has the dataset been downloaded?" )