ktodorov / go-summarizer Goto Github PK
View Code? Open in Web Editor NEWSummarize text and websites and optionally saves the data to a local file
License: MIT License
Summarize text and websites and optionally saves the data to a local file
License: MIT License
I've tried using your library with the following url
And it crashed with a segfault panic:
$ ./go-summarizer "http://www.capital.bg/politika_i_ikonomika/bulgaria/2017/02/17/2919580_zashto_izstinaha_trubite_na_toplofikaciia_sofiia/"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0xa5377]
goroutine 1 [running]:
panic(0x286e00, 0xc4200100c0)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/ktodorov/go-summarizer/helpers.replaceBrs(0xc420243420, 0x2d2fec, 0x4, 0xc420243420)
/Users/iron4o/gopath/src/github.com/ktodorov/go-summarizer/helpers/htmlHelper.go:275 +0x77
github.com/ktodorov/go-summarizer/helpers.getMainInfoFromHTML(0xc42021e000, 0x1ac00, 0xc42021e000, 0x1ac00, 0x0, 0x0, 0x0, 0x28, 0x2a3380, 0xc420132380, ...)
/Users/iron4o/gopath/src/github.com/ktodorov/go-summarizer/helpers/htmlHelper.go:369 +0x134
github.com/ktodorov/go-summarizer/helpers.ExtractMainInfoFromURL(0x7fff5fbffa18, 0x78, 0x12, 0x0, 0x0, 0x0, 0x0, 0xa0, 0x2fa1ed, 0x2fa1ec, ...)
/Users/iron4o/gopath/src/github.com/ktodorov/go-summarizer/helpers/urlHelper.go:30 +0xf7
github.com/ktodorov/go-summarizer.(*Summarizer).GetMainTextFromURL(0xc42004bed8, 0x90, 0xa0, 0xc4200ab0e0, 0x0)
/Users/iron4o/gopath/src/github.com/ktodorov/go-summarizer/summarizer.go:72 +0x66
github.com/ktodorov/go-summarizer.(*Summarizer).Summarize(0xc42004bed8, 0x10e38, 0xa0, 0xc42009b658, 0x1)
/Users/iron4o/gopath/src/github.com/ktodorov/go-summarizer/summarizer.go:44 +0x1f3
main.main()
/Users/iron4o/playfield/go-summarizer/main.go:15 +0xb6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.