poplar
poplar copied to clipboard
能否支持跨越换行符标注
看到src/Action/Label.ts
里面调用的:
apply(store: Store) {
if (store.content.slice(this.startIndex, this.endIndex).includes("\n")) {
// todo: support this?
throw Error("Insert label across hard line is not supported now! Please remove the \\n in content first!");
}
store.labelRepo.add(new LabelModel.Enthity(null, this.categoryId, this.startIndex, this.endIndex, store));
}
想问下这个换行符好不好支持啊
@xingbofeng 目前对换行的支持策略是不准跨越硬折行,即用户输入中直接出现的'\n'
,进行标注(这是相对合理的,因为跨越自然段的标注意义不大),对于由于文本过长而出现的软折行,是可以跨跃这个折行进行标注的(如果输入文本中的部分硬折行不合要求,可以手动删除这个折行)。
未来将会将跨越硬折行标注时的行为变为可配置的。