Example #1
0
func TestSimpleMerge(t *testing.T) {
	fcfg1 := "testdata/config_simpleread.dsv"
	fcfg2 := "testdata/config_simpleread.dsv"

	reader, e := dsv.SimpleMerge(fcfg1, fcfg2, nil, nil)
	if e != nil {
		t.Fatal(e)
	}

	_, e = dsv.SimpleWrite(reader, fcfg1)
	if e != nil {
		t.Fatal(e)
	}

	fexp := "testdata/expected_simplemerge.dat"
	fout := "testdata/output.dat"

	assertFile(t, fexp, fout, true)
}
Example #2
0
func main() {
	defer un(trace("Unified PAN-WVC-2010"))

	readset, e := dsv.SimpleMerge(fEditsDsv, fGoldAnnotationsDsv, nil, nil)
	if e != nil {
		panic(e)
	}

	dataset := readset.GetDataset().(tabula.DatasetInterface)
	fmt.Printf(">>> merging %d rows\n", dataset.GetNRow())

	fmt.Println(">>> diffing ...")
	doDiff(readset, dataset)

	fmt.Println(">>> writing ...")
	n, e := dsv.SimpleWrite(readset, fOutDsv)
	if e != nil {
		panic(e)
	}
	fmt.Printf(">>> writing %d rows\n", n)
}