code: private Map<String, Integer> getWordFrequency(String title, String snippet) {
          List<String> titleNames = new ArrayList<>();
          List<String> snippetNames = new ArrayList<>();
  
          //处理title
          List<Word> words = WordParser.parse(title);
          for (Word word : words) {
              if (word.getPartOfSpeech().getPos().startsWith(question.getQuestionType().getPos())) {
                  titleNames.add(word.getText());
              }
          }
          //处理snippet
          words = WordParser.parse(snippet);
          for (Word word : words) {
              if (word.getPartOfSpeech().getPos().startsWith(question.getQuestionType().getPos())) {
                  snippetNames.add(word.getText());
              }
          }
  	    //统计词频
          //title中出现一次算两次
          //snippet中出现一次算一次
          Map<String, Integer> map = new HashMap<>();
          for (String name : titleNames) {
              Integer count = map.get(name);
              if (count == null) {
                  count = TITLE_WEIGHT;
              } else {
                  count += TITLE_WEIGHT;
              }
              map.put(name, count);
          }
          for (String name : snippetNames) {
              Integer count = map.get(name);
              if (count == null) {
                  count = 1;
              } else {
                  count++;
              }
              map.put(name, count);
          }
  
          return map;
      }
docs: 统计文本中出现的候选答案及其词频
  
  @return