Versions in this module Expand all Collapse all v0 v0.0.1 Jan 12, 2015 Changes in this version + const CONTINUOUS + const DECAY + func Analyse(doc string, o *Option) (content, title string) + type Block struct + Score float64 + Text string + func NewBlock(text string, score float64) (b *Block) + type BlockList []*Block + func NewBlockList() (bl BlockList) + func (self BlockList) AppendBlock() (bl BlockList) + func (self BlockList) Len() int + func (self BlockList) Less(i, j int) bool + func (self BlockList) Swap(i, j int) + type BlockProcessor struct + func NewBlockProcessor(o *Option, tp *TextProcessor) (bp *BlockProcessor) + func (self *BlockProcessor) GetMaxScoreContent() (c string) + func (self *BlockProcessor) Process(doc string) + type Extractor struct + func NewExtractor(o *Option) (e *Extractor) + func (self *Extractor) ExtractContent(doc string) (c string) + func (self *Extractor) ExtractTitle(doc string) (t string) + type Option struct + ContinuousFactor float64 + Debug bool + DecayFactor float64 + DomSeparator string + MinLength int + NotBodyFactor float64 + PunctuationWeight int + Punctuations *regexp.Regexp + Threashold float64 + WasteExpressions *regexp.Regexp + func NewOption() (o *Option) + func (self *Option) Initialize() + type TextProcessor struct + func NewTextProcessor(o *Option) (tp *TextProcessor) + func (self *TextProcessor) EliminateLink(doc string) (s string) + func (self *TextProcessor) EliminateTag(doc string) (s string) + func (self *TextProcessor) EliminateTags(doc string, separator string) (s string) + func (self *TextProcessor) EliminateUselessTags(doc string) (s string) + func (self *TextProcessor) HasFramesetOrRedirect(doc string) (b bool) + func (self *TextProcessor) IsOnlyTags(doc string) (b bool) + func (self *TextProcessor) IsShortLength(doc string) (b bool) + func (self *TextProcessor) IsZeroLength(doc string) (b bool) + func (self *TextProcessor) ParseAmazons(doc string) (s []string) + func (self *TextProcessor) ParseBlock(doc string) (s []string) + func (self *TextProcessor) ParseBodyHTML(doc string) (s string) + func (self *TextProcessor) ParseGoogleAdsSectionTargetHTML(doc string) (s string) + func (self *TextProcessor) ParseHeadHTML(doc string) (s string) + func (self *TextProcessor) ParsePunctuations(doc string) (s []string) + func (self *TextProcessor) ParseTitle(doc string) (s string) + func (self *TextProcessor) ParseWasteExpressions(doc string) (s []string) + func (self *TextProcessor) ReplaceHTag(doc, title string) (s string)