예제 #1
0
파일: main.go 프로젝트: pombredanne/st
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)
	}
}
예제 #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
}