from potara.summarizer import Summarizer
from potara.document import Document
import nltk
from nltk import word_tokenize, sent_tokenize
s = Summarizer(minbigramcount=4)
# Adding docs, preprocessing them and computing some infos for the summarizer
s.setDocuments([Document("data/" + str(i) + '.txt')
for i in range(1, 5)])
# Summarizing, where the actual work is done
s.summarize()
# You can then print the summary
print(s.summary)
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\gensim\utils.py:1212: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
C:\Users\iZeid\Desktop\hatemylife\hate\lib\site-packages\pulp\pulp.py:1199: UserWarning: Spaces are not permitted in the name. Converted to '_'
warnings.warn("Spaces are not permitted in the name. Converted to '_'")
['The biggest news with Elon Musk โ s tweet is that SpaceX eventually plans to produce fuel this way on Earth.']
Exception ignored in: <function Pool.__del__ at 0x0000017FFF66A550>
Traceback (most recent call last):
File "c:\python38\lib\multiprocessing\pool.py", line 268, in __del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File "c:\python38\lib\multiprocessing\connection.py", line 280, in _send_bytes
ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Pool.__del__ at 0x0000017FFF66A550>
Traceback (most recent call last):
File "c:\python38\lib\multiprocessing\pool.py", line 268, in __del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File "c:\python38\lib\multiprocessing\connection.py", line 280, in _send_bytes
ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Pool.__del__ at 0x0000017FFF66A550>
Traceback (most recent call last):
File "c:\python38\lib\multiprocessing\pool.py", line 268, in __del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File "c:\python38\lib\multiprocessing\connection.py", line 280, in _send_bytes
ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Pool.__del__ at 0x0000017FFF66A550>
Traceback (most recent call last):
File "c:\python38\lib\multiprocessing\pool.py", line 268, in __del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File "c:\python38\lib\multiprocessing\connection.py", line 280, in _send_bytes
ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Pool.__del__ at 0x0000017FFF66A550>
Traceback (most recent call last):
File "c:\python38\lib\multiprocessing\pool.py", line 268, in __del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File "c:\python38\lib\multiprocessing\connection.py", line 280, in _send_bytes
ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Pool.__del__ at 0x0000017FFF66A550>
Traceback (most recent call last):
File "c:\python38\lib\multiprocessing\pool.py", line 268, in __del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File "c:\python38\lib\multiprocessing\connection.py", line 280, in _send_bytes
ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Pool.__del__ at 0x0000017FFF66A550>
Traceback (most recent call last):
File "c:\python38\lib\multiprocessing\pool.py", line 268, in __del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File "c:\python38\lib\multiprocessing\connection.py", line 280, in _send_bytes
ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Pool.__del__ at 0x0000017FFF66A550>
Traceback (most recent call last):
File "c:\python38\lib\multiprocessing\pool.py", line 268, in __del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File "c:\python38\lib\multiprocessing\connection.py", line 280, in _send_bytes
ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
OSError: [WinError 6] The handle is invalid
Exception ignored in: <function Pool.__del__ at 0x0000017FFF66A550>
Traceback (most recent call last):
File "c:\python38\lib\multiprocessing\pool.py", line 268, in __del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
del__
self._change_notifier.put(None)
File "c:\python38\lib\multiprocessing\queues.py", line 365, in put
self._writer.send_bytes(obj)
File "c:\python38\lib\multiprocessing\connection.py", line 200, in send_bytes
self._send_bytes(m[offset:offset + size])
File "c:\python38\lib\multiprocessing\connection.py", line 280, in _send_bytes
ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
OSError: [WinError 6] The handle is invalid