/* LanguageTool, a natural language style checker 
 * Copyright (C) 2006 Daniel Naber (http://www.danielnaber.de)
 * 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */
package org.languagetool.tagging.nl;

import java.util.Locale;

import org.languagetool.tagging.BaseTagger;

/**
 * Dutch tagger.
 * 
 * @author Marcin Milkowski
 */
public class DutchTagger extends BaseTagger {

  @Override
  public String getManualAdditionsFileName() {
    return "/nl/added.txt";
  }

  @Override
  public String getManualRemovalsFileName() {
    return "/nl/removed.txt";
  }

  public DutchTagger() {
    super("/nl/dutch.dict",  new Locale("nl"));
  }
}

@@ -908,21 +908,186 @@
 ava.
-util.Locale;%0A
+io.IOException;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Locale;%0A%0Aimport org.languagetool.AnalyzedToken;%0Aimport org.languagetool.AnalyzedTokenReadings;
 %0Aimp
@@ -1126,16 +1126,59 @@
 eTagger;
+%0Aimport org.languagetool.tools.StringTools;
 %0A%0A/**%0A *
@@ -1537,10 +1537,843 @@
 ));%0A  %7D%0A
+  %0A  @Override%0A  public List%3CAnalyzedTokenReadings%3E tag(List%3CString%3E sentenceTokens)%0A      throws IOException %7B%0A    List%3CAnalyzedTokenReadings%3E tokenReadings = new ArrayList%3C%3E();%0A    int pos = 0;%0A    for (String word : sentenceTokens) %7B%0A      List%3CAnalyzedToken%3E l = getAnalyzedTokens(word);%0A      %0A      if (l.isEmpty()) %7B%0A        String word2 = word;%0A        word2 = word2.replace(%22%C3%A1%22, %22a%22).replace(%22%C3%A9%22, %22e%22).replace(%22%C3%AD%22,%22i%22).replace(%22%C3%B3%22,%22o%22).replace(%22%C3%BA%22,%22u%22);%0A        if (!word2.equals(word)) %7B%0A          List%3CAnalyzedToken%3E l2  = asAnalyzedTokenListForTaggedWords(word, getWordTagger().tag(word2));%0A          if (l2 != null) %7B%0A            l.addAll(l2);%0A          %7D%0A        %7D%0A      %7D%0A      %0A      tokenReadings.add(new AnalyzedTokenReadings(l, pos));%0A      pos += word.length();%0A      %0A    %7D%0A    %0A    return tokenReadings;%0A  %7D%0A  %0A
 %7D%0A

drop accents for tagging