comments ++
parent
9933252127
commit
8a9b39d430
Binary file not shown.
@ -1,13 +0,0 @@
|
||||
|
||||
<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/2.css">
|
||||
<meta charset="utf-8"/>
|
||||
<title>Booklet</title>
|
||||
</head>
|
||||
<body>
|
||||
<span class='JJ'> ok</span><span class='NN'> let</span><span class='POS'>'s</span><span class='NN'> talk</span><span class='IN'> in</span><span class='NNP'> English</span><span class='IN'> for</span><span class='NN'> awhile</span><span class='WP'> what</span><span class='VBP'> are</span><span class='PRP'> we</span><span class='VBG'> eating</span><span class='dot'>.</span><br> <span class='CC'> or</span><span class='RB'> not</span><span class='IN'> so</span><span class='PRP'> it</span><span class='VBZ'> is</span><span class='VBG'> starting</span><span class='RB'> again</span><span class='dot'>.</span><br> <span class='JJ'> ok</span><span class='NN'> navigate</span><span class='dot'>.</span><br> <span class='PRP'> you</span><span class='VBP'> need</span><span class='TO'> to</span><span class='VB'> rest</span><span class='RB'> sometimes</span><span class='dot'>.</span><br> <span class='RB'> also</span><span class='VBD'> implemented</span><span class='IN'> that</span><span class='VBG'> implementing</span><span class='dot'>.</span><br> <span class='PRP'> he</span><span class='VBZ'>'s</span><span class='DT'> a</span><span class='NN'> sentence</span><span class='CC'> and</span><span class='PRP'> we</span><span class='VBP'> are</span><span class='RB'> not</span><span class='JJ'> interested</span><span class='dot'>.</span><br> <span class='VB'> remember</span><span class='dot'>.</span><br> <span class='RB'> so</span><span class='RB'> basically</span><span class='NN'> sentence</span><span class='dot'>.</span><br> <span class='WRB'> where</span><span class='VBZ'> is</span><span class='TO'> to</span><span class='VB'> go</span><span class='DT'> a</span><span class='NN'> couple</span><span class='CC'> and</span><span class='RB'> then</span><span class='PRP'> you</span><span class='VBP'> put</span><span class='DT'> the</span><span class='NN'> adult</span><span class='dot'>.</span><br> <span class='DT'> a</span><span class='RB'> bit</span><span class='JJR'> easier</span><span class='TO'> to</span><span class='VB'> understand</span><span class='dot'>.</span><br> <span class='RB'> actually</span><span class='RB'> maybe</span><span class='NNS'> people</span><span class='RB'> just</span><span class='VBP'> do</span><span class='RB'> n't</span><span class='RB'> just</span><span class='dot'>.</span><br> <span class='PRP'> I</span><span class='VBP'>'m</span><span class='RB'> just</span><span class='VBG'> thinking</span><span class='PRP'> it</span><span class='VBZ'>'s</span><span class='RB'> not</span><span class='DT'> the</span><span class='NNS'> centres</span><span class='VBP'> do</span><span class='RB'> n't</span><span class='VB'> put</span><span class='DT'> the</span><span class='NN'> dot</span><span class='CC'> and</span><span class='RB'> just</span><span class='VB'> put</span><span class='DT'> a</span><span class='NN'> couple</span><span class='dot'>.</span><br> <span class='IN'> because</span><span class='RB'> then</span><span class='dot'>.</span><br> <span class='PRP'> they</span><span class='VBP'> are</span><span class='VBG'> talking</span><span class='PRP'> they</span><span class='VBP'> are</span><span class='DT'> a</span><span class='NN'> booklet</span><span class='CC'> but</span><span class='PRP'> they</span><span class='VBP'> are</span><span class='RB'> not</span><span class='VBG'> writing</span><span class='dot'>.</span><br> <span class='IN'> so</span><span class='PRP'> it</span><span class='VBZ'> is</span><span class='RB'> just</span><span class='JJ'> fine</span><span class='dot'>.</span><br> <span class='RB'> so</span><span class='VBP'> are</span><span class='PRP'> you</span><span class='VBN'> done</span><span class='dot'>.</span><br> <span class='CC'> and</span><span class='RB'> now</span><span class='VBZ'> is</span><span class='JJ'> f</span><span class='NNP'> *</span><span class='NNP'> *</span><span class='NNP'> *</span><span class='NNP'> *</span><span class='NNP'> *</span><span class='RB'> up</span><span class='dot'>.</span><br> </body>
|
||||
</html>
|
@ -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> \n"
|
||||
else:
|
||||
html += "<span class='"+x[1]+"'> "+x[0]+"</span>\n"
|
||||
|
||||
|
||||
html += '''</body>
|
||||
</html>'''
|
||||
|
||||
html = html.replace(' .','.').replace(" '", "'")
|
||||
|
||||
with open('index.html','w') as index:
|
||||
index.write(html)
|
@ -1,47 +0,0 @@
|
||||
|
||||
<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/3.css">
|
||||
<meta charset="utf-8"/>
|
||||
<title>Booklet</title>
|
||||
</head>
|
||||
<body>
|
||||
<span>ok let's talk in English for awhile what are we eating</span>
|
||||
<img src='https://tse3.mm.bing.net/th?id=OIP.URkqiGHddaNVnvoUtMflQQHaF0&pid=Api'>
|
||||
<span>or not so it is starting again</span>
|
||||
<img src='https://tse3.mm.bing.net/th?id=OIP.w2KDA__F4lQ1NyTt5FOjIgAAAA&pid=Api'>
|
||||
<span>ok navigate</span>
|
||||
<img src='https://tse3.mm.bing.net/th?id=OIF.y9XMU%2b2gdAWMj7VXDE%2ft%2fQ&pid=Api'>
|
||||
<span>you need to rest sometimes</span>
|
||||
<img src='https://tse4.mm.bing.net/th?id=OIP.GbFGas-ayDWMUd_9vgedSwHaGO&pid=Api'>
|
||||
<span>also implemented that implementing</span>
|
||||
<img src='https://tse3.mm.bing.net/th?id=OIF.GJKQxrJERpdrEixc86Aylg&pid=Api'>
|
||||
<span>he's a sentence and we are not interested</span>
|
||||
<img src='https://tse2.mm.bing.net/th?id=OIP.B8V15Vgwb4WSIBCh_DBKAAHaEK&pid=Api'>
|
||||
<span>remember</span>
|
||||
<img src='https://tse4.mm.bing.net/th?id=OIP.FIpqGxb0o5Qhs7F6FsmLUwHaJ4&pid=Api'>
|
||||
<span>so basically sentence</span>
|
||||
<img src='https://tse4.mm.bing.net/th?id=OIP.R-Aq7zQgyXkEkqHsRpd_fQHaK5&pid=Api'>
|
||||
<span>where is to go a couple and then you put the adult</span>
|
||||
<img src='https://tse3.mm.bing.net/th?id=OIP.-zezO3MYsykMDFXKr5BN4gHaFT&pid=Api'>
|
||||
<span>a bit easier to understand</span>
|
||||
<img src='https://tse2.mm.bing.net/th?id=OIP.dAOU1dmcC7DcOHjdZWnsOAHaFj&pid=Api'>
|
||||
<span>actually maybe people just don't just</span>
|
||||
<img src='https://tse3.mm.bing.net/th?id=OIP.lN80mz6v0-Og5Hy4rBFDBgHaFj&pid=Api'>
|
||||
<span>I'm just thinking it's not the centres don't put the dot and just put a couple</span>
|
||||
<img src='https://tse2.mm.bing.net/th?id=OIP.soE-jIhLUlXXcsImI9dSAgHaDE&pid=Api'>
|
||||
<span>because then</span>
|
||||
<img src='https://tse4.mm.bing.net/th?id=OIP._isREjX53ak2ahph2VOozgHaIM&pid=Api'>
|
||||
<span>they are talking they are a booklet but they are not writing</span>
|
||||
<img src='https://tse2.mm.bing.net/th?id=OIP.-utvaIFVP4SIM9E9Am3efAHaEZ&pid=Api'>
|
||||
<span>so it is just fine</span>
|
||||
<img src='https://tse3.mm.bing.net/th?id=OIP.6d-LRDAm986tLKsRdmxAFwHaC_&pid=Api'>
|
||||
<span>so are you done</span>
|
||||
<img src='https://tse1.mm.bing.net/th?id=OIF.GUCE7OkP722hk6eZcjJckQ&pid=Api'>
|
||||
<span>and now is f***** up</span>
|
||||
<img src='https://tse4.mm.bing.net/th?id=OIP.Z_JLWGz4XfBuc0lzMmTUggHaEQ&pid=Api'>
|
||||
</body>
|
||||
</html>
|
@ -1,49 +0,0 @@
|
||||
import DuckDuckGoImages as ddg
|
||||
from duckduckgo_images_api import search
|
||||
import os
|
||||
import shutil
|
||||
|
||||
with open('speech.txt','r') as speech:
|
||||
qq = speech.readlines()
|
||||
|
||||
html = ''
|
||||
|
||||
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/3.css">
|
||||
<meta charset="utf-8"/>
|
||||
<title>Booklet</title>
|
||||
</head>
|
||||
<body>
|
||||
'''
|
||||
|
||||
|
||||
|
||||
for q in qq:
|
||||
q = q.strip()
|
||||
if q == '''<span class="interim"></span>''':
|
||||
continue
|
||||
|
||||
q = q.replace("\n","")
|
||||
|
||||
qDDG = q.replace(' ','+')
|
||||
|
||||
results = search(q, max_results=1)
|
||||
r = results["results"][0]["thumbnail"]
|
||||
|
||||
html += f"""<span> {q} </span>\n"""
|
||||
html += f"""<img src='{r}'>\n"""
|
||||
|
||||
|
||||
|
||||
html += '''</body>
|
||||
</html>'''
|
||||
|
||||
html = html.replace(' .','.').replace(" '", "'")
|
||||
|
||||
with open('nuovo.html','w') as index:
|
||||
index.write(html)
|
Loading…
Reference in New Issue