// Path: Contacts_1.1.0/src/com/night/contact/util/HanziToPinyin.java
// public static class Token {
//     /**
//      * Separator between target string for each source char
//      */
//     public static final String SEPARATOR = " ";
// 
//     public static final int LATIN = 1;
//     public static final int PINYIN = 2;
//     public static final int UNKNOWN = 3;
// 
//     public Token() {
//     }
// 
//     public Token(int type, String source, String target) {
//         this.type = type;
//         this.source = source;
//         this.target = target;
//     }
// 
//     /**
//      * Type of this token, ASCII, PINYIN or UNKNOWN.
//      */
//     public int type;
//     /**
//      * Original string before translation.
//      */
//     public String source;
//     /**
//      * Translated string of source. For Han, target is corresponding Pinyin. Otherwise target is
//      * original string in source.
//      */
//     public String target;
// }


import java.util.ArrayList;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
import com.night.contact.util.HanziToPinyin.Token;
	 * @return Æ´Òô
	 */
	public static String getFirstSpell(String chinese) {  
	            StringBuffer pybf = new StringBuffer();  
	            char[] arr = chinese.toCharArray();  
	            HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat();  
	            defaultFormat.setCaseType(HanyuPinyinCaseType.LOWERCASE);  
	            defaultFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE);  
	            for (char curchar : arr) {  
                    if (curchar > 128) {  
                            try {  
                                    String[] temp = PinyinHelper.toHanyuPinyinStringArray(curchar, defaultFormat);  
                                    if (temp != null) {  
                                            pybf.append(temp[0].charAt(0));  
                                    }  
                            } catch (BadHanyuPinyinOutputFormatCombination e) {  
                                    e.printStackTrace();  
                            }  
                    } else {  
                            pybf.append(curchar);  
                    }  
            }  
	            return pybf.toString().replaceAll("\\W", "").trim();  
	    } 
    
	public static String getPingYin1(String input){
		ArrayList<Token> tokens = HanziToPinyin.getInstance().get(input);
		StringBuilder sb = new StringBuilder();
		if(tokens != null && tokens.size() >0){
			for(Token token : tokens){
// Path: Contacts_1.1.0/src/com/night/contact/util/HanziToPinyin.java
// public static class Token {
//     /**
//      * Separator between target string for each source char
//      */
//     public static final String SEPARATOR = " ";
// 
//     public static final int LATIN = 1;
//     public static final int PINYIN = 2;
//     public static final int UNKNOWN = 3;
// 
//     public Token() {
//     }
// 
//     public Token(int type, String source, String target) {
//         this.type = type;
//         this.source = source;
//         this.target = target;
//     }
// 
//     /**
//      * Type of this token, ASCII, PINYIN or UNKNOWN.
//      */
//     public int type;
//     /**
//      * Original string before translation.
//      */
//     public String source;
//     /**
//      * Translated string of source. For Han, target is corresponding Pinyin. Otherwise target is
//      * original string in source.
//      */
//     public String target;
// }


// Path: Contacts_1.1.0/src/com/night/contact/util/PinyinUtils.java
import java.util.ArrayList;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
import com.night.contact.util.HanziToPinyin.Token;

	 * @return Æ´Òô
	 */
	public static String getFirstSpell(String chinese) {  
	            StringBuffer pybf = new StringBuffer();  
	            char[] arr = chinese.toCharArray();  
	            HanyuPinyinOutputFormat defaultFormat = new HanyuPinyinOutputFormat();  
	            defaultFormat.setCaseType(HanyuPinyinCaseType.LOWERCASE);  
	            defaultFormat.setToneType(HanyuPinyinToneType.WITHOUT_TONE);  
	            for (char curchar : arr) {  
                    if (curchar > 128) {  
                            try {  
                                    String[] temp = PinyinHelper.toHanyuPinyinStringArray(curchar, defaultFormat);  
                                    if (temp != null) {  
                                            pybf.append(temp[0].charAt(0));  
                                    }  
                            } catch (BadHanyuPinyinOutputFormatCombination e) {  
                                    e.printStackTrace();  
                            }  
                    } else {  
                            pybf.append(curchar);  
                    }  
            }  
	            return pybf.toString().replaceAll("\\W", "").trim();  
	    } 
    
	public static String getPingYin1(String input){
		ArrayList<Token> tokens = HanziToPinyin.getInstance().get(input);
		StringBuilder sb = new StringBuilder();
		if(tokens != null && tokens.size() >0){
			for(Token token : tokens){
				if(Token.PINYIN == token.type){