some bot overhauls
This commit is contained in:
+264
-238
File diff suppressed because it is too large
Load Diff
+94
-94
@@ -21,11 +21,11 @@ import org.ejml.simple.SimpleMatrix;
|
||||
*
|
||||
* @author install1
|
||||
*/
|
||||
public final class SentimentValueCache {
|
||||
public class SentimentValueCache {
|
||||
|
||||
private final String sentence;
|
||||
private static int counter;
|
||||
private static List<List<TaggedWord>> taggedwordlist = new ArrayList();
|
||||
private String sentence;
|
||||
private int counter;
|
||||
private List<List<TaggedWord>> taggedwordlist = new ArrayList();
|
||||
private final ConcurrentMap<Integer, String> tgwlistIndex = new MapMaker().concurrencyLevel(2).makeMap();
|
||||
private final ConcurrentMap<Integer, Tree> sentenceConstituencyParseList = new MapMaker().concurrencyLevel(2).makeMap();
|
||||
private final Collection<TypedDependency> allTypedDependencies = new ArrayList();
|
||||
@@ -33,17 +33,17 @@ public final class SentimentValueCache {
|
||||
private final ConcurrentMap<Integer, SimpleMatrix> simpleSMXlist = new MapMaker().concurrencyLevel(3).makeMap();
|
||||
private final ConcurrentMap<Integer, SimpleMatrix> simpleSMXlistVector = new MapMaker().concurrencyLevel(3).makeMap();
|
||||
private final ConcurrentMap<Integer, Integer> rnnPredictClassMap = new MapMaker().concurrencyLevel(3).makeMap();
|
||||
private static List classifyRaw;
|
||||
private static int mainSentiment = 0;
|
||||
private static int longest = 0;
|
||||
private static int tokensCounter = 0;
|
||||
private static int anotatorcounter = 0;
|
||||
private static int inflectedCounterPositive = 0;
|
||||
private static int inflectedCounterNegative = 0;
|
||||
private static int MarkedContinuousCounter = 0;
|
||||
private static int MarkedContiniousCounterEntries = 0;
|
||||
private static int UnmarkedPatternCounter = 0;
|
||||
private static int pairCounter = 0;
|
||||
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<Integer, String> ITokenMapTag = new MapMaker().concurrencyLevel(2).makeMap();
|
||||
private final ConcurrentMap<Integer, String> strTokenStems = new MapMaker().concurrencyLevel(2).makeMap();
|
||||
private final ConcurrentMap<Integer, String> strTokenForm = new MapMaker().concurrencyLevel(2).makeMap();
|
||||
@@ -57,261 +57,261 @@ public final class SentimentValueCache {
|
||||
private final ConcurrentMap<Integer, String> stopwordTokens = new MapMaker().concurrencyLevel(2).makeMap();
|
||||
private final ConcurrentMap<Integer, String> stopWordLemma = new MapMaker().concurrencyLevel(2).makeMap();
|
||||
|
||||
public final int getPairCounter() {
|
||||
public int getPairCounter() {
|
||||
return pairCounter;
|
||||
}
|
||||
|
||||
public final void setPairCounter(int pairCounter) {
|
||||
SentimentValueCache.pairCounter = pairCounter;
|
||||
public void setPairCounter(int pairCounter) {
|
||||
this.pairCounter = pairCounter;
|
||||
}
|
||||
|
||||
public final void addStopWordLemma(String str) {
|
||||
public void addStopWordLemma(String str) {
|
||||
stopWordLemma.put(stopWordLemma.size(), str);
|
||||
}
|
||||
|
||||
public final void addstopwordTokens(String str) {
|
||||
public void addstopwordTokens(String str) {
|
||||
stopwordTokens.put(stopwordTokens.size(), str);
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getStopwordTokens() {
|
||||
public ConcurrentMap<Integer, String> getStopwordTokens() {
|
||||
return stopwordTokens;
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getStopWordLemma() {
|
||||
public ConcurrentMap<Integer, String> getStopWordLemma() {
|
||||
return stopWordLemma;
|
||||
}
|
||||
|
||||
public final void addnerEntityTokenTags(String str) {
|
||||
public void addnerEntityTokenTags(String str) {
|
||||
nerEntityTokenTags.put(nerEntityTokenTags.size(), str);
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getnerEntityTokenTags() {
|
||||
public ConcurrentMap<Integer, String> getnerEntityTokenTags() {
|
||||
return nerEntityTokenTags;
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getnerEntities1() {
|
||||
public ConcurrentMap<Integer, String> getnerEntities1() {
|
||||
return nerEntities1;
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getnerEntities2() {
|
||||
public ConcurrentMap<Integer, String> getnerEntities2() {
|
||||
return nerEntities2;
|
||||
}
|
||||
|
||||
public final void addNEREntities1(String str) {
|
||||
public void addNEREntities1(String str) {
|
||||
nerEntities1.put(nerEntities1.size(), str);
|
||||
}
|
||||
|
||||
public final void addNEREntities2(String str) {
|
||||
public void addNEREntities2(String str) {
|
||||
nerEntities2.put(nerEntities2.size(), str);
|
||||
}
|
||||
|
||||
public final void setTaggedwords(List<List<TaggedWord>> twlist) {
|
||||
public void setTaggedwords(List<List<TaggedWord>> twlist) {
|
||||
taggedwordlist = twlist;
|
||||
}
|
||||
|
||||
public final List<List<TaggedWord>> getTaggedwordlist() {
|
||||
public List<List<TaggedWord>> getTaggedwordlist() {
|
||||
return taggedwordlist;
|
||||
}
|
||||
|
||||
public final void addEntryCounts(int counts) {
|
||||
public void addEntryCounts(int counts) {
|
||||
entryCounts.put(entryCounts.size(), counts);
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, Integer> getEntryCounts() {
|
||||
public ConcurrentMap<Integer, Integer> getEntryCounts() {
|
||||
return entryCounts;
|
||||
}
|
||||
|
||||
public final void addstrTokenEntryPOS(String str) {
|
||||
public void addstrTokenEntryPOS(String str) {
|
||||
strTokenEntryPOS.put(strTokenEntryPOS.size(), str);
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getstrTokenEntryPOS() {
|
||||
public ConcurrentMap<Integer, String> getstrTokenEntryPOS() {
|
||||
return strTokenEntryPOS;
|
||||
}
|
||||
|
||||
public final void addstrTokenGetiPart(String str) {
|
||||
public void addstrTokenGetiPart(String str) {
|
||||
strTokenGetiPart.put(strTokenGetiPart.size(), str);
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getstrTokenGetiPart() {
|
||||
public ConcurrentMap<Integer, String> getstrTokenGetiPart() {
|
||||
return strTokenGetiPart;
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getstrTokenGetEntry() {
|
||||
public ConcurrentMap<Integer, String> getstrTokenGetEntry() {
|
||||
return strTokenGetEntry;
|
||||
}
|
||||
|
||||
public final void addstrTokenGetEntry(String str) {
|
||||
public void addstrTokenGetEntry(String str) {
|
||||
strTokenGetEntry.put(strTokenGetEntry.size(), str);
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getstrTokenForm() {
|
||||
public ConcurrentMap<Integer, String> getstrTokenForm() {
|
||||
return strTokenForm;
|
||||
}
|
||||
|
||||
public final void addstrTokenForm(String str) {
|
||||
public void addstrTokenForm(String str) {
|
||||
strTokenForm.put(strTokenForm.size(), str);
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getstrTokenStems() {
|
||||
public ConcurrentMap<Integer, String> getstrTokenStems() {
|
||||
return strTokenStems;
|
||||
}
|
||||
|
||||
public final void addstrTokenStems(String str) {
|
||||
public void addstrTokenStems(String str) {
|
||||
strTokenStems.put(strTokenStems.size(), str);
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getITokenMapTag() {
|
||||
public ConcurrentMap<Integer, String> getITokenMapTag() {
|
||||
return ITokenMapTag;
|
||||
}
|
||||
|
||||
public final void addITokenMapTag(String str) {
|
||||
public void addITokenMapTag(String str) {
|
||||
ITokenMapTag.put(ITokenMapTag.size(), str);
|
||||
}
|
||||
|
||||
public final int getUnmarkedPatternCounter() {
|
||||
public int getUnmarkedPatternCounter() {
|
||||
return UnmarkedPatternCounter;
|
||||
}
|
||||
|
||||
public final void setUnmarkedPatternCounter(int UnmarkedPatternCounter) {
|
||||
SentimentValueCache.UnmarkedPatternCounter = UnmarkedPatternCounter;
|
||||
public void setUnmarkedPatternCounter(int UnmarkedPatternCounter) {
|
||||
this.UnmarkedPatternCounter = UnmarkedPatternCounter;
|
||||
}
|
||||
|
||||
public final int getMarkedContiniousCounterEntries() {
|
||||
public int getMarkedContiniousCounterEntries() {
|
||||
return MarkedContiniousCounterEntries;
|
||||
}
|
||||
|
||||
public final void setMarkedContiniousCounterEntries(int MarkedContiniousCounterEntries) {
|
||||
SentimentValueCache.MarkedContiniousCounterEntries = MarkedContiniousCounterEntries;
|
||||
public void setMarkedContiniousCounterEntries(int MarkedContiniousCounterEntries) {
|
||||
this.MarkedContiniousCounterEntries = MarkedContiniousCounterEntries;
|
||||
}
|
||||
|
||||
public final int getMarkedContinuousCounter() {
|
||||
public int getMarkedContinuousCounter() {
|
||||
return MarkedContinuousCounter;
|
||||
}
|
||||
|
||||
public final void setMarkedContinuousCounter(int MarkedContinuousCounter) {
|
||||
SentimentValueCache.MarkedContinuousCounter = MarkedContinuousCounter;
|
||||
public void setMarkedContinuousCounter(int MarkedContinuousCounter) {
|
||||
this.MarkedContinuousCounter = MarkedContinuousCounter;
|
||||
}
|
||||
|
||||
public final int getInflectedCounterNegative() {
|
||||
public int getInflectedCounterNegative() {
|
||||
return inflectedCounterNegative;
|
||||
}
|
||||
|
||||
public final void setInflectedCounterNegative(int inflectedCounterNegative) {
|
||||
SentimentValueCache.inflectedCounterNegative = inflectedCounterNegative;
|
||||
public void setInflectedCounterNegative(int inflectedCounterNegative) {
|
||||
this.inflectedCounterNegative = inflectedCounterNegative;
|
||||
}
|
||||
|
||||
public final int getInflectedCounterPositive() {
|
||||
public int getInflectedCounterPositive() {
|
||||
return inflectedCounterPositive;
|
||||
}
|
||||
|
||||
public final void setInflectedCounterPositive(int inflectedCounterPositive) {
|
||||
SentimentValueCache.inflectedCounterPositive = inflectedCounterPositive;
|
||||
public void setInflectedCounterPositive(int inflectedCounterPositive) {
|
||||
this.inflectedCounterPositive = inflectedCounterPositive;
|
||||
}
|
||||
|
||||
public final int getAnotatorcounter() {
|
||||
public int getAnotatorcounter() {
|
||||
return anotatorcounter;
|
||||
}
|
||||
|
||||
public final void setAnotatorcounter(int anotatorcounter) {
|
||||
SentimentValueCache.anotatorcounter = anotatorcounter;
|
||||
public void setAnotatorcounter(int anotatorcounter) {
|
||||
this.anotatorcounter = anotatorcounter;
|
||||
}
|
||||
|
||||
public final int getTokensCounter() {
|
||||
public int getTokensCounter() {
|
||||
return tokensCounter;
|
||||
}
|
||||
|
||||
public final void setTokensCounter(int tokensCounter) {
|
||||
SentimentValueCache.tokensCounter = tokensCounter;
|
||||
public void setTokensCounter(int tokensCounter) {
|
||||
this.tokensCounter = tokensCounter;
|
||||
}
|
||||
|
||||
public final int getMainSentiment() {
|
||||
public int getMainSentiment() {
|
||||
return mainSentiment;
|
||||
}
|
||||
|
||||
public final void setMainSentiment(int mainSentiment) {
|
||||
SentimentValueCache.mainSentiment = mainSentiment;
|
||||
public void setMainSentiment(int mainSentiment) {
|
||||
this.mainSentiment = mainSentiment;
|
||||
}
|
||||
|
||||
public final int getLongest() {
|
||||
public int getLongest() {
|
||||
return longest;
|
||||
}
|
||||
|
||||
public final void setLongest(int longest) {
|
||||
SentimentValueCache.longest = longest;
|
||||
public void setLongest(int longest) {
|
||||
this.longest = longest;
|
||||
}
|
||||
|
||||
public final List getClassifyRaw() {
|
||||
public List getClassifyRaw() {
|
||||
return classifyRaw;
|
||||
}
|
||||
|
||||
public final void setClassifyRaw(List classifyRaw) {
|
||||
SentimentValueCache.classifyRaw = classifyRaw;
|
||||
public void setClassifyRaw(List classifyRaw) {
|
||||
this.classifyRaw = classifyRaw;
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, Integer> getRnnPrediectClassMap() {
|
||||
public ConcurrentMap<Integer, Integer> getRnnPrediectClassMap() {
|
||||
return rnnPredictClassMap;
|
||||
}
|
||||
|
||||
public final void addRNNPredictClass(int rnnPrediction) {
|
||||
public void addRNNPredictClass(int rnnPrediction) {
|
||||
rnnPredictClassMap.put(rnnPredictClassMap.size(), rnnPrediction);
|
||||
}
|
||||
|
||||
public final void addSimpleMatrix(SimpleMatrix SMX) {
|
||||
public void addSimpleMatrix(SimpleMatrix SMX) {
|
||||
simpleSMXlist.put(simpleSMXlist.size(), SMX);
|
||||
}
|
||||
|
||||
public final void addSimpleMatrixVector(SimpleMatrix SMX) {
|
||||
public void addSimpleMatrixVector(SimpleMatrix SMX) {
|
||||
simpleSMXlistVector.put(simpleSMXlistVector.size(), SMX);
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, GrammaticalStructure> getGsMap() {
|
||||
public ConcurrentMap<Integer, GrammaticalStructure> getGsMap() {
|
||||
return gsMap;
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, SimpleMatrix> getSimpleSMXlist() {
|
||||
public ConcurrentMap<Integer, SimpleMatrix> getSimpleSMXlist() {
|
||||
return simpleSMXlist;
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, SimpleMatrix> getSimpleSMXlistVector() {
|
||||
public ConcurrentMap<Integer, SimpleMatrix> getSimpleSMXlistVector() {
|
||||
return simpleSMXlistVector;
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, GrammaticalStructure> getGs() {
|
||||
public ConcurrentMap<Integer, GrammaticalStructure> getGs() {
|
||||
return gsMap;
|
||||
}
|
||||
|
||||
public final int getCounter() {
|
||||
public int getCounter() {
|
||||
return counter;
|
||||
}
|
||||
|
||||
public final void addGS(GrammaticalStructure gs) {
|
||||
public void addGS(GrammaticalStructure gs) {
|
||||
gsMap.put(gsMap.size(), gs);
|
||||
}
|
||||
|
||||
public final Collection<TypedDependency> getAllTypedDependencies() {
|
||||
public Collection<TypedDependency> getAllTypedDependencies() {
|
||||
return allTypedDependencies;
|
||||
}
|
||||
|
||||
public final void addTypedDependencies(Collection<TypedDependency> TDPlist) {
|
||||
public void addTypedDependencies(Collection<TypedDependency> TDPlist) {
|
||||
for (TypedDependency TDP : TDPlist) {
|
||||
allTypedDependencies.add(TDP);
|
||||
}
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, Tree> getSentenceConstituencyParseList() {
|
||||
public ConcurrentMap<Integer, Tree> getSentenceConstituencyParseList() {
|
||||
return sentenceConstituencyParseList;
|
||||
}
|
||||
|
||||
public final void addSentenceConstituencyParse(Tree tree) {
|
||||
public void addSentenceConstituencyParse(Tree tree) {
|
||||
sentenceConstituencyParseList.put(sentenceConstituencyParseList.size(), tree);
|
||||
}
|
||||
|
||||
public final void setCounter(int counter) {
|
||||
SentimentValueCache.counter = counter;
|
||||
public void setCounter(int counter) {
|
||||
counter = counter;
|
||||
}
|
||||
|
||||
public final String getSentence() {
|
||||
public String getSentence() {
|
||||
return sentence;
|
||||
}
|
||||
|
||||
@@ -320,12 +320,12 @@ public final class SentimentValueCache {
|
||||
this.counter = counter;
|
||||
}
|
||||
|
||||
public final ConcurrentMap<Integer, String> getTgwlistIndex() {
|
||||
public ConcurrentMap<Integer, String> getTgwlistIndex() {
|
||||
return tgwlistIndex;
|
||||
}
|
||||
|
||||
public final void addTgwlistIndex(String str) {
|
||||
tgwlistIndex.put(tgwlistIndex.size(), str);
|
||||
public void addTgwlistIndex(String str) {
|
||||
tgwlistIndex.put(tgwlistIndex.size(), str);
|
||||
}
|
||||
|
||||
public SentimentValueCache(String str) {
|
||||
|
||||
Reference in New Issue
Block a user