An approach to obtain weighted graphs of words based on phoneme detection