public String TranscribeAString(String textToTranscribe) throws Exception
	{
		//Declaration of the resulting transcription.
		String resultingTranscription="";
		//Declaration of the source text index iterator.
		int positionInTheString = 0;
		//Indicator, whether a rule suitable in a position was found or not.
		boolean foundRuleForCurrentPosition;
		//Iterator through the rule library.
		TranscriptionRulesElement ruleIterator = null;
		//While the position iterator does not exceed the source text limits, rules are searched and the transcription is built up.
		while(positionInTheString<textToTranscribe.length())
		{
			foundRuleForCurrentPosition = false;
			char firstChar = textToTranscribe.charAt(positionInTheString);
			//As the rules library (list) is not linear, but is two dimensional, we try to find the right dimension in which to search for a suitable rule.
			ruleIterator = FindRulesWithTheStartingCharacter(firstChar);
			if (ruleIterator!=null)
			{
				//If a suitable dimension was found, iteration through this dimension starts to find the first matching rule.
				do
				{
					if (IsRuleSuitable(textToTranscribe,ruleIterator,positionInTheString))
					{
						//If the current rule matches the source text in the current position, parameter indicating a found rule is set to true.
						foundRuleForCurrentPosition = true;
					}
					else
					{
						//Otherwise, iteration continues.
						ruleIterator = ruleIterator._next;
					}
				}
				while (!foundRuleForCurrentPosition&&ruleIterator!=null);
				//If a suitable rule was not found, index is increased.
				//This means that the current character will be excluded from the transcription.
				if (!foundRuleForCurrentPosition)
				{
					positionInTheString++;
				}
				else
				{
					//In the case when a suitable rule was found, resulting transcription is built up.
					//If the resulting transcription is empty:
					if ((ruleIterator._replacementText.length()>0  && ruleIterator._replacementText.charAt(0)=='#') || resultingTranscription.equals(""))
					{
						resultingTranscription+=ruleIterator._replacementText;
					}
					//If the resulting transcription is not empty:
					else
					{
						resultingTranscription+="_"+ruleIterator._replacementText;
					}
					positionInTheString+=ruleIterator._text.length();
				}
			}
			else
			{
				throw new Exception("Unrecognized character \""+textToTranscribe.charAt(positionInTheString)+"\" in word \""+textToTranscribe+"\"");
			}
		}
		return resultingTranscription;
	}