/*
 * Copyright 2008 Novamente LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package relex.algs;

import relex.ParsedSentence;
import relex.concurrent.RelexContext;

/**
 * SentenceAlgorithmApplier is responsible for loading SentenceAlgorithms from a
 * file, and applying them to a ParsedSentence.
 */
public class SentenceAlgorithmApplier
{
	private SentenceAlgorithmNewApplier tagger;
	private SentenceAlgorithmNewApplier semant;

	public SentenceAlgorithmApplier()
	{
		tagger = new SentenceAlgorithmNewApplier(
			"relex.tagalgpath", "relex-tagging-algs.txt");
		semant = new SentenceAlgorithmNewApplier(
			"relex.semalgpath", "relex-semantic-algs.txt");
	}
	
	// The apply method!
	public void applyAlgs(ParsedSentence sentence, RelexContext context)
	{
		tagger.applyAlgs(sentence, context);
		semant.applyAlgs(sentence, context);
	}

	public static void main(String[] args)
	{
		new SentenceAlgorithmApplier();
	}
}

@@ -1180,16 +1180,257 @@
 );%0A%09%7D%0A%09%0A
+%09public void tagFeatures(ParsedSentence sentence, RelexContext context)%0A%09%7B%0A%09%09tagger.applyAlgs(sentence, context);%0A%09%7D%0A%0A%09public void extractSemantics(ParsedSentence sentence, RelexContext context)%0A%09%7B%0A%09%09semant.applyAlgs(sentence, context);%0A%09%7D%0A%0A
 %09// The 

Add two utility routines.