summarize.py icon indicating copy to clipboard operation
summarize.py copied to clipboard

How to summarize the plain text

Open Deepan1303 opened this issue 9 years ago • 7 comments

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.

Deepan1303 avatar Oct 07 '16 07:10 Deepan1303

You'll need to write a bit of code to load the plain text with open(...).read() and feed it into the library.

vgel avatar Oct 09 '16 20:10 vgel

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))

sravanth avatar Mar 14 '17 17:03 sravanth

Any updates on this error .. I am also facing the same issue

Pankaj2908 avatar Sep 26 '18 09:09 Pankaj2908

What's the text file contents?

vgel avatar Sep 26 '18 17:09 vgel

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 .

Pankaj2908 avatar Sep 27 '18 05:09 Pankaj2908

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 .

vgel avatar Sep 27 '18 08:09 vgel

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 .

Pankaj2908 avatar Sep 27 '18 08:09 Pankaj2908