code: private static boolean updateAttributeIfExist(String key, CoreDictionary.Attribute attribute, TreeMap<String, CoreDictionary.Attribute> map, TreeMap<Integer, CoreDictionary.Attribute> rewriteTable)
      {
          int wordID = CoreDictionary.getWordID(key);
          CoreDictionary.Attribute attributeExisted;
          if (wordID != -1)
          {
              attributeExisted = CoreDictionary.get(wordID);
              attributeExisted.nature = attribute.nature;
              attributeExisted.frequency = attribute.frequency;
              attributeExisted.totalFrequency = attribute.totalFrequency;
              // 收集该覆写
              rewriteTable.put(wordID, attribute);
              return true;
          }
  
          attributeExisted = map.get(key);
          if (attributeExisted != null)
          {
              attributeExisted.nature = attribute.nature;
              attributeExisted.frequency = attribute.frequency;
              attributeExisted.totalFrequency = attribute.totalFrequency;
              return true;
          }
  
          return false;
      }
docs: 如果已经存在该词条,直接更新该词条的属性
  @param key 词语
  @param attribute 词语的属性
  @param map 加载期间的map
  @param rewriteTable
  @return 是否更新了