Java 组合不同arff文件的属性

Java 组合不同arff文件的属性,java,merge,weka,arff,Java,Merge,Weka,Arff,我正在与Weka合作一个项目,我有两个不同的arff文件,如下所示: 文件1: @attribute class {yes, no} @attribute a numeric @data {0 yes, 1 2} {0 yes} @attribute class {yes, no} @attribute b numeric @attribute a numeric @data {0 yes, 1 2} {0 no, 1 1

我正在与Weka合作一个项目,我有两个不同的arff文件,如下所示:

文件1

@attribute class {yes, no}    
@attribute a numeric    
@data    
{0 yes, 1 2}    
{0 yes}
@attribute class {yes, no}    
@attribute b numeric    
@attribute a numeric    
@data    
{0 yes, 1 2}    
{0 no, 1 1, 2 1}
文件2

@attribute class {yes, no}    
@attribute a numeric    
@data    
{0 yes, 1 2}    
{0 yes}
@attribute class {yes, no}    
@attribute b numeric    
@attribute a numeric    
@data    
{0 yes, 1 2}    
{0 no, 1 1, 2 1}
有没有办法通过如下方式组合这两个arff文件来创建新文件

文件3:

合并不起作用,因为每个文件都有不同的属性。

这提供了用于合并不同数据集的API。唯一的要求是.arff文件必须具有不同的关系名称