storage

package
v0.0.0-...-5fecf9c Latest Latest
Warning

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

Go to latest
Published: May 11, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Storage for semanticizer models.

Index

Constants

View Source
const DefaultMaxNGram = 7

XXX move this elsewhere

Variables

This section is empty.

Functions

func Finalize

func Finalize(db *sql.DB) (err error)

func LoadCM

func LoadCM(db *sql.DB) (sketch *countmin.Sketch, err error)

Load count-min sketch from table ngramfreq.

func MakeDB

func MakeDB(path string, overwrite bool, s *Settings) (db *sql.DB, err error)

func StoreCM

func StoreCM(db *sql.DB, sketch *countmin.Sketch) (err error)

Store count-min sketch into table ngramfreq.

func StoreRedirects

func StoreRedirects(db *sql.DB, redirs []wikidump.Redirect,
	bar *pb.ProgressBar) error

Types

type Settings

type Settings struct {
	Dumpname string // Filename of dump
	MaxNGram uint   // Max. length of n-grams
}

func LoadModel

func LoadModel(path string) (db *sql.DB, s *Settings, err error)

XXX Load and return the n-gram count-min sketch as well?

Jump to

Keyboard shortcuts

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