执行ltp.seg(["他叫汤姆去拿外衣。"])语句时: if transformers_version.major >= 3 and transformers_version.major > 1: 247 kwargs = {'is_split_into_words': is_preseged} 248 else: AttributeError: 'Version' object has no attribute 'major'
Activity
zejunwang1 commentedon May 4, 2021
+1
AlongWY commentedon May 7, 2021
pip install -U pip试一下?zejunwang1 commentedon May 9, 2021
还是报错,你这个pip install ltp一键安装后能跑通吗。。
gongfeng98 commentedon May 12, 2021
packaging这个包的问题,升级到20.0以上就行了 pip install packaging==20.0
1. 修复 Version 定义 #509
Duncanswilson commentedon Aug 30, 2021
just to save someone else from having to google translate the above: