Add dictline_csv.py script, based on PR #92 #96
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are still a couple differences from the csv file in the other PR.
One is fixed in #95, so ignoring that...
The csv in the PR replaces some double spaces in definitions with single spaces. Which is probably at least mostly good. Some of the extra spaces look clearly unintentional, while others may be a matter of style. This is worth looking into.
Ignoring whitespace changes with
diff -b
, the difference is small enough I'll just paste it here:The csv in the PR strips the non-ascii characters, while my script re-encodes them correctly. This seems clearly better.
The csv file in the PR seems to be stripping some
"
characters in definitions, while the Pythoncsv
library wraps the definition on those lines in quotes, then escapes the quotes inside as""
. This seems clearly better, assuming most csv libraries support it.For some reason
DICTLINE.GEN.csv
fro the PR hasFALSO
andVERO
capitalized, although they aren't inDICTLINE.GEN
. I don't know if this is a mistake or done for some reason.I don't know if it would be better to use commas instead of tabs, or change/remove the column titles, if we really need an id column, etc. I've kept that the same for now to make diffing easy.
@gfranzini @Stormur any comments on this?