How to summarize the plain text
Opened this issue · 7 comments
Deepan1303 commented
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.
vgel commented
You'll need to write a bit of code to load the plain text with open(...).read() and feed it into the library.
sravanth commented
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))
Pankaj2908 commented
Any updates on this error .. I am also facing the same issue
vgel commented
What's the text file contents?
Pankaj2908 commented
What type of documents can be used?
…On Thu, Sep 27, 2018 at 1:48 AM Jonathon Vogel ***@***.***> wrote:
What's the text file contents?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AhLGhNaiWP7rPr2LYlAPBvAtNfMGs6mEks5ue73fgaJpZM4KQwdr>
.
vgel commented
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 ***@***.***> wrote:
What type of documents can be used?
On Thu, Sep 27, 2018 at 1:48 AM Jonathon Vogel ***@***.***>
wrote:
> What's the text file contents?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#13 (comment)>,
> 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
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA70gLTp1b5uhZGumv-tNtP3e1dGtBbVks5ufGcvgaJpZM4KQwdr>
.
Pankaj2908 commented
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 <notifications@github.com>
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 ***@***.***>
wrote:
> What type of documents can be used?
>
> On Thu, Sep 27, 2018 at 1:48 AM Jonathon Vogel ***@***.***
>
> wrote:
>
> > What's the text file contents?
> >
> > —
> > You are receiving this because you commented.
> > Reply to this email directly, view it on GitHub
> > <#13 (comment)
>,
> > 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
> <#13 (comment)>,
> 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
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AhLGhK-MoaHGi95l0xOEBLONPN3j7In3ks5ufI5mgaJpZM4KQwdr>
.