@Before public void before() { /* Hier (vor jedem Test) nur öffnen: */ corpus = CorpusDatabase.open(DATA); System.out.println("Korpus enthält " + corpus.getNumberOfDocuments() + " Dokumente"); System.out.println(LINE); }
public static void main(final String[] args) throws Exception { /* Hier (= Run as -> Java application) erstellen und crawlen (dauert). */ Corpus c = CorpusDatabase.create(DATA); List<String> seed = Arrays.asList("http://www.spiegel.de", "http://www.welt.de"); List<WebDocument> documents = Crawler.crawl(1, seed); c.addAll(documents); c.close(); }