check and convert type before perform matching algorithm in fd_match and add parameter cluster_number for bow_generate