/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package FunctionLayer.StanfordParser; import com.google.common.collect.MapMaker; import edu.stanford.nlp.ling.TaggedWord; import edu.stanford.nlp.trees.GrammaticalStructure; import edu.stanford.nlp.trees.Tree; import edu.stanford.nlp.trees.TypedDependency; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentMap; import org.ejml.simple.SimpleMatrix; /** * * @author install1 */ public class SentimentValueCache { private String sentence; private int counter; private List> taggedwordlist = new ArrayList(); private final ConcurrentMap tgwlistIndex = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap sentenceConstituencyParseList = new MapMaker().concurrencyLevel(2).makeMap(); private final Collection allTypedDependencies = new ArrayList(); private final ConcurrentMap gsMap = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap simpleSMXlist = new MapMaker().concurrencyLevel(3).makeMap(); private final ConcurrentMap simpleSMXlistVector = new MapMaker().concurrencyLevel(3).makeMap(); private final ConcurrentMap rnnPredictClassMap = new MapMaker().concurrencyLevel(3).makeMap(); private List classifyRaw; private int mainSentiment = 0; private int longest = 0; private int tokensCounter = 0; private int anotatorcounter = 0; private int inflectedCounterPositive = 0; private int inflectedCounterNegative = 0; private int MarkedContinuousCounter = 0; private int MarkedContiniousCounterEntries = 0; private int UnmarkedPatternCounter = 0; private int pairCounter = 0; private final ConcurrentMap ITokenMapTag = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap strTokenStems = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap strTokenForm = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap strTokenGetEntry = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap strTokenGetiPart = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap strTokenEntryPOS = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap entryCounts = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap nerEntities1 = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap nerEntities2 = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap nerEntityTokenTags = new MapMaker().concurrencyLevel(3).makeMap(); private final ConcurrentMap stopwordTokens = new MapMaker().concurrencyLevel(2).makeMap(); private final ConcurrentMap stopWordLemma = new MapMaker().concurrencyLevel(2).makeMap(); public int getPairCounter() { return pairCounter; } public void setPairCounter(int pairCounter) { this.pairCounter = pairCounter; } public void addStopWordLemma(String str) { stopWordLemma.put(stopWordLemma.size(), str); } public void addstopwordTokens(String str) { stopwordTokens.put(stopwordTokens.size(), str); } public ConcurrentMap getStopwordTokens() { return stopwordTokens; } public ConcurrentMap getStopWordLemma() { return stopWordLemma; } public void addnerEntityTokenTags(String str) { nerEntityTokenTags.put(nerEntityTokenTags.size(), str); } public ConcurrentMap getnerEntityTokenTags() { return nerEntityTokenTags; } public ConcurrentMap getnerEntities1() { return nerEntities1; } public ConcurrentMap getnerEntities2() { return nerEntities2; } public void addNEREntities1(String str) { nerEntities1.put(nerEntities1.size(), str); } public void addNEREntities2(String str) { nerEntities2.put(nerEntities2.size(), str); } public void setTaggedwords(List> twlist) { taggedwordlist = twlist; } public List> getTaggedwordlist() { return taggedwordlist; } public void addEntryCounts(int counts) { entryCounts.put(entryCounts.size(), counts); } public ConcurrentMap getEntryCounts() { return entryCounts; } public void addstrTokenEntryPOS(String str) { strTokenEntryPOS.put(strTokenEntryPOS.size(), str); } public ConcurrentMap getstrTokenEntryPOS() { return strTokenEntryPOS; } public void addstrTokenGetiPart(String str) { strTokenGetiPart.put(strTokenGetiPart.size(), str); } public ConcurrentMap getstrTokenGetiPart() { return strTokenGetiPart; } public ConcurrentMap getstrTokenGetEntry() { return strTokenGetEntry; } public void addstrTokenGetEntry(String str) { strTokenGetEntry.put(strTokenGetEntry.size(), str); } public ConcurrentMap getstrTokenForm() { return strTokenForm; } public void addstrTokenForm(String str) { strTokenForm.put(strTokenForm.size(), str); } public ConcurrentMap getstrTokenStems() { return strTokenStems; } public void addstrTokenStems(String str) { strTokenStems.put(strTokenStems.size(), str); } public ConcurrentMap getITokenMapTag() { return ITokenMapTag; } public void addITokenMapTag(String str) { ITokenMapTag.put(ITokenMapTag.size(), str); } public int getUnmarkedPatternCounter() { return UnmarkedPatternCounter; } public void setUnmarkedPatternCounter(int UnmarkedPatternCounter) { this.UnmarkedPatternCounter = UnmarkedPatternCounter; } public int getMarkedContiniousCounterEntries() { return MarkedContiniousCounterEntries; } public void setMarkedContiniousCounterEntries(int MarkedContiniousCounterEntries) { this.MarkedContiniousCounterEntries = MarkedContiniousCounterEntries; } public int getMarkedContinuousCounter() { return MarkedContinuousCounter; } public void setMarkedContinuousCounter(int MarkedContinuousCounter) { this.MarkedContinuousCounter = MarkedContinuousCounter; } public int getInflectedCounterNegative() { return inflectedCounterNegative; } public void setInflectedCounterNegative(int inflectedCounterNegative) { this.inflectedCounterNegative = inflectedCounterNegative; } public int getInflectedCounterPositive() { return inflectedCounterPositive; } public void setInflectedCounterPositive(int inflectedCounterPositive) { this.inflectedCounterPositive = inflectedCounterPositive; } public int getAnotatorcounter() { return anotatorcounter; } public void setAnotatorcounter(int anotatorcounter) { this.anotatorcounter = anotatorcounter; } public int getTokensCounter() { return tokensCounter; } public void setTokensCounter(int tokensCounter) { this.tokensCounter = tokensCounter; } public int getMainSentiment() { return mainSentiment; } public void setMainSentiment(int mainSentiment) { this.mainSentiment = mainSentiment; } public int getLongest() { return longest; } public void setLongest(int longest) { this.longest = longest; } public List getClassifyRaw() { return classifyRaw; } public void setClassifyRaw(List classifyRaw) { this.classifyRaw = classifyRaw; } public ConcurrentMap getRnnPrediectClassMap() { return rnnPredictClassMap; } public void addRNNPredictClass(int rnnPrediction) { rnnPredictClassMap.put(rnnPredictClassMap.size(), rnnPrediction); } public void addSimpleMatrix(SimpleMatrix SMX) { simpleSMXlist.put(simpleSMXlist.size(), SMX); } public void addSimpleMatrixVector(SimpleMatrix SMX) { simpleSMXlistVector.put(simpleSMXlistVector.size(), SMX); } public ConcurrentMap getGsMap() { return gsMap; } public ConcurrentMap getSimpleSMXlist() { return simpleSMXlist; } public ConcurrentMap getSimpleSMXlistVector() { return simpleSMXlistVector; } public ConcurrentMap getGs() { return gsMap; } public int getCounter() { return counter; } public void addGS(GrammaticalStructure gs) { gsMap.put(gsMap.size(), gs); } public Collection getAllTypedDependencies() { return allTypedDependencies; } public void addTypedDependencies(Collection TDPlist) { for (TypedDependency TDP : TDPlist) { allTypedDependencies.add(TDP); } } public ConcurrentMap getSentenceConstituencyParseList() { return sentenceConstituencyParseList; } public void addSentenceConstituencyParse(Tree tree) { sentenceConstituencyParseList.put(sentenceConstituencyParseList.size(), tree); } public void setCounter(int counter) { counter = counter; } public String getSentence() { return sentence; } public SentimentValueCache(String str, int counter) { this.sentence = str; this.counter = counter; } public ConcurrentMap getTgwlistIndex() { return tgwlistIndex; } public void addTgwlistIndex(String str) { tgwlistIndex.put(tgwlistIndex.size(), str); } public SentimentValueCache(String str) { this.sentence = str; } }