// Path: src/main/java/affective/core/NegationEvaluator.java
// public class NegationEvaluator extends LexiconEvaluator {
// 
// 	/** For serialization. */
// 	private static final long serialVersionUID = 1331150082874408516L;
// 
// 	/** The negating words. */
// 	protected Set<String> wordList;
// 
// 	/**
// 	 * Initializes the Object
// 	 * 
// 	 * @param path the file with the lexicon
// 	 * @param name the prefix for all the attributes calculated from this lexicon
// 	 */
// 	public NegationEvaluator(String path, String name) {
// 		super(path, name);
// 		this.wordList=new HashSet<String>();
// 
// 		this.featureNames=new ArrayList<String>();
// 		this.featureNames.add(name+"-negationCount");
// 
// 	}
// 
// 
// 	/* (non-Javadoc)
// 	 * @see affective.core.LexiconEvaluator#processDict()
// 	 */
// 	@Override
// 	public void processDict() throws IOException {
// 		FileInputStream fin = new FileInputStream(this.path);
// 		GZIPInputStream gzis = new GZIPInputStream(fin);
// 		InputStreamReader xover = new InputStreamReader(gzis);
// 		BufferedReader bf = new BufferedReader(xover);
// 
// 		String line;
// 		while ((line = bf.readLine()) != null) {
// 			this.wordList.add(line);
// 		}
// 		bf.close();
// 		xover.close();
// 		gzis.close();
// 		fin.close();
// 
// 	}
// 
// 
// 	/* (non-Javadoc)
// 	 * @see affective.core.LexiconEvaluator#evaluateTweet(java.util.List)
// 	 */
// 	@Override
// 	public Map<String, Double> evaluateTweet(List<String> tokens) {
// 		Map<String, Double> negCountsFeat = new HashMap<String, Double>();
// 
// 		double neationCount = 0.0;
// 
// 
// 		// counts the number of negation words
// 		for (String w : tokens) {
// 			if(this.wordList.contains(w))
// 				neationCount++;
// 		}
// 
// 
// 		negCountsFeat.put(name+"-negationCount", neationCount);
// 
// 		return negCountsFeat;
// 
// 	}
// 	
// 	/**
// 	 * Gets the negating words
// 	 * 
// 	 * @return the word list
// 	 */	
// 	public Set<String> getWordList() {
// 		return wordList;
// 	}
// 
// 
// 
// }


import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import it.unimi.dsi.fastutil.objects.ObjectList;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.zip.GZIPInputStream;
import affective.core.NegationEvaluator;
import cmu.arktweetnlp.Tagger;
import cmu.arktweetnlp.impl.ModelSentence;
import cmu.arktweetnlp.impl.Sentence;
import weka.core.Attribute;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.OptionMetadata;
import weka.core.SparseInstance;
import weka.core.TechnicalInformation;
import weka.core.TechnicalInformation.Type;
				}


			}


			Instance inst=new SparseInstance(1, values);


			inst.setDataset(result);
			// copy possible strings, relational values...
			copyValues(inst, false, instances, result);

			result.add(inst);
			i++;

		}

		return result;
	}






	@OptionMetadata(displayName = "minAttDocs",
			description = "Minimum frequency of a sparse attribute to be considered in the attribute space.", 
			commandLineParamName = "M", 
			commandLineParamSynopsis = "-M <int>",
// Path: src/main/java/affective/core/NegationEvaluator.java
// public class NegationEvaluator extends LexiconEvaluator {
// 
// 	/** For serialization. */
// 	private static final long serialVersionUID = 1331150082874408516L;
// 
// 	/** The negating words. */
// 	protected Set<String> wordList;
// 
// 	/**
// 	 * Initializes the Object
// 	 * 
// 	 * @param path the file with the lexicon
// 	 * @param name the prefix for all the attributes calculated from this lexicon
// 	 */
// 	public NegationEvaluator(String path, String name) {
// 		super(path, name);
// 		this.wordList=new HashSet<String>();
// 
// 		this.featureNames=new ArrayList<String>();
// 		this.featureNames.add(name+"-negationCount");
// 
// 	}
// 
// 
// 	/* (non-Javadoc)
// 	 * @see affective.core.LexiconEvaluator#processDict()
// 	 */
// 	@Override
// 	public void processDict() throws IOException {
// 		FileInputStream fin = new FileInputStream(this.path);
// 		GZIPInputStream gzis = new GZIPInputStream(fin);
// 		InputStreamReader xover = new InputStreamReader(gzis);
// 		BufferedReader bf = new BufferedReader(xover);
// 
// 		String line;
// 		while ((line = bf.readLine()) != null) {
// 			this.wordList.add(line);
// 		}
// 		bf.close();
// 		xover.close();
// 		gzis.close();
// 		fin.close();
// 
// 	}
// 
// 
// 	/* (non-Javadoc)
// 	 * @see affective.core.LexiconEvaluator#evaluateTweet(java.util.List)
// 	 */
// 	@Override
// 	public Map<String, Double> evaluateTweet(List<String> tokens) {
// 		Map<String, Double> negCountsFeat = new HashMap<String, Double>();
// 
// 		double neationCount = 0.0;
// 
// 
// 		// counts the number of negation words
// 		for (String w : tokens) {
// 			if(this.wordList.contains(w))
// 				neationCount++;
// 		}
// 
// 
// 		negCountsFeat.put(name+"-negationCount", neationCount);
// 
// 		return negCountsFeat;
// 
// 	}
// 	
// 	/**
// 	 * Gets the negating words
// 	 * 
// 	 * @return the word list
// 	 */	
// 	public Set<String> getWordList() {
// 		return wordList;
// 	}
// 
// 
// 
// }


// Path: src/main/java/weka/filters/unsupervised/attribute/TweetToSparseFeatureVector.java
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import it.unimi.dsi.fastutil.objects.ObjectList;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.zip.GZIPInputStream;
import affective.core.NegationEvaluator;
import cmu.arktweetnlp.Tagger;
import cmu.arktweetnlp.impl.ModelSentence;
import cmu.arktweetnlp.impl.Sentence;
import weka.core.Attribute;
import weka.core.Instance;
import weka.core.Instances;
import weka.core.OptionMetadata;
import weka.core.SparseInstance;
import weka.core.TechnicalInformation;
import weka.core.TechnicalInformation.Type;

				}


			}


			Instance inst=new SparseInstance(1, values);


			inst.setDataset(result);
			// copy possible strings, relational values...
			copyValues(inst, false, instances, result);

			result.add(inst);
			i++;

		}

		return result;
	}






	@OptionMetadata(displayName = "minAttDocs",
			description = "Minimum frequency of a sparse attribute to be considered in the attribute space.", 
			commandLineParamName = "M", 
			commandLineParamSynopsis = "-M <int>",
			displayOrder = 6)	