spider

package
v0.0.0-...-27c5c4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2014 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseUrl string = "http://zh.wikipedia.org/zh-cn/"
)

Variables

This section is empty.

Functions

func GetKeyWord

func GetKeyWord(sentence string) []string

func InitSegment

func InitSegment()

func Parse

func Parse(sentence string) []string

Types

type ValSorter

type ValSorter struct {
	Keys []string
	Vals []int
}

func DealPage

func DealPage(word string) (*ValSorter, []string)

func NewValSorter

func NewValSorter(m map[string]int) *ValSorter

func (*ValSorter) Len

func (vs *ValSorter) Len() int

func (*ValSorter) Less

func (vs *ValSorter) Less(i, j int) bool

func (*ValSorter) Sort

func (vs *ValSorter) Sort()

func (*ValSorter) Swap

func (vs *ValSorter) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL