code: public void addOrMergeMention(Mention mention)
      {
          if (!mention.getSentence().equals(this))
              throw new IllegalArgumentException();
          List<Mention> overlapping = new ArrayList<Mention>();
          for (Mention mention2 : mentions)
          {
              if (mention.overlaps(mention2) && mention.getType().equals(mention2.getType()))
                  overlapping.add(mention2);
          }
          if (overlapping.size() == 0)
          {
              mentions.add(mention);
          }
          else
          {
              for (Mention mention2 : overlapping)
              {
                  mentions.remove(mention2);
                  mentions.add(new Mention(this, mention.getType(), Math.min(mention.getStart(), mention2.getStart()), Math.max(mention.getEnd(),
                                                                                                                                mention2.getEnd())));
              }
          }
      }
docs: Adds a {@link Mention} to this Sentence or merges the {@link Mention} into an existing {@link Mention} which the new one would overlap.
  Normally called by instance of {@link Tagger} or post-processors.
  
  @param mention