greenshark

package module
v0.0.0-...-20e6b47 Latest Latest
Warning

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

Go to latest
Published: May 5, 2019 License: MIT Imports: 8 Imported by: 0

README

green-shark

news aggreagator

The goal is to present news article in a fancy way (and play with go).

Install

mkdir <workspace>
cd <workspace>
go mod init .
go get -v "github.com/manu3618/green-shark/"

Features

Road-map

  • present keyords in timeline
  • highlight few article based on important keywords
  • fetch article from rss news

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractStopWords

func ExtractStopWords() []string

Extract words present in all document of the corpus, likely stop words

func ExtractWords

func ExtractWords() []string

Extract words present in corpus

Types

type Article

type Article struct {
	Id      string
	Content string
	Date    time.Time
	Title   string
	Link    string
}

func HtmlToArticle

func HtmlToArticle(html []byte) []Article

func (Article) String

func (art Article) String() string

func (Article) ToWordVector

func (art Article) ToWordVector() map[string]int
type Link struct {
	XMLName xml.Name `link`
	Href    string   `xml:"href,attr"`
}

type RssArticle

type RssArticle struct {
	XMLName     xml.Name  `entry`
	Title       string    `xml:"title"`
	DateCreated time.Time `xml:"published"`
	DateUpdated time.Time `xml:"updated"`
	Id          string    `xml:"id"`
	Content     string    `xml:"content"`
	Link        Link      `xml:"link"`
}

type RssArticles

type RssArticles struct {
	XMLName  xml.Name     `feed`
	Articles []RssArticle `xml:"entry"`
}

Jump to

Keyboard shortcuts

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