You've already forked DataMate
bugfix: 创建清洗任务时修改数据集状态;无法删除已在模板/运行任务的算子
* bugfix: 创建清洗任务时修改数据集状态;无法删除已在模板/运行任务的算子
This commit is contained in:
@@ -25,6 +25,8 @@ class UnstructuredFormatter(Mapper):
|
||||
start = time.time()
|
||||
filepath = sample.get(self.filepath_key)
|
||||
filename = sample.get(self.filename_key)
|
||||
if not filename.lower().endswith((".ppt", ".pptx", "docx", "xlsx", ".csv")):
|
||||
return sample
|
||||
try:
|
||||
elements = partition(filename=filepath)
|
||||
sample[self.text_key] = "\n\n".join([str(el) for el in elements])
|
||||
|
||||
Reference in New Issue
Block a user