static { String emotion_string = IOUtil.readDirOrFile(SystemParas.dic_system_positive_path, StaticValue.default_encoding); BufferedReader br = new BufferedReader(new StringReader(emotion_string)); String temp_line = null; try { while ((temp_line = br.readLine()) != null) { temp_line = ComplexToSimpleManager.getSimpleFont( temp_line.trim().split(StaticValue.separator_tab)[0]); positiveWordSet.add(temp_line); emotionWordSet.add(temp_line); } emotion_string = IOUtil.readDirOrFile(SystemParas.dic_system_negative_path, StaticValue.default_encoding); br = new BufferedReader(new StringReader(emotion_string)); while ((temp_line = br.readLine()) != null) { temp_line = ComplexToSimpleManager.getSimpleFont( temp_line.trim().split(StaticValue.separator_tab)[0]); negativeWordSet.add(temp_line); emotionWordSet.add(temp_line); } } catch (Exception e) { e.printStackTrace(); } finally { try { br.close(); } catch (IOException e) { e.printStackTrace(); } } }
static { String emotion_string = IOUtil.readDirOrFile(SystemParas.dic_system_deny_path, StaticValue.default_encoding); BufferedReader br = new BufferedReader(new StringReader(emotion_string)); String temp_line = null; try { while ((temp_line = br.readLine()) != null) { // System.out.println("***" + temp_line); temp_line = ComplexToSimpleManager.getSimpleFont(temp_line.trim()); // temp_line = temp_line.trim(); denyWordSet.add(temp_line); } } catch (Exception e) { e.printStackTrace(); } finally { try { br.close(); } catch (IOException e) { e.printStackTrace(); } } }