upstream version 1.2.2
[debian/freetts] / com / sun / speech / freetts / en / PartOfSpeechTagger.java
1 /**
2  * Portions Copyright 2001 Sun Microsystems, Inc.
3  * Portions Copyright 1999-2001 Language Technologies Institute, 
4  * Carnegie Mellon University.
5  * All Rights Reserved.  Use is subject to license terms.
6  * 
7  * See the file "license.terms" for information on usage and
8  * redistribution of this file, and for a DISCLAIMER OF ALL 
9  * WARRANTIES.
10  */
11 package com.sun.speech.freetts.en;
12
13 import java.util.logging.Level;
14 import java.util.logging.Logger;
15
16 import com.sun.speech.freetts.ProcessException;
17 import com.sun.speech.freetts.Utterance;
18 import com.sun.speech.freetts.UtteranceProcessor;
19
20
21 /**
22  * Tags the words in the utterance with their part-of-speech.
23  * Currently this does nothing.
24  */
25 public class PartOfSpeechTagger implements UtteranceProcessor {
26     /** Logger instance. */
27     private static final Logger LOGGER =
28         Logger.getLogger(PartOfSpeechTagger.class.getName());
29
30     /**
31      * Constructs a PartOfSpeechTagger
32      */
33     public PartOfSpeechTagger() {
34     }
35
36     /**
37      * Tags the utterance with part-of-speech information. Currently
38      * this processor does nothing.
39      *
40      * @param  utterance  the utterance to process/tokenize
41      *
42      * @throws ProcessException if an error occurs while 
43      *         processing of the utterance
44      */
45     public void processUtterance(Utterance utterance) throws ProcessException {
46         if (LOGGER.isLoggable(Level.FINE)) {
47             LOGGER.fine("PartOfSpeechTagger does nothing!");
48         }
49     }
50
51     /**
52      * Returns the string representation of the object
53      *
54      * @return the string representation of the object
55      */
56     public String toString() {
57         return "PartOfSpeechTagger";
58     }
59 }
60