diff --git a/ArtificialAutism/src/main/java/DataLayer/DataMapper.java b/ArtificialAutism/src/main/java/DataLayer/DataMapper.java index 6453ceec..b1863819 100644 --- a/ArtificialAutism/src/main/java/DataLayer/DataMapper.java +++ b/ArtificialAutism/src/main/java/DataLayer/DataMapper.java @@ -27,7 +27,8 @@ public class DataMapper { ArrayList arrayListStr = new ArrayList(); try { l_cCon = DBCPDataSource.getConnection(); - String l_sSQL = "SELECT * FROM `Sentences` order by LENGTH(Strings) desc"; + //not better, just forces the responds to variate a lot more + String l_sSQL = "SELECT * FROM Sentences where last_used < CURRENT_DATE() - INTERVAL 5 DAY order by LENGTH(Strings) desc"; l_pStatement = l_cCon.prepareStatement(l_sSQL); l_rsSearch = l_pStatement.executeQuery(); while (l_rsSearch.next()) { diff --git a/ArtificialAutism/src/main/java/FunctionLayer/Datahandler.java b/ArtificialAutism/src/main/java/FunctionLayer/Datahandler.java index c1364d81..639a919d 100644 --- a/ArtificialAutism/src/main/java/FunctionLayer/Datahandler.java +++ b/ArtificialAutism/src/main/java/FunctionLayer/Datahandler.java @@ -27,7 +27,7 @@ import java.util.regex.Pattern; public class Datahandler { - private ExecutorService pool = Executors.newFixedThreadPool(6); + private ExecutorService pool = Executors.newFixedThreadPool(4); private CompletionService completionService = new ExecutorCompletionService(pool); private HashMap pipelineAnnotationCache; private HashMap pipelineSentimentAnnotationCache;