four-d-tesseract / EtymologyMarker

This program looks up the etymologies of words in a text file and color-codes the words according to their origin. It allows a writer to view the register of her writing at a glance.
MIT License
15 stars 2 forks source link

Definition scoping #2

Closed ghost closed 8 years ago

ghost commented 8 years ago

Put the call to the program itself inside an if name = "main" conditional in case this is used as a module for something else.

Created single dictionary containing all languages and metadata 'languages'. Contains Name (key), Colour Code, Word Count, Colour Name, Long Name.

Put print statements into parameterised for loops.

Added user input functionality for working directory and source file name.

Made functions explicitly call the outside variables they reference. Not sure I've done this totally 'correctly', may need to edit later on (e.g. I've used aliases in definitions with the same name as actual objects created, which could be confusing).

Prints percent composition of text in order or percentage composition.

Prints languages in Key alphabetically.

Highlights key in colour as example.

Moved comments into docstrings for functions.

FUTURE STUFF:

Write script to scrape Wiktionary/alternative source to enhance dictionaries.

Write option to set colours (e.g. colourblind mode) from user input/flag.

Clean up functions to have clear hierarchy/so you don't have to call so many arguments.

Investigate logic for Greek Affix function - has false positives.