get Contractions String - Java java.lang

Java examples for java.lang:String Algorithm

Description

get Contractions String

Demo Code


//package com.java2s;
import java.util.HashMap;

public class Main {
    public static void main(String[] argv) throws Exception {
        getContractions();/*www  .  j av a2  s.co m*/
    }

    public static HashMap<String, String> contractions;

    private static void getContractions() {
        // TODO Auto-generated method stub
        contractions = new HashMap<String, String>();
        contractions.put("won't", "will not");
        contractions.put("shan't", "shall not");
        contractions.put("let's", "let us");
        contractions.put("that's", "that is");
        contractions.put("it's", "it is");
        contractions.put("'em", "them");
    }
}

Related Tutorials