|
@@ -12,8 +12,14 @@ import java.util.stream.Collectors;
|
|
|
/**
|
|
|
* @author: XuJiakai
|
|
|
* 2022/3/4 10:31
|
|
|
+ * <p>
|
|
|
+ * func name: find_traditional_2_simple_error
|
|
|
*/
|
|
|
public class FindTraditional2SimpleError extends UDF {
|
|
|
+ /**
|
|
|
+ * @param val
|
|
|
+ * @return true:相同,false:转换异常
|
|
|
+ */
|
|
|
public Boolean evaluate(String cname, String historyNames) {
|
|
|
if (StringUtils.isEmpty(cname) && StringUtils.isEmpty(historyNames)) {
|
|
|
return true;
|
|
@@ -48,5 +54,8 @@ public class FindTraditional2SimpleError extends UDF {
|
|
|
System.out.println(simple.evaluate("文徵明",null));
|
|
|
System.out.println(simple.evaluate("徵信",null));
|
|
|
System.out.println(simple.evaluate("瞭望",null));
|
|
|
+ String name = "合得五金錶帶塑膠有限公司";
|
|
|
+ System.out.println(ChineseHelper.convertToSimplifiedChinese(name));
|
|
|
+ System.out.println(ZhConverterUtil.toSimple(name));
|
|
|
}
|
|
|
}
|