private void load(InputStream is) throws IOException {
		Map<String, Set<Lemma>> lemmas = new HashMap<>();
		Set<String> allPrefixes = new HashSet<>();
		Set<String> allEndings = new HashSet<>();

		BufferedReader reader = new BufferedReader(new InputStreamReader(is, UTF_8));

		int sectionLength = parseInt(reader.readLine());
		List<List<Flexion>> paradigms = new ArrayList<>(sectionLength);
		List<Set<String>> paradigmEndings = new ArrayList<>(sectionLength);
		Map<Integer, Set<String>> paradigmPrefixes = new HashMap<>();
		List<String> paradigmAncodes = new ArrayList<>(sectionLength);

		for (int paradigm = 0; paradigm < sectionLength; paradigm++) {
			int paradigmSize = parseInt(reader.readLine());
			paradigmAncodes.add(paradigm, reader.readLine());

			Set<String> prefixes = new HashSet<>();
			Set<String> endings = new HashSet<>();
			List<Flexion> flexions = new ArrayList<>(paradigmSize);

			for (int i = 0; i < paradigmSize; i++) {
				String flexion = reader.readLine();
				String ancode = reader.readLine();

				String affix;
				String prefix;
				if (!flexion.isEmpty() && flexion.charAt(0) == '*') {
					String[] parts = flexion.split("\\*", 3);
					prefix = parts[1];
					affix = parts[2];
				} else {
					affix = flexion;
					prefix = "";
				}
				flexions.add(new Flexion(affix, prefix, tabDescriptors.get(ancode)));
				if (!prefix.isEmpty()) {
					prefixes.add(prefix);
				}
				endings.add(affix);
			}

			if (!prefixes.isEmpty()) {
				paradigmPrefixes.put(paradigm, prefixes);
				allPrefixes.addAll(prefixes);
			}
			allEndings.addAll(endings);
			paradigmEndings.add(paradigm, endings);
			paradigms.add(flexions);
		}

		sectionLength = parseInt(reader.readLine());
		for (int i = 0; i < sectionLength; i++) {
			int paradigm = parseInt(reader.readLine());
			int paradigmSize = parseInt(reader.readLine());

			List<Flexion> flexions = paradigms.get(paradigm);
			Set<String> endings = paradigmEndings.get(paradigm);
			Set<String> prefixes = paradigmPrefixes.getOrDefault(paradigm, new HashSet<>(singleton("")));

			for (int j = 0; j < paradigmSize; j++) {
				String base = reader.readLine();
				base = base.equals("#") ? "" : base;
				Lemma l = new Lemma(base, flexions, paradigmAncodes.get(paradigm), prefixes, endings);
				Set<Lemma> sameBaseLemmas = lemmas.computeIfAbsent(base, b -> new HashSet<>());
				checkState(sameBaseLemmas.add(l), "Lemma already in repository");
			}
		}
		dictionaryDataRef.set(new DictionaryData(allPrefixes, allEndings, lemmas));
	}