master
funix 3 years ago
parent c8d055856c
commit af85f78f1f

@ -1,37 +0,0 @@
import nltk
with open('speech.txt','r') as result:
r = result.read()
r = r.replace('<span class="interim"></span>','').replace('\n','. ')
l=nltk.word_tokenize(r)
pos = nltk.pos_tag(l)
html = '''
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="pagedjs_files/interface.css">
<script src="pagedjs_files/paged.polyfill.js"></script>
<link rel="stylesheet" href="styles/1.css">
<meta charset="utf-8"/>
<title>Booklet</title>
</head>
<body>
'''
for x in pos:
if x[0] == '.':
html += "<span class='dot'>.</span><br> "
else:
html += "<span class='"+x[1]+"'> "+x[0]+"</span>"
html += '''</body>
</html>'''
html = html.replace(' .','.').replace(" '", "'")
with open('index.html','w') as index:
index.write(html)

@ -1,5 +1,14 @@
> rendering css capire cosa e non cosa
> preparare domande x parte teorica
> prep mail da mandare in anticipo con istru git
> prep 3 fogli css per auto layout
> prep cose fatte in precedenza da fa vedere
info su git
vscode
py + nltk
console
chrome :(

Loading…
Cancel
Save