How to summarize the plain text
i need to summarize the plain text which is saved in my local desk as text file. i think there is changes to be required. Please help if anyone knows.
You'll need to write a bit of code to load the plain text with open(...).read() and feed it into the library.
I tried feeding a text file to the library..but it is just returning the same text again..
I used the below code..
f = open('C:/Users/test.txt') file= f.read() import summarize print(summarize.summarize_text(file))
Any updates on this error .. I am also facing the same issue
What's the text file contents?
What type of documents can be used?
On Thu, Sep 27, 2018 at 1:48 AM Jonathon Vogel [email protected] wrote:
What's the text file contents?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vgel/summarize.py/issues/13#issuecomment-424808694, or mute the thread https://github.com/notifications/unsubscribe-auth/AhLGhNaiWP7rPr2LYlAPBvAtNfMGs6mEks5ue73fgaJpZM4KQwdr .
Any text file or HTML document shpuld be usable, though it's been a while since I've looked at the source for this project. Depending on how your document is formatted, the automatic paragraph detection might get screwed up, it's pretty basic and gets confused by e.g. unusual newline placement or websites that wrap every sentence in a paragraph tag. If you know a bit of Python I'd suggest just modifying the library to get it to work with your document, the code is pretty simple and I don't really actively update this project (it does what I needed it to do).
On Wed, Sep 26, 2018, 10:50 PM Pankaj2908 [email protected] wrote:
What type of documents can be used?
On Thu, Sep 27, 2018 at 1:48 AM Jonathon Vogel [email protected] wrote:
What's the text file contents?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vgel/summarize.py/issues/13#issuecomment-424808694, or mute the thread < https://github.com/notifications/unsubscribe-auth/AhLGhNaiWP7rPr2LYlAPBvAtNfMGs6mEks5ue73fgaJpZM4KQwdr
.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/vgel/summarize.py/issues/13#issuecomment-424966981, or mute the thread https://github.com/notifications/unsubscribe-auth/AA70gLTp1b5uhZGumv-tNtP3e1dGtBbVks5ufGcvgaJpZM4KQwdr .
So the following code is enough right:
f = open('C:/Users/test.txt') file= f.read() import summarize print(summarize.summarize_text(file))
On Thu, Sep 27, 2018 at 4:37 PM Jonathon Vogel [email protected] wrote:
Any text file or HTML document shpuld be usable, though it's been a while since I've looked at the source for this project. Depending on how your document is formatted, the automatic paragraph detection might get screwed up, it's pretty basic and gets confused by e.g. unusual newline placement or websites that wrap every sentence in a paragraph tag. If you know a bit of Python I'd suggest just modifying the library to get it to work with your document, the code is pretty simple and I don't really actively update this project (it does what I needed it to do).
On Wed, Sep 26, 2018, 10:50 PM Pankaj2908 [email protected] wrote:
What type of documents can be used?
On Thu, Sep 27, 2018 at 1:48 AM Jonathon Vogel <[email protected]
wrote:
What's the text file contents?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/vgel/summarize.py/issues/13#issuecomment-424808694 , or mute the thread <
https://github.com/notifications/unsubscribe-auth/AhLGhNaiWP7rPr2LYlAPBvAtNfMGs6mEks5ue73fgaJpZM4KQwdr
.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/vgel/summarize.py/issues/13#issuecomment-424966981, or mute the thread < https://github.com/notifications/unsubscribe-auth/AA70gLTp1b5uhZGumv-tNtP3e1dGtBbVks5ufGcvgaJpZM4KQwdr
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vgel/summarize.py/issues/13#issuecomment-425007387, or mute the thread https://github.com/notifications/unsubscribe-auth/AhLGhK-MoaHGi95l0xOEBLONPN3j7In3ks5ufI5mgaJpZM4KQwdr .