code: private static void cleanupHistogram(String tagName, Map<String, Double> histogram) {
          switch (tagName) {
              case "csymbol":
                  histogram.remove("based_integer");
                  for (String key : ValidCSymbols.VALID_CSYMBOLS) {
                      histogram.remove(key);
                  }
                  break;
              case "ci":
                  histogram.remove("integer");
                  break;
              case "cn":
                  Set<String> toberemovedKeys = new HashSet<>();
                  for (String key : histogram.keySet()) {
                      if (!isNumeric(key)) {
                          toberemovedKeys.add(key);
                      }
                  }
                  // now we can remove the keys
                  for (String key : toberemovedKeys) {
                      histogram.remove(key);
                  }
                  break;
              default: // ignore others
          }
      }
docs: this cleanup is necessary due to errors in the xslt conversion script (contentmathmml to strict cmml)
  
  @param tagName
  @param histogram