gpt4 book ai didi

java - 为什么在 WEKA 中读取此 ARFF 文件时会出现过早的 EOF?

转载 作者:行者123 更新时间:2023-11-30 09:23:09 25 4
gpt4 key购买 nike

这是我用于测试的简化版本,它会产生以下错误

@RELATION documents

@ATTRIBUTE rnClass {r,n}
@ATTRIBUTE CONTAINS_EMAIL numeric
@ATTRIBUTE CONTAINS_PHONE numeric

@DATA
n,0.0,0.0
n,0.0,0.0
r,0.0,0.0
r,0.0,0.0
n,0.0,0.0
r,0.0,0.0
r,0.0,0.0


Caused by: java.io.IOException: premature end of file, read Token[EOF], line 1
at weka.core.converters.ArffLoader$ArffReader.errorMessage(ArffLoader.java:258) ~[weka-dev-3.7.6.jar:na]
at weka.core.converters.ArffLoader$ArffReader.readHeader(ArffLoader.java:678) ~[weka-dev-3.7.6.jar:na]
at weka.core.converters.ArffLoader$ArffReader.<init>(ArffLoader.java:139) ~[weka-dev-3.7.6.jar:na]

但是之前的版本似乎运行没有问题:

@RELATION documents

@ATTRIBUTE rnClass {r,n}
@ATTRIBUTE text String

@DATA
r,'blah blah blah...'
r,'\n\n\n\n\t\n\nblah blah blah\n\n...'
n,'\n\n \n\n\n \nblah blah blah \n\n\nblah blah \n \n\n\n \'

最佳答案

我尝试使用您的输入创建一个 arff 文件,它对我有用。您的 arff 文件可能已损坏。您可以创建一个新的 arff 文件并尝试吗?

关于java - 为什么在 WEKA 中读取此 ARFF 文件时会出现过早的 EOF?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27408401/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com