无法确定为arff(原因:java.io.IOException:过早结束行,读取令牌[EOL],行1182

时间:2013-03-17 17:44:00

标签: weka ioexception arff

我有一些数据,我正在处理它并以一种生成.arff文件的方式对其进行转换,如下所示:

............

@attribute murdered_to numeric
@attribute envy.although_it numeric
@attribute vampire_that numeric
@attribute list_without numeric
@attribute award_at numeric
@attribute @% numeric
@attribute the_addict numeric
@attribute the_drag numeric
@attribute card_against numeric
@attribute communications_mainly numeric
@attribute clue_for numeric
@attribute justified.a numeric
@attribute superb_learning numeric
@attribute ford_escape numeric
@attribute a_life-changing numeric
.
.
.

这只是属性列表的一部分。我需要在weka中打开arff文件,但它会抛出主题中提到的错误。该错误指向该行:

@attribute the_addict numeric

我无法在文件中找到引发错误的错误。

1 个答案:

答案 0 :(得分:3)

我很确定错误是在你引用的那个之前的行中

@attribute @% numeric

您的属性名称无效,必须以字母字符开头,如 etov 指出的ARFF文档中所述。

  

@attribute语句的格式为:

@attribute <attribute-name> <datatype>
     

其中必须以字母字符开头。如果名称中包含空格,则必须引用整个名称。