cnf

package
v0.18.6 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BibViewConf

type BibViewConf struct {
	Cols   []string `json:"cols"`
	IDAttr string   `json:"idAttr"`
}

BibViewConf is a sub-configuration for bibliographic data.

type FilterConf

type FilterConf struct {
	Lib string `json:"lib"`
	Fn  string `json:"fn"`
}

FilterConf specifies a plug-in containing a compatible filter (see LineFilter interface).

type NgramConf

type NgramConf struct {
	AttrColumns    []int    `json:"attrColumns"`
	ColumnMods     []string `json:"columnMods"`
	NgramSize      int      `json:"ngramSize"`
	UniqKeyColumns []int    `json:"uniqKeyColumns"`
	CalcARF        bool     `json:"calcARF"`
}

NgramConf configures positional attributes (referred by their column position) we want to store and count as n-grams. This can be used to extract all the unique PoS tags or frequency information about words/lemmas.

type SelfJoinConf

type SelfJoinConf struct {
	ArgColumns  []string `json:"argColumns"`
	GeneratorFn string   `json:"generatorFn"`
}

SelfJoinConf contains information about aligned structural attributes (e.g. sentences from two languages).

type VTEConf

type VTEConf struct {
	Corpus              string `json:"corpus"`
	AtomStructure       string `json:"atomStructure"`
	AtomParentStructure string `json:"atomParentStructure"`
	StackStructEval     bool   `json:"stackStructEval"`

	// MaxNumErrors if reached then the process stops
	MaxNumErrors int                 `json:"maxNumErrors"`
	Structures   map[string][]string `json:"structures"`

	// Ngrams - see NgramConf
	// If omitted then the function is disabled.
	Ngrams NgramConf `json:"ngrams"`

	// VerticalFile can be either a path to a single file
	// or a path to a directory containing multiple vertical
	// files (then we assume all the vertical files are of the
	// same structure)
	VerticalFile string `json:"verticalFile"`

	// VerticalFiles is an alternative to VerticalFile allowing
	// explicit selection of one or more files to be processed
	// as one.
	VerticalFiles []string `json:"verticalFiles"`

	DBFile         string       `json:"dbFile"`
	DBConfSettings []string     `json:"dbConfSettings"`
	Encoding       string       `json:"encoding"`
	SelfJoin       SelfJoinConf `json:"selfJoin"`
	IndexedCols    []string     `json:"indexedCols"`
	BibView        BibViewConf  `json:"bibView"`

	Filter FilterConf `json:"filter"`
}

VTEConf holds configuration for a concrete data extraction task.

func LoadConf

func LoadConf(confPath string) (*VTEConf, error)

func (*VTEConf) GetAtomParentStructure

func (c *VTEConf) GetAtomParentStructure() string

func (*VTEConf) GetAtomStructure

func (c *VTEConf) GetAtomStructure() string

func (*VTEConf) GetCorpus

func (c *VTEConf) GetCorpus() string

func (*VTEConf) GetDbConfSettings

func (c *VTEConf) GetDbConfSettings() []string

func (*VTEConf) GetFilterFn

func (c *VTEConf) GetFilterFn() string

func (*VTEConf) GetFilterLib

func (c *VTEConf) GetFilterLib() string

func (*VTEConf) GetMaxNumErrors

func (c *VTEConf) GetMaxNumErrors() int

func (*VTEConf) GetNgrams

func (c *VTEConf) GetNgrams() *NgramConf

func (*VTEConf) GetStackStructEval

func (c *VTEConf) GetStackStructEval() bool

func (*VTEConf) GetStructures

func (c *VTEConf) GetStructures() map[string][]string

func (*VTEConf) HasConfiguredBib

func (c *VTEConf) HasConfiguredBib() bool

func (*VTEConf) HasConfiguredFilter

func (c *VTEConf) HasConfiguredFilter() bool

func (*VTEConf) UsesSelfJoin

func (c *VTEConf) UsesSelfJoin() bool

Jump to

Keyboard shortcuts

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