Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否支持跨越换行符标注 #43

Open
xingbofeng opened this issue Oct 29, 2019 · 1 comment
Open

能否支持跨越换行符标注 #43

xingbofeng opened this issue Oct 29, 2019 · 1 comment
Assignees
Labels
feature request need new feature

Comments

@xingbofeng
Copy link
Contributor

看到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));
        }

想问下这个换行符好不好支持啊

@longfangsong
Copy link
Collaborator

longfangsong commented Oct 31, 2019

@xingbofeng 目前对换行的支持策略是不准跨越硬折行,即用户输入中直接出现的'\n',进行标注(这是相对合理的,因为跨越自然段的标注意义不大),对于由于文本过长而出现的软折行,是可以跨跃这个折行进行标注的(如果输入文本中的部分硬折行不合要求,可以手动删除这个折行)。

未来将会将跨越硬折行标注时的行为变为可配置的。

@longfangsong longfangsong self-assigned this Oct 31, 2019
@longfangsong longfangsong added the feature request need new feature label Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request need new feature
Projects
None yet
Development

No branches or pull requests

2 participants