fcsql

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

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

func ParseQuery

func ParseQuery(
	q string,
	posAttrs []corpus.PosAttr,
	smapping corpus.StructureMapping,
) (*Query, error)

ParseQuery parses FCS-QL and returns an abstract syntax tree which can be used to generate CQL.

func (*Query) AddError

func (q *Query) AddError(err error)

func (*Query) Errors

func (q *Query) Errors() []error

func (*Query) Generate

func (q *Query) Generate() string

func (*Query) SetPosAttrs

func (q *Query) SetPosAttrs(attrs []corpus.PosAttr) *Query

func (*Query) SetStructureMapping

func (q *Query) SetStructureMapping(m corpus.StructureMapping) *Query

func (*Query) TranslatePosAttr

func (q *Query) TranslatePosAttr(qualifier, name string) string

TranslatePosAttr transforms a FCS-QL attribute specifier (e.g. `text`, `p_tag:pos`) into a real corpus positional attribute. Please note that it also supports `word` alias for the `text` layer

func (*Query) TranslateWithinCtx

func (q *Query) TranslateWithinCtx(v string) string

Jump to

Keyboard shortcuts

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