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