changed restriction for maybe heavy response time
This commit is contained in:
		
							parent
							
								
									ef28fb9364
								
							
						
					
					
						commit
						71e4be6bd4
					
				@ -462,15 +462,9 @@ public class Datahandler {
 | 
			
		||||
        List<String> values_copy = new ArrayList<String>(stringCache.values());
 | 
			
		||||
        Collections.shuffle(values_copy);
 | 
			
		||||
        double preRelationUserCounters = -155000.0;
 | 
			
		||||
        double zero = 0.0;
 | 
			
		||||
        double positive_sentence_count = 0.0;
 | 
			
		||||
        double positive_cap = 55500.0;
 | 
			
		||||
        List<String> concurrentRelations = new ArrayList();
 | 
			
		||||
        for (String str1 : values_copy) {
 | 
			
		||||
            if (!strF.equals(str1)) {
 | 
			
		||||
                if (positive_sentence_count > positive_cap) {
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                SentimentValueCache sentimentCacheStr1 = sentimentCachingMap.getOrDefault(str1, null);
 | 
			
		||||
                Callable<SimilarityMatrix> worker = new SentimentAnalyzerTest(strF, str1, new SimilarityMatrix(strF, str1),
 | 
			
		||||
                        strAnnoJMWE, jmweAnnotationCache.get(str1), strAnno,
 | 
			
		||||
@ -483,13 +477,9 @@ public class Datahandler {
 | 
			
		||||
                        if (scoreRelationLastUserMsg > preRelationUserCounters) {
 | 
			
		||||
                            preRelationUserCounters = scoreRelationLastUserMsg;
 | 
			
		||||
                            concurrentRelations.add(getSMX.getSecondaryString());
 | 
			
		||||
                            positive_sentence_count += 0.1;
 | 
			
		||||
                            //System.out.println("secondary: " + getSMX.getSecondaryString() + "\nDistance: " + getSMX.getDistance() + "\n");
 | 
			
		||||
                            //System.out.println("SUCESS concurrentRelationsMap size: " + concurrentRelations.size() + "\n");
 | 
			
		||||
                        }
 | 
			
		||||
                        if (scoreRelationLastUserMsg > zero) {
 | 
			
		||||
                            positive_sentence_count += 155;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                } catch (Exception ex) {
 | 
			
		||||
                    Logger.getLogger(Datahandler.class.getName()).log(Level.SEVERE, null, ex);
 | 
			
		||||
@ -498,7 +488,7 @@ public class Datahandler {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        StringBuilder SB = new StringBuilder();
 | 
			
		||||
        double randomLenghtPermit = strF.length() * ((Math.random() * Math.random() * Math.random()) * 20);
 | 
			
		||||
        double randomLenghtPermit = strF.length() * ((Math.random() * Math.random() * Math.random()) * 5);
 | 
			
		||||
        Collections.reverse(concurrentRelations);
 | 
			
		||||
        if (concurrentRelations.isEmpty()) {
 | 
			
		||||
            return "failure, preventing stuckness";
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user