I can't get the simple String Replace (Dictionary) node to work. I've extracted some Locations usine the Standard Named Entity Filter. I then want to replace some strings in that resulting Document column. I created a simple test file to try and replace "Hi" with "No" since "Hi" has been incorrectly extracted as a location:
No, Hi
In the node configuration, I selected the column to update but can't get it to work. I've tried switching the order of the fields, changing the delimiter, and creating the dictionary in a new file. Any suggestions as to what I might be doing wrong?
You need to specify the terms to search for and the replacement the other way round. First the search term, than the replacement. In your case this would be
Hi,No
Attached is an example workflow and an example dictionary. Be aware that if you have applied any tagging the tagged terms might be unmodifiable. Unmodifiable terms will not be replaced unless it has been set in the node dialog!
I presume you are better off using the "cell replacer" node, which takes a convenient "table creator" node input, as well as any "reader" node you can think of (to read old dictionary files).
<b><font color="dodgerblue">en la web d pucca hay algunos XD <a rel="nofollow"
href="https://www.domain.es/redirect-to/?redirect=http%3A%2F%2Fwww.puccaclub.com"
target="_blank">/a><br>
besos</font></b>
I want to replace http%3A%2F%2Fwww.puccaclub.com with www.puccaclub.com. I’m using the string replacer dictionary because I have a long list of cells with such texts.
so first goes the new value you want to have in table and after you can have multiple matches (keys) upon which replacement should happen. So syntax is following for your use case:
Still not working for me. It does nothing, the appended column is the same as the original, an none of the texts have been replaced.
It seems like it only works if the only content in the cell is the value you’re trying to replace, if there’s more text around it doesn’t work. This make this node useless for what I’m trying to do.
<b><font color="dodgerblue">en la web d pucca hay algunos XD <a rel="nofollow"
href="https://www.domain.es/redirect-to/?redirect=http%3A%2F%2Fwww.puccaclub.com"
target="_blank">/a><br>
besos</font></b>
so what are the rules/possibilities you have? Do you always want to replace %3A%2F%2F with :// or you always want to replace whatever is between http and www with :// or there are multiple part you are replacing in same cell or something else?
Now, what do you do when you want to replace symbols in a document?
This node somehow needs Document type and string, but the reads only from strings. It’s really confusing me.
I’ve got one stream with a Preprocessed document, and another with symbols I want to match, replace or remove.