News CateGOrizer for public companies listed in stock exchanges in Bangladesh.
Tickr provides a Go package which let you categorize news data(title,article etc.) into TICKER of publicly traded companies in stock exchanges here in Bangladesh.
It is based on the bdstock.json dataset that I developed which includes 3 datapoints for each public company listed in stock market of Bangladesh:
- Company names, the way they usually appear in newspaper.
- TICKER of that company.
- Sector of that company.
This package includes two API:
- Get(): for extracting TICKER(s) from given news data.
- Sector(): for extracting sector from given TICKER.
In addition this library provides a CLI to perform the above operations via console.
To start using Tickr, install Go and run go get
:
$ go get github.com/rafatbiin/tickr/...
This will retrieve the library and install the tickr
command line utility into
your $GOBIN
path.
The top-level object in Tickr is a Ticker
.
To get TICKER(s) for your news data, simply create an instance of Ticker
and use the t.Get(news_data)
function:
package main
import (
"github.com/rafatbiin/tickr"
)
func main() {
t, err := tickr.New()
if err != nil {
// Handle error
}
news_data := "রূপালী ব্যাংকের দ্বিতীয় প্রান্তিক প্রকাশ"
tickers := t.Get(news_data) // map(TICKER->frequency) => {"RUPALIBANK":1}
...
}
To get Sector of a publicly traded Compnay in Bangladesh, use the t.Sector(TICKER)
function:
package main
import (
"github.com/rafatbiin/tickr"
)
func main() {
t, err := tickr.New()
if err != nil {
// Handle error
}
ticker := "RUPALIBANK"
s := t.Sector(ticker) // bank
...
}
For TICKER(s):
$ tickr ticker "রূপালী ব্যাংকের দ্বিতীয় প্রান্তিক প্রকাশ"
{"RUPALIBANK":1}
For Sector:
$ tickr sector RUPALIBANK
bank