Examples of SWNEntryVal


Examples of seekfeel.dataholders.SWNEntryVal

    }

    private void updateAllFeatures(ArrayList<Feature> allFeats, ParsedData parsingResult, ArrayList<Word> allWords) {
        ArrayList<WordPos> taggedWords = parsingResult.getTaggedWords();
        SWNEntryKey tempFeatKey;
        SWNEntryVal tempFeatVal;
        SentimentFeature tempFeature;

        for (WordPos word : taggedWords) {
            tempFeatKey = new SWNEntryKey(allWords.get(word.getWordIndex()).word(), TagParser.parseTagToGeneral(word.getWordTag()));
            tempFeature = new SentimentFeature(tempFeatKey);
            if (!allFeats.contains(tempFeature)) {
                tempFeatVal = SentiWordNetDict.extract(tempFeatKey);
                if (tempFeatVal.getObjectivityScore() > 0.5 || tempFeatVal.getPositiveSocre() == tempFeatVal.getNegativeScore()) {
                    continue;
                }
                tempFeature.setFinalWeight(tempFeatVal);
                allFeats.add(tempFeature);
            }
View Full Code Here

Examples of seekfeel.dataholders.SWNEntryVal

     /*   Double clueWeight = SubjectiveCluesHolder.extractWeight(tempWord, TagParser.parseTagToGeneral(pTag));
        if (clueWeight != null) {
        return clueWeight;
        }*/

        SWNEntryVal currentEntry = SentiWordNetDict.extract(tempWord, TagParser.parseTagToGeneral(pTag));
        double lexicalWeight = LexiconHolder.getWordWeight(tempWord);
        if (currentEntry == null && lexicalWeight == 0) {
            return 0.0;
        }
        if (lexicalWeight != 0) {
            return lexicalWeight;
        }
        double sentiEntriScore = currentEntry.getPositiveSocre() - currentEntry.getNegativeScore();
        return sentiEntriScore;

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.