X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2Fparser%2Fenwiktionary%2FFunctionCallbacksDefault.java;h=b9fc2a28f932dc605742ea853f6aa436c513f148;hb=6e6661c2989066377a6a6693dafc0d65bfea4b82;hp=99e44d978bd6c1dbd3467e4548abf75011bded21;hpb=372a902551f43fc66b2a5e1c378392c84514c4d2;p=DictionaryPC.git diff --git a/src/com/hughes/android/dictionary/parser/enwiktionary/FunctionCallbacksDefault.java b/src/com/hughes/android/dictionary/parser/enwiktionary/FunctionCallbacksDefault.java index 99e44d9..b9fc2a2 100644 --- a/src/com/hughes/android/dictionary/parser/enwiktionary/FunctionCallbacksDefault.java +++ b/src/com/hughes/android/dictionary/parser/enwiktionary/FunctionCallbacksDefault.java @@ -20,6 +20,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Logger; import com.hughes.android.dictionary.engine.EntryTypeName; @@ -160,6 +161,10 @@ public final class FunctionCallbacksDefault { return false; } final String langCode = ListUtil.get(args, 0); + if (!appendAndIndexWikiCallback.langCodeToTCount.containsKey(langCode)) { + appendAndIndexWikiCallback.langCodeToTCount.put(langCode, new AtomicInteger()); + } + appendAndIndexWikiCallback.langCodeToTCount.get(langCode).incrementAndGet(); final String word = ListUtil.get(args, 1); final String gender = ListUtil.get(args, 2); // TODO: deal with second (and third...) gender, and alt.