class CombiningTagger implements WordTagger {

  private final WordTagger tagger1;
  private final WordTagger tagger2;
  private final WordTagger removalTagger;
  private final boolean overwriteWithSecondTagger;

  public CombiningTagger(WordTagger tagger1, WordTagger tagger2, boolean overwriteWithSecondTagger) {
    this(tagger1, tagger2, null, overwriteWithSecondTagger);
  }

  /**
   * @param tagger1 typically the tagger that takes its data from the binary file
   * @param tagger2 typically the tagger that takes its data from the plain text file {@code added.txt}
   * @param removalTagger the tagger that removes readings which takes its data from the plain text file {@code removed.txt}, or {@code null}
   * @param overwriteWithSecondTagger if set to {@code true}, only the second tagger's result will be
   *                                  used if both first and second tagger can tag that word
   * @since 3.2
   */
  public CombiningTagger(WordTagger tagger1, WordTagger tagger2, WordTagger removalTagger, boolean overwriteWithSecondTagger) {
    this.tagger1 = tagger1;
    this.tagger2 = tagger2;
    this.removalTagger = removalTagger;
    this.overwriteWithSecondTagger = overwriteWithSecondTagger;
  }

  @Override
  public List<TaggedWord> tag(String word) {<FILL_FUNCTION_BODY>}

  /**
   * @return removal tagger
   * @since 5.0
   */
  @Nullable
  public WordTagger getRemovalTagger() {
    return removalTagger;
  }
  
}

    List<TaggedWord> result = new ArrayList<>();
    result.addAll(tagger2.tag(word));
    if (!(overwriteWithSecondTagger && result.size() > 0)) {
      result.addAll(tagger1.tag(word));
    }
    if (removalTagger != null) {
      List<TaggedWord> removalTags = removalTagger.tag(word);
      result.removeAll(removalTags);
    }
    return result;
  
<no_super_class>