groove

package module
v0.0.0-...-b219894 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

gopher

groove

GoDoc Go Report Card gocover

Query analysis pipeline framework

groove is a library for pipeline construction for query analysis. The groove pipeline comprises a query source (the format of the queries), a statistic source (a source for computing information retrieval statistics), preprocessing steps, any measurements to make, and any output formats.

The groove library is primarily used in boogie which is a front-end DSL for groove. If using groove as a Go library, refer to the simple example below which loads Medline queries and analyses them using Elasticsearch and finally outputs the result into a JSON file.

API Usage

// Construct the pipeline.
p := NewGroovePipeline(
    query.NewTransmuteQuerySource(query.MedlineTransmutePipeline),
    stats.NewElasticsearchStatisticsSource(stats.ElasticsearchHosts("http://example.com:9200"),
                                           stats.ElasticsearchIndex("pubmed"),
                                           stats.ElasticsearchField("abstract"),
                                           stats.ElasticsearchDocumentType("doc")),
    Preprocess(preprocess.AlphaNum, preprocess.Lowercase),
    Measurement(analysis.TermCount{}, preqpp.AvgIDF{}),
    Output(output.JsonFormatter),
)

// Execute it on a directory of queries.
s, err := p.Execute("./medline")
if err != nil {
    log.Fatal(err)
}

// Print the result.
log.Println(s[0])

The Go gopher was created by Renee French, licensed under Creative Commons 3.0 Attributions license.

Documentation

Overview

Package groove is a query analysis and processing pipeline framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PipelineQuery

type PipelineQuery struct {
	// contains filtered or unexported fields
}

PipelineQuery stores information about a query before it is measured, analysed, or executed.

func NewPipelineQuery

func NewPipelineQuery(name string, topic int64, original cqr.CommonQueryRepresentation, params ...func(*PipelineQuery)) *PipelineQuery

NewPipelineQuery creates a new groove pipeline query.

func (*PipelineQuery) Name

func (gq *PipelineQuery) Name() string

Name is the name of the query.

func (*PipelineQuery) Original

Original is the initial query before preprocessing or transformation.

func (*PipelineQuery) Processed

Processed gets the processed variation of the query.

func (*PipelineQuery) SetProcessed

SetProcessed initiates the processed variation of the query.

func (*PipelineQuery) SetTransformed

func (gq *PipelineQuery) SetTransformed(q func() cqr.CommonQueryRepresentation) PipelineQuery

SetTransformed initiates the transformed variation of the query.

func (*PipelineQuery) Topic

func (gq *PipelineQuery) Topic() int64

Topic is the topic of the query for use in trec runs.

func (*PipelineQuery) Transformed

func (gq *PipelineQuery) Transformed() cqr.CommonQueryRepresentation

Transformed gets the transformed variation of the query.

type PipelineResult

type PipelineResult struct {
	Measurements    []string
	Transformations []QueryResult
	TrecResults     *trecresults.ResultList
}

PipelineResult is the output of a groove pipeline.

type QueryResult

type QueryResult struct {
	Name           string
	Transformation cqr.CommonQueryRepresentation
}

QueryResult is the result of a transformation.

Directories

Path Synopsis
Package analysis provides measurements and analysis tools for queries.
Package analysis provides measurements and analysis tools for queries.
postqpp
Package preqpp implements pre-retrieval query performance predictors, reproducing the Java API from https://github.com/lucene4ir/lucene4ir
Package preqpp implements pre-retrieval query performance predictors, reproducing the Java API from https://github.com/lucene4ir/lucene4ir
preqpp
Package preqpp implements pre-retrieval query performance predictors, reproducing the Java API from https://github.com/lucene4ir/lucene4ir
Package preqpp implements pre-retrieval query performance predictors, reproducing the Java API from https://github.com/lucene4ir/lucene4ir
Package output provides different formats of output for experiments.
Package output provides different formats of output for experiments.
Package pipeline provides a framework for constructing reproducible query experiments.
Package pipeline provides a framework for constructing reproducible query experiments.
Package preprocess handles preprocessing and transformation of queries.
Package preprocess handles preprocessing and transformation of queries.
Package query provides sources for loading queries in different formats.
Package query provides sources for loading queries in different formats.
Package stats provides implementations of statistic sources.
Package stats provides implementations of statistic sources.

Jump to

Keyboard shortcuts

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