from jinja2 import Environment, FileSystemLoader #example of colonial glossary dict_verb_coloniality = { 'grant': {'meaning': 'to give or allow someone something, usually in an officialway', 'value': 90}, 'modify': {'meaning': 'to change something, usually to improve it or make it more acceptable', 'value':}, 'reproduce': {'meaning': ' to produce a copy of something', 'value': 80}, 'display': {'meaning': 'to arrange something or a collection of things so that it can be seen by the public', 'value': 80}, 'provide': {'meaning': ' to give someone something that they need', 'value': 60}, 'use': {'meaning': ' building to a particular purpose', 'value': 50}, } dict_noun_coloniality = { 'service': {'meaning': 'private organization that is responsible for a particular type of activity, or for providing a particular thing that people need', 'value': 80}, 'services': {'meaning': 'private organization that is responsible for a particular type of activity, or for providing a particular thing that people need', 'value': 80}, 'agreement': {'meaning': 'the situation in which people have the same opinion', 'value': 90 }, } # example "Yougrant
to give or allow someone something, usually in an officialway
" FaceApp a nonexclusive, royalty-free, worldwide, fully paid license to use, reproduce, modify, adapt, create derivative works from, distribute, perform and display your User Content during the term of this Agreement solely to provide you with the Services." template_a = Template(

{% for word in text %} {% if word in colon_dict.keys() %} {{word}}

{{colon_dict[{{word}}]['definition']}}
{% else %} {{word}} {% endfor %}

) template_a.render(text=source_text_list, colon_dict = dict_word_coloniality) value_90 {} grant {} $('.grant').do