Package com.sun.speech.freetts.cart

Examples of com.sun.speech.freetts.cart.CART


  private ViterbiCandidate getCandidate(Item item) {
        // TODO: This should better be called getCandidates() (plural form),
        // because what it does is find all the candidates for the item
        // and return the head of the queue.
      String unitType = item.getFeatures().getString("clunit_name");
      CART cart = clunitDB.getTree(unitType);
        // Here, the unit candidates are selected.
      int[] clist = (int[]) cart.interpret(item);
        // Now, clist is an array of instance numbers for the units of type
        // unitType that belong to the best cluster according to the CART.
       
      ViterbiCandidate p;
      ViterbiCandidate all;
View Full Code Here


     * @param unitType the type of cart
     *
     * @return the cart
     */
    CART getTree(String unitType) {
  CART cart =  (CART) cartMap.get(unitType);

  if (cart == null) {
      System.err.println("ClusterUnitDatabase: can't find tree for "
        + unitType);
      return defaultCart;   // "graceful" failrue
View Full Code Here

            end, prev, next);
    unitList.add(unit);
      } else if (tag.equals("CART")) {
    String name = tokenizer.nextToken();
    int nodes = Integer.parseInt(tokenizer.nextToken());
    CART cart = new CARTImpl(reader, nodes);
    cartMap.put(name, cart);

    if (defaultCart == null) {
        defaultCart = cart;
    }
View Full Code Here

  int numCarts = bb.getInt();
  cartMap = new HashMap();
  for (int i = 0; i < numCarts; i++) {
      String name = Utilities.getString(bb);
      CART cart = CARTImpl.loadBinary(bb);
      cartMap.put(name, cart);

      if (defaultCart == null) {
    defaultCart = cart;
      }
View Full Code Here

  int numCarts = is.readInt();
  cartMap = new HashMap();
  for (int i = 0; i < numCarts; i++) {
      String name = Utilities.getString(is);
      CART cart = CARTImpl.loadBinary(is);
      cartMap.put(name, cart);

      if (defaultCart == null) {
    defaultCart = cart;
      }
View Full Code Here

      mcep.dumpBinary(os);

      os.writeInt(cartMap.size());
      for (Iterator i = cartMap.keySet().iterator(); i.hasNext();) {
    String name = (String) i.next();
    CART cart =  (CART) cartMap.get(name);

    Utilities.outString(os, name);
    cart.dumpBinary(os);
      }
      os.close();

      // note that we are not currently saving the state
      // of the default cart
View Full Code Here

TOP

Related Classes of com.sun.speech.freetts.cart.CART

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.