|
|
@ -39,6 +39,8 @@ all_stopwords = default_stopwords | custom_stopwords
|
|
|
|
print('''<!DOCTYPE html>
|
|
|
|
print('''<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<head>
|
|
|
|
|
|
|
|
<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title></title>
|
|
|
|
<title></title>
|
|
|
|
<style>
|
|
|
|
<style>
|
|
|
@ -182,19 +184,20 @@ print('''<!DOCTYPE html>
|
|
|
|
<p id="text" style="display:none">Checkbox is CHECKED!</p>
|
|
|
|
<p id="text" style="display:none">Checkbox is CHECKED!</p>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
function myFunction() {
|
|
|
|
|
|
|
|
// Get the checkbox
|
|
|
|
$(document).ready(function(){
|
|
|
|
var checkBox = document.getElementById("myCheck");
|
|
|
|
|
|
|
|
// Get the output text
|
|
|
|
$('span').click(
|
|
|
|
var text = document.getElementById("text");
|
|
|
|
function(){
|
|
|
|
|
|
|
|
var selectedclass = $(this).attr('class');
|
|
|
|
// If the checkbox is checked, display the output text
|
|
|
|
$('span').css('background-color', 'white').css('color','black'); // reset
|
|
|
|
if (checkBox.checked == true){
|
|
|
|
$('span.' + selectedclass).css('background-color', 'red'); //highlighting the select
|
|
|
|
text.style.display = "block";
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
|
|
|
|
text.style.display = "none";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -226,8 +229,10 @@ print('</div>')
|
|
|
|
|
|
|
|
|
|
|
|
#ToS text
|
|
|
|
#ToS text
|
|
|
|
print('<div class ="paragraph">')
|
|
|
|
print('<div class ="paragraph">')
|
|
|
|
for paragraph in text_list:
|
|
|
|
|
|
|
|
tokenized = word_tokenize(paragraph)
|
|
|
|
|
|
|
|
|
|
|
|
# for paragraph in text_list:
|
|
|
|
|
|
|
|
tokenized = word_tokenize(text)
|
|
|
|
tagged = pos_tag(tokenized)
|
|
|
|
tagged = pos_tag(tokenized)
|
|
|
|
print('<p>')
|
|
|
|
print('<p>')
|
|
|
|
for word, pos in tagged:
|
|
|
|
for word, pos in tagged:
|
|
|
@ -253,9 +258,6 @@ print('</div>')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#t_wrapper (second wrapper)
|
|
|
|
#t_wrapper (second wrapper)
|
|
|
|
print('</div><div class="t_wrapper">')
|
|
|
|
print('</div><div class="t_wrapper">')
|
|
|
|
|
|
|
|
|
|
|
@ -290,6 +292,7 @@ t_tagged = pos_tag(t_tokenized)
|
|
|
|
|
|
|
|
|
|
|
|
for t_word, t_pos in t_tagged:
|
|
|
|
for t_word, t_pos in t_tagged:
|
|
|
|
print('<span class="{}">{}</span>'.format(t_pos, t_word))
|
|
|
|
print('<span class="{}">{}</span>'.format(t_pos, t_word))
|
|
|
|
|
|
|
|
print('<p>')
|
|
|
|
print('</div>')
|
|
|
|
print('</div>')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|