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

自动分段bug #32

Open
Tangzy7 opened this issue Mar 29, 2021 · 0 comments
Open

自动分段bug #32

Tangzy7 opened this issue Mar 29, 2021 · 0 comments

Comments

@Tangzy7
Copy link

Tangzy7 commented Mar 29, 2021

下面自动分段的代码运行时, 报错了, IndexError: list index out of range

from harvesttext import HarvestText
ht0 = HarvestText()

text = """冠心病不是遗传性疾病。
遗传性疾病的发生,是因为从父母得到的遗传物质出了问题,例如染色体、基因发生了改变。目前,医学界还没有发现有遗传物质改变会明确导致冠心病。因此,严格来说,冠心病并不属于遗传性疾病,本身并不会遗传。
但是冠心病具有一定的家族聚集性,这是因为,与冠心病发生相关的一些危险因素有可能在家族中集中发生,例如高脂血症可能遗传,家人可能共同具有吸烟、高盐饮食、少运动等不良生活方式。同时,相关的研究也表明,遗传因素确实对早发冠心病有影响,一般来说,男性小于 55 岁、女性小于 65 岁明确诊断冠心病被认为是早发。
因此,如果家人中有冠心病患者,特别是有早发冠心病家族史,即一级亲属(父母、子女、兄弟姐妹)中有男性小于 55 岁、女性小于 65 岁明确诊断冠心病,自己还是要警惕。"""

predicted_paras = ht0.cut_paragraphs(text)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant