slight change to randomness of sentence length and removing low cap again when responding
This commit is contained in:
parent
dba5ebc3d1
commit
e77ee73bfc
@ -583,7 +583,7 @@ public class Datahandler {
|
||||
ArrayList<String> concurrentRelations = new ArrayList();
|
||||
StringBuilder SB = new StringBuilder();
|
||||
List<String> ues_copy = new ArrayList(DataMapper.getAllStrings());
|
||||
double preRelationUserCounters = -155000.0;
|
||||
double preRelationUserCounters = -1.123456789;
|
||||
|
||||
//System.out.println(ues_copy.toString());
|
||||
ArrayList<Future<SentimentAnalyzerTest>> futures = new ArrayList<>();
|
||||
@ -613,7 +613,8 @@ public class Datahandler {
|
||||
SentimentAnalyzerTest SMX = completed.get();
|
||||
if (SMX == null) continue;
|
||||
double scoreRelationLastUserMsg = SMX.getScore();
|
||||
if (scoreRelationLastUserMsg > preRelationUserCounters) {
|
||||
if (scoreRelationLastUserMsg > preRelationUserCounters
|
||||
|| preRelationUserCounters == -1.123456789) {
|
||||
preRelationUserCounters = scoreRelationLastUserMsg;
|
||||
concurrentRelations.add(SMX.getSecondaryString());
|
||||
}
|
||||
@ -758,12 +759,12 @@ public class Datahandler {
|
||||
DataMapper.InsertMYSQLStrings(strF);
|
||||
DataMapper.checkStringsToDelete();
|
||||
}
|
||||
double randomLenghtPermit = strF.length() * (Math.random() * Math.random() * (Math.random() * 10));
|
||||
//double randomLenghtPermit = strF.length() * (Math.random() * Math.random() * (Math.random() * 10));
|
||||
Collections.reverse(concurrentRelations);
|
||||
ArrayList<String> mysqlUpdateLastUsed = new ArrayList();
|
||||
if (!concurrentRelations.isEmpty()) {
|
||||
for (String secondaryRelation : concurrentRelations) {
|
||||
if (SB.toString().length() > randomLenghtPermit && !SB.toString().isEmpty()) {
|
||||
if (SB.toString().length() > strF.length() * 3 && !SB.toString().isEmpty()) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -772,6 +773,7 @@ public class Datahandler {
|
||||
for (String strItr : orDefault) {
|
||||
if (secondaryRelation.equalsIgnoreCase(strItr)) {
|
||||
skip = true;
|
||||
//wtf why does this exist.
|
||||
if (orDefault.size() + 3 >= concurrentRelations.size()) {
|
||||
orDefault = new ArrayList<>();
|
||||
strResponses.put(strF, orDefault);
|
||||
@ -786,7 +788,7 @@ public class Datahandler {
|
||||
}
|
||||
}
|
||||
if (skip) continue;
|
||||
|
||||
/*
|
||||
if (!SB.isEmpty()) {
|
||||
String testSTR = SB.toString() + " " + secondaryRelation;
|
||||
SentimentAnalyzerTest SMX = getReponseFuturesHelper(strF, testSTR, stanfordCoreNLP, stanfordCoreNLPSentiment,
|
||||
@ -798,10 +800,12 @@ public class Datahandler {
|
||||
, strTokenEntryGetPOSF, retrieveTGWListF, PairCounterF, TokensCounterF, stopWordLemmaF, nerEntitiesF
|
||||
, stopWordTokenF, entityTokenTagsF, nerEntitiesTypeF, AnotatorcounterF, strTokenStemsF);
|
||||
double scoreRelationLastUserMsg = SMX.getScore();
|
||||
|
||||
if (preRelationUserCounters > scoreRelationLastUserMsg) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} */
|
||||
|
||||
SB.append(secondaryRelation).append(" ");
|
||||
mysqlUpdateLastUsed.add(secondaryRelation);
|
||||
|
Loading…
Reference in New Issue
Block a user