function [ phone_name ] = phone_get_name ( phone )
%   [ PHONE_NAME ] = phone_get_name ( PHONE )
%   
%   Vrati mazev fonemu PHONE_NAME z fonemu PHONE, z ktereho odstrani cislice
%   1, 2 (stress markers). Pokud je fonem napriklad "tclm", "bcl" atd, tak
%   vrati prazdny retezec, protoze uvedene retzce nejsou fonemy, ale
%   specialni znacky pro zapsani foneticke struktury slova. Funkce odstrani
%   z fonemu mezery.
%
%   zakazane retezce : bcl,dcl,gcl,pcl,tck,kcl

if strcmp(phone, 'bcl') == 1 | strcmp(phone, 'dcl') == 1 | strcmp(phone, 'gcl') == 1 | strcmp(phone, 'pcl') == 1 | strcmp(phone, 'tck') == 1 | strcmp(phone, 'kcl') == 1 | strcmp(phone, 'tcl') == 1
    
    phone_name = ''; % PHONE je zakazany retezec.
    return;

end

phone_name = '';

% Zkontroluje PHONE jestli neobssahuje stres marker.
for i = 1:length(phone)
    
    if phone(i) ~= '1' & phone(i) ~= '2' & phone(i) ~= ' ' % pokud PHONE obsahuje stres marker nebo mezeru.
        
        phone_name = [phone_name, phone(i)];
        
    end
    
end

end
        