I want to remove accents and punctuation from a dictionary. For example, I want to transform "à l'épreuve" into "a l epreuve". The dictionary is this one: https://www.poltext.org/fr/donnees-et-analyses/lexicoder (.cat). There are explanations for dataframes (Remove accents from a dataframe column in R), but I could not find a way of removing for dictionaries.
My code so far:
dict_lg <- dictionary(file = "frlsd/frlsd.cat", encoding = "UTF-8")
Any suggestion?
This should work:
output:
from the docs:
Thus
rapply(recursively applying a function over nested lists) works. In this case, we applystri_trans_generalas suggested here.