mirror of
https://gitee.com/fastnlp/fastNLP.git
synced 2024-12-03 20:57:37 +08:00
add dataset read functions
This commit is contained in:
parent
830d223344
commit
96a2794fdf
@ -87,7 +87,6 @@ class DataSetLoader(BaseLoader):
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@DataSet.set_reader('read_raw')
|
||||
class RawDataSetLoader(DataSetLoader):
|
||||
def __init__(self):
|
||||
@ -103,7 +102,6 @@ class RawDataSetLoader(DataSetLoader):
|
||||
def convert(self, data):
|
||||
return convert_seq_dataset(data)
|
||||
|
||||
|
||||
@DataSet.set_reader('read_pos')
|
||||
class POSDataSetLoader(DataSetLoader):
|
||||
"""Dataset Loader for POS Tag datasets.
|
||||
@ -173,7 +171,6 @@ class POSDataSetLoader(DataSetLoader):
|
||||
"""
|
||||
return convert_seq2seq_dataset(data)
|
||||
|
||||
|
||||
@DataSet.set_reader('read_tokenize')
|
||||
class TokenizeDataSetLoader(DataSetLoader):
|
||||
"""
|
||||
@ -233,7 +230,6 @@ class TokenizeDataSetLoader(DataSetLoader):
|
||||
def convert(self, data):
|
||||
return convert_seq2seq_dataset(data)
|
||||
|
||||
|
||||
@DataSet.set_reader('read_class')
|
||||
class ClassDataSetLoader(DataSetLoader):
|
||||
"""Loader for classification data sets"""
|
||||
@ -272,7 +268,6 @@ class ClassDataSetLoader(DataSetLoader):
|
||||
def convert(self, data):
|
||||
return convert_seq2tag_dataset(data)
|
||||
|
||||
|
||||
@DataSet.set_reader('read_conll')
|
||||
class ConllLoader(DataSetLoader):
|
||||
"""loader for conll format files"""
|
||||
@ -314,7 +309,6 @@ class ConllLoader(DataSetLoader):
|
||||
def convert(self, data):
|
||||
pass
|
||||
|
||||
|
||||
@DataSet.set_reader('read_lm')
|
||||
class LMDataSetLoader(DataSetLoader):
|
||||
"""Language Model Dataset Loader
|
||||
@ -351,7 +345,6 @@ class LMDataSetLoader(DataSetLoader):
|
||||
def convert(self, data):
|
||||
pass
|
||||
|
||||
|
||||
@DataSet.set_reader('read_people_daily')
|
||||
class PeopleDailyCorpusLoader(DataSetLoader):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user