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