datasets/thuc_news/thuc_news.py
def _generate_examples(self, filepath):
        """This function returns the examples in the raw (text) form."""
        with open(filepath, encoding="utf-8") as txt_file:
            data = txt_file.readlines()
            for id_, row in enumerate(data):
                row = row.split('\t')
                yield id_, {"content": row[1], "label": _CLS.index(row[0])}
This function returns the examples in the raw (text) form.
This function returns the examples in the raw (text) form.
This function returns the examples in the raw ( text ) form .
def _generate_examples(self, filepath):
        with open(filepath, encoding="utf-8") as txt_file:
            data = txt_file.readlines()
            for id_, row in enumerate(data):
                row = row.split('\t')
                yield id_, {"content": row[1], "label": _CLS.index(row[0])}
def _generate_examples ( self , filepath ) : with open ( filepath , encoding = "utf-8" ) as txt_file : data = txt_file . readlines ( ) for id_ , row in enumerate ( data ) : row = row . split ( '\t' ) yield id_ , { "content" : row [ 1 ] , "label" : _CLS . index ( row [ 0 ] ) }
This function returns the examples in the raw (text) form.
This function returns the examples in the raw ( text ) form .
"""This function returns the examples in the raw (text) form."""
self
filepath