def __init__(self, **args): basedir = args.get('basedir', '.') self._docterm = sparseMatFromCluto(os.path.join( basedir, 'SJMN_out.dat'), sparseFmt=args.get('sparse', False)) self._n = self._docterm.shape[0] self._labels = np.loadtxt(os.path.join(basedir, 'SJMN_out.dat.labels'))
def get_corpus_ZF(): text_data = sparseMatFromCluto('text-data/ZF_out.dat') labels = np.loadtxt("text-data/ZF_out.dat.labels") return text_data, labels