changed colonial-list.py
parent
44a8b35713
commit
45ec6e0060
@ -0,0 +1,68 @@
|
|||||||
|
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
|
||||||
|
"You<span class="value_90 grant">grant<div class="grant_definition">to give or allow someone something, usually in an officialway</div></span>" 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(
|
||||||
|
<p>
|
||||||
|
{% for word in text %}
|
||||||
|
|
||||||
|
{% if word in colon_dict.keys() %}
|
||||||
|
<span class="value_{{colon_dict[{{word}}]['value']}} {{word|lower}}">{{word}}
|
||||||
|
<div class="{{word|lower}}_definition">{{colon_dict[{{word}}]['definition']}}</div></span>
|
||||||
|
{% else %}
|
||||||
|
{{word}}
|
||||||
|
{% endfor %}
|
||||||
|
</p>
|
||||||
|
)
|
||||||
|
template_a.render(text=source_text_list,
|
||||||
|
colon_dict = dict_word_coloniality)
|
||||||
|
|
||||||
|
value_90 {}
|
||||||
|
grant {}
|
||||||
|
|
||||||
|
$('.grant').do
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue