package de.duehl.vocabulary.japanese.logic.symbol.kanji.strokes.test;

import java.util.List;
import java.util.Map;

import de.duehl.basics.collections.CollectionsHelper;
import de.duehl.basics.text.NumberString;
import de.duehl.vocabulary.japanese.logic.symbol.kanji.strokes.own.KanjiStrokesDataStructureGenerator;
import de.duehl.vocabulary.japanese.logic.symbol.kanji.strokes.own.data.KanjiStrokePath;
import de.duehl.vocabulary.japanese.logic.symbol.kanji.strokes.tools.CodePointTools;

public class StartKanjiStrokesDataStructureGeneratorForTesting {

    public static void main(String[] args) {
        KanjiStrokesDataStructureGenerator generator = new KanjiStrokesDataStructureGenerator();
        generator.generate();
        Map<Integer, List<KanjiStrokePath>> kanjiStrokesByCodePoint =
                generator.getKanjiStrokesByCodePoint();
        System.out.println(
                "Anzahl CodePoints : " + NumberString.taupu(kanjiStrokesByCodePoint.size()));
        String kanji = "漢";
        int codePoint = CodePointTools.characterToCodePoint(kanji);
        System.out.println("codePoint = " + codePoint);
        List<KanjiStrokePath> hanKanjiStrokes = kanjiStrokesByCodePoint.get(codePoint);
        System.out.println("Zum Kanji " + kanji + " bzw. dem Code-Point " + codePoint + " wurden "
                + NumberString.taupu(hanKanjiStrokes.size()) + " Pfade gefunden:");
        CollectionsHelper.printListNice(hanKanjiStrokes);
    }

}
