Examples of SWNEntryKey


Examples of seekfeel.dataholders.SWNEntryKey

        opts.setPosTag(true);
        opts.setNeededTags(neededTags);

        ParsedData outData = theParser.parse(allWords, opts);
        ArrayList<WordPos> taggedWords = outData.getTaggedWords();
        SWNEntryKey tempFeatKey;
        SentimentFeature tempFeature;

        for (WordPos word : taggedWords) {
            tempFeatKey = new SWNEntryKey(allWords.get(word.getWordIndex()).word(), TagParser.parseTagToGeneral(word.getWordTag()));
            tempFeature = new SentimentFeature(tempFeatKey);
            int featIndex = features.indexOf(tempFeature);
            if (featIndex >= 0) {
                featureVector.put(featIndex, ((SentimentFeature) features.get(featIndex)).getFinalWeight());
            }
View Full Code Here

Examples of seekfeel.dataholders.SWNEntryKey

        return allFeats;
    }

    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;
View Full Code Here

Examples of seekfeel.dataholders.SWNEntryKey

            System.out.println(e.toString());
        }
    }

    public static SWNEntryVal extract(String word, PosTag pTag) {
        SWNEntryKey currentKey = new SWNEntryKey(word.toLowerCase(), pTag);
        return extract(currentKey);
    }
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.