<commit_before>package de.ifcore.hdv.converter.parser;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import org.apache.poi.ss.usermodel.Row;

import de.ifcore.hdv.converter.data.LabelAgs;

public class AreaLabelParser extends AbstractExcelParser {

	public AreaLabelParser(InputStream in) {
		super(in, 1, 8);
	}

	public Map<String, LabelAgs> parse() {
		return parseRows(rowIterator);
	}

	private Map<String, LabelAgs> parseRows(Iterator<Row> rowIterator) {
		Map<String, LabelAgs> result = new HashMap<>();
		while (rowIterator.hasNext()) {
			Row row = rowIterator.next();
			String areaKey = parseCellsIntoOne(row, new int[] { 2, 3, 4, 5, 6 });
			String ags = parseCellsIntoOne(row, new int[] { 2, 3, 4, 6 });
			if (areaKey != null && !areaKey.isEmpty()) {
				String label = getCellStringValue(row, 7);
				if (label != null)
					result.put(areaKey, new LabelAgs(label, ags));
			}
		}
		return result;
	}
}<commit_msg>LK key auf 5 stellen begrenzt<commit_after>package de.ifcore.hdv.converter.parser;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import org.apache.poi.ss.usermodel.Row;

import de.ifcore.hdv.converter.data.LabelAgs;

public class AreaLabelParser extends AbstractExcelParser {

	public AreaLabelParser(InputStream in) {
		super(in, 1, 8);
	}

	public Map<String, LabelAgs> parse() {
		return parseRows(rowIterator);
	}

	private Map<String, LabelAgs> parseRows(Iterator<Row> rowIterator) {
		Map<String, LabelAgs> result = new HashMap<>();
		while (rowIterator.hasNext()) {
			Row row = rowIterator.next();
			String areaKey = parseCellsIntoOne(row, new int[] { 2, 3, 4, 5, 6 });
			String ags = parseCellsIntoOne(row, new int[] { 2, 3, 4 });
			if (areaKey != null && !areaKey.isEmpty()) {
				String label = getCellStringValue(row, 7);
				if (label != null)
					result.put(areaKey, new LabelAgs(label, ags));
			}
		}
		return result;
	}
}
{'fraction_non_alphanumeric': 0.13826043237807945, 'fraction_numerical': 0.012066365007541479, 'mean_word_length': 4.335120643431635, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1091251', 'n_tokens_mistral': 774, 'n_tokens_neox': 684, 'n_words': 168}