[standardinterpreter] spanish: fix text tokenization and on/off rule (#2826)
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>pull/2832/head
parent
11c0ed53d0
commit
f0664b3a0c
|
@ -261,7 +261,7 @@ public class StandardInterpreter extends AbstractRuleBasedInterpreter {
|
|||
|
||||
/* OnOffType */
|
||||
|
||||
itemRule(seq(encenderApagar, articulo), /* item */ onOff),
|
||||
itemRule(seq(encenderApagar, articulo)/* item */),
|
||||
|
||||
/* IncreaseDecreaseType */
|
||||
|
||||
|
|
|
@ -599,6 +599,8 @@ public abstract class AbstractRuleBasedInterpreter implements HumanLanguageInter
|
|||
if (Locale.FRENCH.getLanguage().equalsIgnoreCase(locale.getLanguage())) {
|
||||
split = text.toLowerCase(locale).replaceAll("[\\']", " ").replaceAll("[^\\w\\sàâäçéèêëîïôùûü]", " ")
|
||||
.split("\\s");
|
||||
} else if ("es".equalsIgnoreCase(locale.getLanguage())) {
|
||||
split = text.toLowerCase(locale).replaceAll("[\\']", " ").replaceAll("[^\\w\\sáéíóúü]", " ").split("\\s");
|
||||
} else {
|
||||
split = text.toLowerCase(locale).replaceAll("[\\']", "").replaceAll("[^\\w\\s]", " ").split("\\s");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue