Is there any boilerpipe like project implemented in go language?
i tried searching in google but didn't find any
You might want to have a look at Goose: https://github.com/advancedlogic/GoOse
You have the beginning of that idea is mikkolehtisalo/revel/deXSS
deXSS
- HTML Stripping for RevelOptions for sanitizing HTML input:
- Escaping everything, e.g. with html.EscapeString
- Parse HTML input, and filter the nodes using pre-defined rules
This library does the latter for both tags and attributes.
It is not near as complete as boilerpipe, but it is a start.
func blahblah() {
out := FilterHTML("<p>Hello <a mushroom=\"big\" href=\"/snake\">badger</a>!</p><p>Got it?</p>", allowed, true)
// The attribute "mushroom" was not in allowed, so it will be gone!
revel.INFO.Printf("Result of filtering: %+v", out)
}