Permalink
Browse files

重新制作词库

  • Loading branch information...
1 parent 160f640 commit 3404f89a2b576313bec3e463d4bb07d459bec3b6 @88250 88250 committed Jul 15, 2014
@@ -98,7 +98,13 @@ public static void main(final String[] args) throws Exception {
word.setId(UUID.randomUUID().toString().replaceAll("-", ""));
final Element w = li.select("div.word_main_list_w").get(0);
- final String spell = w.select("span").get(0).attr("title").trim();
+ String spell = w.select("span").get(0).attr("title");
+
+ // 移除源词库中有误字符
+ spell = spell.replace("*", "").replaceAll("\\(.*\\)", "").replace("\\", "");
+
+ spell = spell.trim();
+
word.setWord(spell);
if (!checkWord(spell)) { // 如果存在特殊拼写
throw new IllegalStateException("存在特殊拼写 [" + spell + ']');
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 3404f89

Please sign in to comment.