Ejemplo n.º 1
0
func main() {
	kingpin.Parse()

	l := log.New(os.Stderr, "dumpparser ", log.Ldate|log.Ltime)
	err := dumpparser.Main(*dbpath, *dumppath, *download, *nrows, *ncols,
		*maxNGram, l)
	if err != nil {
		l.Fatal(err)
	}
}
Ejemplo n.º 2
0
func makeSemanticizer2(t *testing.T) (dbname string, sem *Semanticizer,
	settings *storage.Settings, err error) {

	dumppath := "../wikidump/nlwiki-20140927-sample.xml"

	dbfile, err := ioutil.TempFile("", "semanticizer")
	if err != nil {
		return
	}
	dbname = dbfile.Name()

	err = dumpparser.Main(dbname, dumppath, "", countmin.MaxRows, 32, 7,
		testLogger(t))
	if err != nil {
		return
	}
	sem, settings, err = Load(dbname)
	return
}