;; ===================================================================================
;; Italian FESTIVAL Modules(IFM)
;; Copyright (C) 2001-2005 by the IFM Development Team
;; at "ISTC-SPFD CNR" and at "ITC-Irst".
;; ===================================================================================
;;	ISTC-SPFD CNR
;;		Istituto di Scienze e Tecnologie della Cognizione
;;		Sezione di Padova "Fonetica e Dialettologia"
;;		Consiglio Nazionale delle Ricerche
;;		Via G. Anghinoni, 10 - 35121 Padova
;;		tel (+39) 049 8274418 - fax (+39) 049 8274416
;;		e-mail: segreteria@pd.istc.cnr.it 
;; 
;;	ITC-irst
;;		Istituto Trentino di Cultura
;;		Centro per la ricerca scientifica e tecnologica 
;;		Via Santa Croce 77 - 38100 Trento ITALIA
;;		tel (+39) 0461-210111 - fax (+39) 0461-980436
;;		e-mail: info@itc.it 
;; ===================================================================================
;; This file is part of IFM.
;; 
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 2
;; of the License, or (at your option) any later version.
;; 
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;; 
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
;; ===================================================================================
;; Authors:	Piero COSI, ISTC-SPFD CNR, (cosi@pd.istc.cnr.it)
;; 		Carlo DRIOLI
;; 		Graziano TISATO
;; 		Roberto GRETTER, ITC-irst (SSI/MPA), (gretter@itc.it) 
;; 		Fabio TESSER
;; ===================================================================================
;;		WEB:  http://www.pd.istc.cnr.it/TTS/ItalianFESTIVAL
;; ===================================================================================
;;
;;  ITALIAN MAP_segments
;;
;; ===================================================================================
;;
;;
(define (MAP_segments utt)
  "(MAP_segments utt UTT)
  Mappa difoni prendendo come riferimento il file ita.map dove se vi sono i difoni da mappare."
  (let ((item_segs_list (utt.relation.items utt 'Segment)) )
   (while (cdr item_segs_list)
    (set! s1 (car item_segs_list))
    (set! s2 (car (cdr item_segs_list)))
    (let ((ita_maps ita_map))
      ;Modifica per mappare coppie di foni
       (while ita_maps
         
     	(if (and (equal? (item.feat s1 'name)  (string-append (car (car ita_maps)))) (equal? (item.feat s2 'name) (string-append (car (cdr (car ita_maps))))))
     	   (let ()
     	    (item.set_name s1 (car (car (cdr (cdr (car ita_maps))))))
     	    (item.set_name s2 (car (cdr (car (cdr (cdr (car ita_maps)))))))
     	    ))
     	 (set! ita_maps (cdr ita_maps))
     	 ))
     	(set! item_segs_list (cdr item_segs_list))
     	)
     )
    )
     	
     	  
     	  
     	    
     		