class PolishTagger extends BaseTagger {
  public PolishTagger() {
    super("/pl/polish.dict", new Locale("pl"));
  }

  @Override
  public final List<AnalyzedTokenReadings> tag(List<String> sentenceTokens) {<FILL_FUNCTION_BODY>}

  private void addTokens(List<AnalyzedToken> taggedTokens, List<AnalyzedToken> l) {
    if (taggedTokens != null) {
      for (AnalyzedToken at : taggedTokens) {
        String[] tagsArr = StringTools.asString(at.getPOSTag()).split("\\+");
        for (String currTag : tagsArr) {
          l.add(new AnalyzedToken(at.getToken(), currTag, at.getLemma()));
        }
      }
    }
  }

}

    List<AnalyzedToken> taggerTokens;
    List<AnalyzedToken> lowerTaggerTokens;
    List<AnalyzedToken> upperTaggerTokens;    
    List<AnalyzedTokenReadings> tokenReadings = new ArrayList<>();
    int pos = 0;

    for (String word : sentenceTokens) {
      List<AnalyzedToken> l = new ArrayList<>();
      String lowerWord = word.toLowerCase(locale);
      taggerTokens = asAnalyzedTokenListForTaggedWords(word, getWordTagger().tag(word));
      lowerTaggerTokens = asAnalyzedTokenListForTaggedWords(word, getWordTagger().tag(lowerWord));
      boolean isLowercase = word.equals(lowerWord);

      //normal case
      addTokens(taggerTokens, l);

      if (!isLowercase) {
        //lowercase
        addTokens(lowerTaggerTokens, l);
      }

      //uppercase
      if (lowerTaggerTokens.isEmpty() && taggerTokens.isEmpty()) {
        if (isLowercase) {
          upperTaggerTokens = asAnalyzedTokenListForTaggedWords(word,
              getWordTagger().tag(StringTools.uppercaseFirstChar(word)));
          if (!upperTaggerTokens.isEmpty()) {
            addTokens(upperTaggerTokens, l);
          } else {
            l.add(new AnalyzedToken(word, null, null));
          }
        } else {
          l.add(new AnalyzedToken(word, null, null));
        }
      }
      tokenReadings.add(new AnalyzedTokenReadings(l, pos));
      pos += word.length();
    }

    return tokenReadings;
  
<methods>public void <init>(java.lang.String, java.util.Locale) ,public void <init>(java.lang.String, java.util.Locale, boolean) ,public void <init>(java.lang.String, java.util.Locale, boolean, boolean) ,public final org.languagetool.AnalyzedTokenReadings createNullToken(java.lang.String, int) ,public org.languagetool.AnalyzedToken createToken(java.lang.String, java.lang.String) ,public java.lang.String getDictionaryPath() ,public List<java.lang.String> getManualAdditionsFileNames() ,public List<java.lang.String> getManualRemovalsFileNames() ,public boolean overwriteWithManualTagger() ,public List<org.languagetool.AnalyzedTokenReadings> tag(List<java.lang.String>) throws java.io.IOException<variables>private static final java.lang.String CUSTOM_MANUAL_ADDITIONS_FILE,private static final java.lang.String CUSTOM_MANUAL_REMOVALS_FILE,private static final java.lang.String MANUAL_ADDITIONS_FILE,private static final java.lang.String MANUAL_REMOVALS_FILE,private final non-sealed Dictionary#RAW dictionary,private final non-sealed java.lang.String dictionaryPath,protected final non-sealed java.util.Locale locale,private final non-sealed boolean tagLowercaseWithUppercase,protected final non-sealed org.languagetool.tagging.WordTagger wordTagger