Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Edgar.

Asked: April 05, 2018 - 3:10 pm UTC

Last updated: April 06, 2018 - 4:36 am UTC

Version: 12c

Viewed 1000+ times

You Asked

Buen día Connor, espero estés bien.

Estoy realizando una práctica e investigación sobre chatbots, en mi algoritmo estoy buscando por dos métodos el parseo o proceso de las palabras para hacer el NLP y darles sentido, sé que existe la función soundex, esta puede ser de mucha ayuda para aumentar mi porcentaje de acierto.

En este ejemplo las dos primeras consultas retornan P200 mientras que la última regresa P230

select soundex('PIZZA') from dual union all
 select soundex('PISCA') from dual union all
 select soundex('PISTA') from dual


Viendo la documentación de la función deduzco que la pérdida de certeza está dada por la regla del idioma que es para el idioma inglés. ¿Existe algún argumento, NLS u opción posible a utilizar para idioma castellano?

Atento a tus comentarios.
Gracias


with LiveSQL Test Case:

and Connor said...

SOUNDEX was built many years ago mainly for names (not general words) and english names in particular. So it is typically not very good at anything more advanced than that.

You could look at some other alternatives, such as metaphone options

https://github.com/AliArdaOrhan/Double_Metaphone

or some of the routines available under UTL_MATCH

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/arpls/UTL_MATCH.html

There are other areas of research designed to improve such matching algorithms - but you probably have to write code to port them to Oracle, eg

https://stevemorse.org/phonetics/bmpm2.htm




Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Muchas gracias

Edgar, April 08, 2018 - 5:23 pm UTC

Hi, Connor

thank you for this information it´s very useful for my developement.

thanks for your time.


More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library