001/**
002 * Portions Copyright 2001 Sun Microsystems, Inc.
003 * Portions Copyright 1999-2001 Language Technologies Institute, 
004 * Carnegie Mellon University.
005 * All Rights Reserved.  Use is subject to license terms.
006 * 
007 * See the file "license.terms" for information on usage and
008 * redistribution of this file, and for a DISCLAIMER OF ALL 
009 * WARRANTIES.
010 */
011package com.sun.speech.freetts.en;
012
013import java.util.logging.Level;
014import java.util.logging.Logger;
015
016import com.sun.speech.freetts.ProcessException;
017import com.sun.speech.freetts.Utterance;
018import com.sun.speech.freetts.UtteranceProcessor;
019
020
021/**
022 * Tags the words in the utterance with their part-of-speech.
023 * Currently this does nothing.
024 */
025public class PartOfSpeechTagger implements UtteranceProcessor {
026    /** Logger instance. */
027    private static final Logger LOGGER =
028        Logger.getLogger(PartOfSpeechTagger.class.getName());
029
030    /**
031     * Constructs a PartOfSpeechTagger
032     */
033    public PartOfSpeechTagger() {
034    }
035
036    /**
037     * Tags the utterance with part-of-speech information. Currently
038     * this processor does nothing.
039     *
040     * @param  utterance  the utterance to process/tokenize
041     *
042     * @throws ProcessException if an error occurs while 
043     *         processing of the utterance
044     */
045    public void processUtterance(Utterance utterance) throws ProcessException {
046        if (LOGGER.isLoggable(Level.FINE)) {
047            LOGGER.fine("PartOfSpeechTagger does nothing!");
048        }
049    }
050
051    /**
052     * Returns the string representation of the object
053     *
054     * @return the string representation of the object
055     */
056    public String toString() {
057        return "PartOfSpeechTagger";
058    }
059}
060