public static Fst<Pair<Character, Character>> fromString(CharSequence string) {

		Fst<Pair<Character, Character>> bla = new Fst<>();
		if (string.length() == 0) {
			bla.addState(StateFlag.ACCEPT, StateFlag.INITIAL);
			return bla;
		}

		State previous = null;

		for (int i = 0; i < string.length(); i++) {
			State source = previous == null ? bla.addStateInitial() : previous;
			State target = i + 1 == string.length() ? bla.addStateAccept()
					: bla.addState();

			char charAt = string.charAt(i);
			Transition<Pair<Character, Character>> transition = bla
					.addTransition(
							Pair.of(Character.toLowerCase(charAt), charAt),
							source, target);
			previous = target;
		}
		return bla;
	}