带词性标注（包括细分词性标注）的分析方法

@param str 需要分词的文本
@return 分词结果
424904
public static List<Word> parseWithoutStopWords(String str) {
        List<Word> words = WordSegmenter.seg(str, SegmentationAlgorithm.MaxNgramScore);
        //词性标注
        PartOfSpeechTagging.process(words);
        return words;
    }
152748
public static String[] splitLongString(String str, char separator)
    {
        int len = (str == null) ? 0 : str.length();
        if (str == null || len == 0)
        {
            return ArrayUtils.EMPTY_STRING_ARRAY;
        }

        int       oldPos = 0;
        ArrayList list = new ArrayList();
        int pos = str.indexOf(separator);
        while(pos >= 0)
        {
            list.add(substring(str, oldPos, pos));
            oldPos = (pos + 1);
            pos = str.indexOf(separator, oldPos);
        }


        list.add(substring(str, oldPos, len));

        return (String[]) list.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
    }
1187972
public String getLooseMap (String str) throws Exception {
		if(is==null)
			is = new EditDistanceWithSemantic();

		String resName = str;

		if(str==null||str.trim().length()==0)
			return resName;
		for(Iterator it = nameMap.keySet().iterator();it.hasNext();){
			str = (String) it.next();
			if(is.calc(str,resName)==0){
				resName = nameMap.get(str);
				System.out.println("匹配："+str+"<"+resName);
				break;
			}
		}
		return resName;
	}
921866
public String toTrad(String str) {   
		char[] c = str.toCharArray();
		for (int i = 0; i < str.length(); i++) {   
			char cc = s2l.get(c[i]);
			if (cc != 0) {   
				c[i] = cc;   
			} 
		}   
		return new String(c);   
	}
1265566
public static String extractGroup(String[] strs) {
        if (strs.length < 6) return null;
        return strs[strs.length - 2];
    }
229097
public static String[] splitToArray(String str, String separator, int limit, boolean isTrim, boolean ignoreEmpty){
		return toArray(split(str, separator, limit, isTrim, ignoreEmpty));
	}
962596
public static StringType getStringType(String str) {
		TreeSet<CharType> set = getTypeSet(str);
		if(set.size()==1){
			CharType c = set.first();
			return char2StringType(c);
		}
		return StringType.M;		
	}
1122680
public static String decodeString(String str) {
		try {
			return new String(Base64.decode(str));
		} catch (IOException io) {
			throw new RuntimeException(io.getMessage(), io.getCause());
		}
	}
888260
public static byte[] getUnicodeByteArray(String str) {
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		DataOutputStream dos = new DataOutputStream(baos);
		try {
			for (int i = 0; i < str.length(); i++) {
				dos.writeChar((int) str.charAt(i));
			}
		} catch (Exception e) {
		}

		return baos.toByteArray();
	}
98013
private String trim(final String str) {

        final int length = str.length();
        if(length == 0) {
            return str;
        }

        if(leftAlign) {
            if(str.charAt(0) != trimChar) {
                // 左端がトリム対象の文字出ない場合、処理終了
                return str;

            }

            // 左側から、trimCharに一致しない位置を探す
            for(int i=0; i < length; i++) {
                char c = str.charAt(i);
                if(c != trimChar) {
                    return str.substring(i);
                }
            }

            // 全ての文字がトリム対象の場合
            return "";

        } else {
            if(str.charAt(length - 1) != trimChar) {
                // 右端がトリム対象の文字出ない場合、処理終了
                return str;

            }

            // 右側から、trimCharに一致しない位置を探す
            for(int i=length - 1; i >= 0; i--) {
                char c = str.charAt(i);
                if(c != trimChar) {
                    return str.substring(0, i + 1);
                }
            }

            // 全ての文字がトリム対象の場合
            return "";

        }

    }
824596
public static String decode(final String str) {
        try {
            return URLDecoder.decode(str, "UTF-8");
        } catch (final Exception e) {
            LOGGER.log(Level.WARN, "Decodes str [" + str + "] failed", e);

            return str;
        }
    }
1118773
public static TreeSet<CharType> getTypeSet(String str) {
		CharType[] tag = getType(str);
		TreeSet<CharType> set = new TreeSet<CharType>();
		for(int i=0;i<tag.length;i++){
			set.add(tag[i]);			
		}	
		return set;
	}
950411
public static final String decode(String str)
    {
        Matcher m = ENT.matcher(str);
        StringBuffer sb = new StringBuffer();
        while (m.find())
        {
            String entity = m.group(1);
            Matcher m2 = HENT.matcher(entity);
            Integer codePoint = null;
            if (m2.matches())
            {
                codePoint = Integer.parseInt(m2.group(1));
            }
            else
            {
                codePoint = codePointMap.get(entity);
            }
            if (codePoint == null)
            {
                m.appendReplacement(sb, m.group());
            }
            else
            {
                String s = new String(new int[] {codePoint.intValue()}, 0, 1);
                m.appendReplacement(sb, s);
            }
        }
        m.appendTail(sb);
        return sb.toString();
    }
1262530
public static String getTypeString(String str) {
		CharType[] tag = getType(str);
		String s = type2String(tag);		
		return s;
	}
1291035
private List<String> sentenceSplit(String str) {
		BreakIterator iterator = BreakIterator.getSentenceInstance(Locale.US);
		iterator.setText(str);
		int start = iterator.first();
		List<String> sentences = new ArrayList<String>();
		for (int end = iterator.next();
			 end != BreakIterator.DONE;
			 start = end, end = iterator.next()) {
			sentences.add(str.substring(start, end).trim());
		}
		return sentences;
	}
764657
public static Set<String> commaDelimitedListToSet(String str) {
        Set<String> set = new TreeSet<String>();
        String[] tokens = commaDelimitedListToStringArray(str);
        Collections.addAll(set, tokens);
        return set;
    }
754311
public StrBuilder deleteAll(final String str) {
        final int len = (str == null ? 0 : str.length());
        if (len > 0) {
            int index = indexOf(str, 0);
            while (index >= 0) {
                deleteImpl(index, index + len, len);
                index = indexOf(str, index);
            }
        }
        return this;
    }