/**
 * 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.examples.util.wordlist;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

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

import at.illecker.storm.examples.util.Configuration;
import at.illecker.storm.examples.util.io.FileUtils;

public class SlangCorrection {
  private static final Logger LOG = LoggerFactory
      .getLogger(SlangCorrection.class);
  private static final SlangCorrection instance = new SlangCorrection();

  private Map<String, String[]> m_slangWordList = new HashMap<String, String[]>();

  private SlangCorrection() {
    Map<String, Properties> slangWordLists = Configuration.getSlangWordlists();
    for (Map.Entry<String, Properties> slangWordListEntry : slangWordLists
        .entrySet()) {
      String file = slangWordListEntry.getKey();
      String separator = slangWordListEntry.getValue().getProperty("separator");

      LOG.info("Load SlangLookupTable from: " + file);
      Map<String, String> slangWordList = FileUtils.readFile(file, separator);
      for (Map.Entry<String, String> entry : slangWordList.entrySet()) {
        if (!m_slangWordList.containsKey(entry.getKey())) {
          m_slangWordList.put(entry.getKey(), entry.getValue().split(" "));
        }
      }
    }
  }

  public static SlangCorrection getInstance() {
    return instance;
  }

  public String[] getCorrection(String token) {
    // LOG.info("getCorrection('" + token + "'): "
    // + Arrays.toString(m_slangWordList.get(token)));
    return m_slangWordList.get(token);
  }

  public static void main(String[] args) {
    SlangCorrection slangCorrection = SlangCorrection.getInstance();
    System.out.println("SlangCorrection of 'afaik': '"
        + Arrays.toString(slangCorrection.getCorrection("afaik")) + "'");
    System.out.println("SlangCorrection of 'cum': '"
        + Arrays.toString(slangCorrection.getCorrection("cum")) + "'");
  }
}

@@ -2507,38 +2507,39 @@
 em.out.println(%22
-S
+s
 lang
-C
+ c
 orrection of 'af
@@ -2645,22 +2645,23 @@
 rintln(%22
-S
+s
 lang
-C
+ c
 orrectio
@@ -2747,14 +2747,138 @@
 + %22'%22);%0A
+    System.out.println(%22slang correction of 'w/': '%22%0A        + Arrays.toString(slangCorrection.getCorrection(%22w/%22)) + %22'%22);%0A
   %7D%0A%7D%0A

Add with check in SlangCorrection