<commit_before>package lv.miga.aiz;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import sun.reflect.generics.reflectiveObjects.NotImplementedException;

public class ParishAdmCenterLinkServiceImpl implements ParishAdmCenterLinkService {

	static Map<String, Village> capitals;

	ParishAdmCenterLinkServiceImpl() {
		if (capitals == null) {
			capitals = new HashMap<>();
			try {
				BufferedReader tsvFile = new BufferedReader(new FileReader(
						System.getProperty("user.dir") + "/src/main/resources/data/parish_adm_centers.tsv"));

				String dataRow = tsvFile.readLine();

				while (dataRow != null) {
					String[] dataArray = dataRow.split("\\t");
					Village village = new Village(dataArray[1], dataArray[2]);
					capitals.put(dataArray[0], village);

					dataRow = tsvFile.readLine();
				}
				tsvFile.close();

			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

	@Override
	public String getTitle(String name) {
		return capitals.get(name).title;
	};

	@Override
	public String getFormattedWikilink(String name, Case grammarCase) {
		Village village = capitals.get(name);
		if (grammarCase == Case.NOMINATIVE) {
			return getFormattedCapitalWikilinkNominative(village.articleTitle, village.title);
		} else if (grammarCase == Case.GENITIVE) {
			return getFormattedCapitalWikilinkGenitive(village.articleTitle, village.title);
		}
		throw new NotImplementedException();
	}
<commit_msg>Quick fix for novads only<commit_after>package lv.miga.aiz;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import sun.reflect.generics.reflectiveObjects.NotImplementedException;

public class ParishAdmCenterLinkServiceImpl implements ParishAdmCenterLinkService {

	static Map<String, Village> capitals;

	ParishAdmCenterLinkServiceImpl() {
		if (capitals == null) {
			capitals = new HashMap<>();
			try {
				BufferedReader tsvFile = new BufferedReader(new FileReader(
						System.getProperty("user.dir") + "/src/main/resources/data/parish_adm_centers.tsv"));

				String dataRow = tsvFile.readLine();

				while (dataRow != null) {
					String[] dataArray = dataRow.split("\\t");
					Village village = new Village(dataArray[1], dataArray[2]);
					capitals.put(dataArray[0], village);

					dataRow = tsvFile.readLine();
				}
				tsvFile.close();

			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

	@Override
	public String getTitle(String name) {
		return capitals.get(name).title;
	};

	@Override
	public String getFormattedWikilink(String name, Case grammarCase) {
		Village village = capitals.get(name);
		if (village != null) {
			if (grammarCase == Case.NOMINATIVE) {
				return getFormattedCapitalWikilinkNominative(village.articleTitle, village.title);
			} else if (grammarCase == Case.GENITIVE) {
				return getFormattedCapitalWikilinkGenitive(village.articleTitle, village.title);
			}
			throw new NotImplementedException();
		} else {
			return "";
		}
	}

{'fraction_non_alphanumeric': 0.11755181347150259, 'fraction_numerical': 0.0019430051813471502, 'mean_word_length': 4.409807355516637, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3226329', 'n_tokens_mistral': 1150, 'n_tokens_neox': 993, 'n_words': 197}