Skip to content

Commit

Permalink
Increase heap space, logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrajina committed Jan 27, 2018
1 parent dd448d3 commit 5213dce
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions tatoebaimporter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apply plugin:'application'
mainClassName = "info.puzz.a10000sentences.importer.importers.Import"
compileJava.options.encoding = 'UTF-8'

tasks.withType(JavaExec) {
jvmArgs = ['-Xms4G', '-Xmx4G']
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.ThreadUtils;

import java.io.File;
import java.nio.file.Paths;
Expand Down Expand Up @@ -91,10 +92,13 @@ public static void main(String[] args) throws Exception {

Set<String> languages = new HashSet<>();

for (Importer importer : importers) {
for (int i = 0; i < importers.size(); i++) {
Importer importer = importers.get(i);
String outFilename = String.format("%s-%s.csv", importer.knownLanguageAbbrev3, importer.targetLanguageAbbrev3);
System.out.println(String.format("Language %d/%d: %s", i + 1, importers.size(), outFilename));

languages.add(importer.targetLang.getName());
languages.add(importer.knownLang.getName());
String outFilename = String.format("%s-%s.csv", importer.knownLanguageAbbrev3, importer.targetLanguageAbbrev3);

SentenceWriter writer = new SentenceWriter(Paths.get(OUTPUT_DIR, outFilename).toString());
importer.importCollection(writer);
Expand All @@ -107,6 +111,9 @@ public static void main(String[] args) throws Exception {
.setType(importer.getType())
.setFilename(new File(writer.filename).getName());
info.addSentencesCollection(collection);

System.out.println("cooling cpu :)");
Thread.sleep(10_000);
}

Object[] langArr = languages.toArray();
Expand Down

0 comments on commit 5213dce

Please sign in to comment.