@@ -0,0 +1,2073 @@
+/**%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage at.illecker.storm.examples.util.wordnet;%0A%0Aimport edu.mit.jwi.item.POS;%0A%0Apublic class POSTag %7B%0A  // The WordNet Lemmatizer only knows four part of speech tags%0A  // Noun, Verb, Adjective, Adverb;%0A  // Only the Noun and Verb rules are interesting.%0A%0A  public static POS parseString(String tag) %7B%0A    switch (tag.charAt(0)) %7B%0A      case 'n':%0A        return POS.NOUN;%0A      case 'v':%0A        return POS.VERB;%0A      case 'a':%0A        return POS.ADJECTIVE;%0A      case 'r':%0A        return POS.ADVERB;%0A      default:%0A        throw new IllegalStateException(%22Unknown POS tag '%22 + tag + %22'!%22);%0A    %7D%0A  %7D%0A%0A  public static String toString(POS posTag) %7B%0A    switch (posTag) %7B%0A      case NOUN:%0A        return %22n%22;%0A      case VERB:%0A        return %22v%22;%0A      case ADJECTIVE:%0A        return %22a%22;%0A      case ADVERB:%0A        return %22r%22;%0A      default:%0A        throw new IllegalStateException(%22Unknown POS tag '%22 + posTag + %22'!%22);%0A    %7D%0A  %7D%0A%0A  public static POS convertString(String pennTag) %7B%0A    if (pennTag.startsWith(%22NN%22)) %7B%0A      return POS.NOUN;%0A    %7D%0A    if (pennTag.startsWith(%22VB%22)) %7B%0A      return POS.VERB;%0A    %7D%0A    if (pennTag.startsWith(%22JJ%22)) %7B%0A      return POS.ADJECTIVE;%0A    %7D%0A    if (pennTag.startsWith(%22RB%22)) %7B%0A      return POS.ADVERB;%0A    %7D%0A    return null;%0A  %7D%0A%7D%0A

Add POSTag util