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.cart; 012 013import java.io.DataOutputStream; 014import java.io.IOException; 015 016import com.sun.speech.freetts.Item; 017 018/** 019 * Generic interface for Classification and Regression Trees (CARTs) based 020 * on the Breiman, Friedman, Olshen, and Stone document "Classification and 021 * Regression Trees." Wadsworth, Belmont, CA, 1984. 022 */ 023public interface CART { 024 /** 025 * Passes the given item through this CART and returns the 026 * interpretation. 027 * 028 * @param item the item to analyze 029 * 030 * @return the interpretation 031 */ 032 Object interpret(Item item); 033 034 /** 035 * Dumps this CART to the output stream. 036 * 037 * @param os the output stream 038 * 039 * @throws IOException if an error occurs during output 040 */ 041 void dumpBinary(DataOutputStream os) throws IOException ; 042} 043 044 045