sanskrit-lexicon / CORRECTIONS

Correction history for Cologne Sanskrit Lexicon
8 stars 5 forks source link

remove commas program #440

Closed funderburkjim closed 3 years ago

funderburkjim commented 3 years ago

@drdhaval2785

The remove_commas.py is found useful.

Usage:

python remove_commas.py xxx_error.txt

This reads an initial xxx_error.txt, removes commas, and writes back over xxx_error.txt.

Reason: The original lines are of form L:key1:word1 or L:key1:word1,word2,...

In the second, multiple-word case, It is easier to process and comment when there is only one word. So the program simply rewrites L:key1:word1,word2 as two or more lines:

L:key1:word1
L:key1:word2
ETC

The revised xxx_error.txt file is then pushed back up to the repository.