Open emphasize opened 2 years ago
actually -while rarely occuring- a while loop would be better
for k, v in vocabulary.items():
while f" {k} " in utterance:
utterance = utterance.replace(f" {k} ", f" {v} ")
and probably reminder = f" {reminder} "
... by leveraging the skills translate_namedvalues to be able to fine grain the vocabulary changed
Problem
The method used limits the possibilities in several ways:
my
andour
would equate toyour
with changing the perspectivemein
,meine
,meinen
, but also in many other langs)Thus i think that using
translate_namedvalues
is the better approach to change the pronouns. The reminder is iterated over and changed as the vocabulary is found.This also reverts changes made introducing
My.dialog
,Our.dialog
andYour.dialog
replacing those with a singlePerspective.value
containing the vocabulary pairs. (all available langs)CLA
👍
Tested
👍