Skip to content

Commit

Permalink
VISUALTEXT-FILES-083 Added ability to call Python scripts on text
Browse files Browse the repository at this point in the history
Signed-off-by: David de Hilster <[email protected]>
  • Loading branch information
dehilsterlexis committed Dec 9, 2023
1 parent 39c72a2 commit a60965f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions python/DeAccent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Deacent words in the current text

import sys

from unidecode import unidecode

file_path = sys.argv[1]

with open(file_path, encoding='utf8') as f:
file_text = f.read()

text_without_accents = unidecode(file_text)

print(text_without_accents)

0 comments on commit a60965f

Please sign in to comment.