ymcui / cmrc2018

A Span-Extraction Dataset for Chinese Machine Reading Comprehension (CMRC 2018)
https://ymcui.github.io/cmrc2018/
Creative Commons Attribution Share Alike 4.0 International
415 stars 87 forks source link

请问为什么 File "cmrc2018_evaluate.py", line 33 if re.search(ur'[\u4e00-\u9fa5]', char) or char in sp_char: ^ SyntaxError: invalid syntax会有这个报错啊 #19

Closed Mei0211 closed 2 years ago

Mei0211 commented 2 years ago

就是evaluate的时候的报错

ymcui commented 2 years ago

你用这个试一下: https://worksheets.codalab.org/bundles/0x28e4ab03d8cf4a31b1b82ed500385205

Mei0211 commented 2 years ago

也会报错,想问问python cmrc2018_evaluate.py cmrc2018_dev.json predictions.json`这个的dev文件是data还是squad文件夹里的呢

ymcui commented 2 years ago

两种版本都支持。麻烦你把完整的错误信息贴出来。

Mei0211 commented 2 years ago

~/cmrc2018/baseline$ python cmrc2018_evaluate.py /home/meishanxing/cmrc2018/squad-style-data/cmrc2018_dev.json /home/meishanxing/cmrc2018/output/dev_predictions.json File "cmrc2018_evaluate.py", line 33 if re.search(ur'[\u4e00-\u9fa5]', char) or char in sp_char: ^ SyntaxError: invalid syntax

ymcui commented 2 years ago

不是,是运行给你新的链接里的脚本,你直接这里下载吧。 cmrc2018_evaluate.py.zip

上面的报错信息里用的应该是旧脚本,那段re匹配已经在新脚本里改过了。

Mei0211 commented 2 years ago

好的!ok了!! 感谢