/**
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package at.illecker.storm.commons.svm.featurevector;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import at.illecker.storm.commons.tweet.FeaturedTweet;
import at.illecker.storm.commons.tweet.TaggedTweet;

public abstract class FeatureVectorGenerator {
  private static final Logger LOG = LoggerFactory
      .getLogger(FeatureVectorGenerator.class);

  public abstract int getFeatureVectorSize();

  public abstract Map<Integer, Double> calculateFeatureVector(TaggedTweet tweet);

  public List<FeaturedTweet> generateFeatureVectors(List<TaggedTweet> tweets,
      boolean logging) {
    List<FeaturedTweet> featuredTweets = new ArrayList<FeaturedTweet>();
    for (TaggedTweet tweet : tweets) {
      Map<Integer, Double> featureVector = this.calculateFeatureVector(tweet);
      if (logging) {
        LOG.info("Tweet: " + tweet);
        LOG.info("FeatureVector: " + featureVector);
      }
      featuredTweets.add(new FeaturedTweet(tweet.getId(), tweet.getText(),
          tweet.getScore(), featureVector));
    }
    return featuredTweets;
  }

  public List<FeaturedTweet> generateFeatureVectors(List<TaggedTweet> tweets) {
    return generateFeatureVectors(tweets, false);
  }
}

@@ -993,105 +993,40 @@
 ort 
-at.illecker.storm.commons.tweet.FeaturedTweet;%0Aimport at.illecker.storm.commons.tweet
+edu.stanford.nlp.ling
 .Tagged
-Tweet
+Word
 ;%0A%0Ap
@@ -1279,27 +1279,39 @@
 eVector(
+%0A      List%3C
 Tagged
-Tweet
+Word%3E
  tweet);
@@ -1322,37 +1322,44 @@
 public List%3C
-FeaturedTweet
+Map%3CInteger, Double%3E
 %3E generateFe
@@ -1375,39 +1375,205 @@
 ors(
-List%3CTaggedTweet%3E tweets,%0A     
+%0A      List%3CList%3CTaggedWord%3E%3E tweets) %7B%0A    return generateFeatureVectors(tweets, false);%0A  %7D%0A%0A  public List%3CMap%3CInteger, Double%3E%3E generateFeatureVectors(%0A      List%3CList%3CTaggedWord%3E%3E taggedTweets,
  boo
@@ -1597,29 +1597,36 @@
    List%3C
-FeaturedTweet
+Map%3CInteger, Double%3E
 %3E featur
@@ -1627,21 +1627,22 @@
 featured
-Tweet
+Vector
 s = new 
@@ -1651,29 +1651,36 @@
 rayList%3C
-FeaturedTweet
+Map%3CInteger, Double%3E
 %3E();%0A   
@@ -1685,27 +1685,32 @@
    for (
+List%3C
 Tagged
-Tweet
+Word%3E
  tweet :
@@ -1711,16 +1711,22 @@
 weet : t
+aggedT
 weets) %7B
@@ -1942,97 +1942,20 @@
 ured
-Tweets.add(new FeaturedTweet(tweet.getId(), tweet.getText(),%0A          tweet.getScore(), 
+Vectors.add(
 feat
@@ -1964,17 +1964,16 @@
 eVector)
-)
 ;%0A    %7D%0A
@@ -1995,153 +1995,20 @@
 ured
-Tweets;%0A  %7D%0A%0A  public List%3CFeaturedTweet%3E generateFeatureVectors(List%3CTaggedTweet%3E tweets) %7B%0A    return generateFeatureVectors(tweets, false)
+Vectors
 ;%0A  %7D%0A
+%0A
 %7D%0A

Update abstract FeatureVectorGenerator