Documentation
¶
Index ¶
- type Query
- func (q *Query) AddError(err error)
- func (q *Query) Errors() []error
- func (q *Query) Generate() string
- func (q *Query) SetPosAttrs(attrs []corpus.PosAttr) *Query
- func (q *Query) SetStructureMapping(m corpus.StructureMapping) *Query
- func (q *Query) TranslatePosAttr(qualifier, name string) string
- func (q *Query) TranslateWithinCtx(v string) string
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) SetStructureMapping ¶
func (q *Query) SetStructureMapping(m corpus.StructureMapping) *Query
func (*Query) TranslatePosAttr ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.