disambig

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TSAllOut bool = false

Variables

View Source
var (
	UsePOP           bool
	SwitchFormLemma  bool
	POP_ONLY_VAR_LEN bool = true
	AFFIX_SIZE       int  = 10
)
View Source
var LEMMAS bool = true

Functions

This section is empty.

Types

type MDConfig

type MDConfig struct {
	LatticeQueue Queue
	Lattices     nlp.LatticeSentence
	Mappings     nlp.Mappings
	Morphemes    nlp.Morphemes
	Lemmas       []int

	CurrentLatNode int

	InternalPrevious Configuration
	Last             Transition
	ETokens          *util.EnumSet
	Log              bool

	POP         Transition
	Transitions *util.EnumSet
	ParamFunc   nlp.MDParam
	// contains filtered or unexported fields
}

func (*MDConfig) AddLemmaAmbiguity

func (c *MDConfig) AddLemmaAmbiguity(morphIDs []int)

func (*MDConfig) AddMapping

func (c *MDConfig) AddMapping(m *nlp.EMorpheme)

func (*MDConfig) AddSpellout

func (c *MDConfig) AddSpellout(spellout string, paramFunc nlp.MDParam) bool

func (*MDConfig) Address

func (c *MDConfig) Address(location []byte, sourceOffset int) (int, bool, bool)

func (*MDConfig) Alignment

func (c *MDConfig) Alignment() int

func (*MDConfig) Assignment

func (c *MDConfig) Assignment() uint16

func (*MDConfig) Attribute

func (c *MDConfig) Attribute(source byte, nodeID int, attribute []byte, transitions []int) (att interface{}, exists bool, isGenerator bool)

func (*MDConfig) ChooseLemma

func (c *MDConfig) ChooseLemma(lemma string)

func (*MDConfig) Clear

func (c *MDConfig) Clear()

func (*MDConfig) Copy

func (c *MDConfig) Copy() Configuration

func (*MDConfig) CopyTo

func (c *MDConfig) CopyTo(target Configuration)

func (*MDConfig) Equal

func (c *MDConfig) Equal(otherEq util.Equaler) bool

func (*MDConfig) GenerateAddresses

func (c *MDConfig) GenerateAddresses(nodeID int, location []byte) (nodeIDs []int)

func (*MDConfig) GetLastTransition

func (c *MDConfig) GetLastTransition() Transition

func (*MDConfig) GetSequence

func (c *MDConfig) GetSequence() ConfigurationSequence

func (*MDConfig) GetSource

func (c *MDConfig) GetSource(location byte) Index

func (*MDConfig) Init

func (c *MDConfig) Init(abstractLattice interface{})

func (*MDConfig) Len

func (c *MDConfig) Len() int

func (*MDConfig) Pop

func (c *MDConfig) Pop()

func (*MDConfig) Previous

func (c *MDConfig) Previous() Configuration

func (*MDConfig) SetLastTransition

func (c *MDConfig) SetLastTransition(t Transition)

func (*MDConfig) SetPrevious

func (c *MDConfig) SetPrevious(prev Configuration)

func (*MDConfig) State

func (c *MDConfig) State() byte

func (*MDConfig) String

func (c *MDConfig) String() string

func (*MDConfig) StringLatticeQueue

func (c *MDConfig) StringLatticeQueue() string

func (*MDConfig) Terminal

func (c *MDConfig) Terminal() bool

type MDOracle

type MDOracle struct {
	Transitions *util.EnumSet

	ParamFunc MDParam
	UsePOP    bool
	// contains filtered or unexported fields
}

func (*MDOracle) CountMatchingTrans

func (o *MDOracle) CountMatchingTrans(c *MDConfig, pf MDParam, testTrans string) (matches int, matching string)

func (*MDOracle) Name

func (o *MDOracle) Name() string

func (*MDOracle) SetGold

func (o *MDOracle) SetGold(g interface{})

func (*MDOracle) Transition

func (o *MDOracle) Transition(conf Configuration) Transition

type MDTrans

type MDTrans struct {
	ParamFunc MDParam
	POP       Transition

	Transitions *util.EnumSet

	Log    bool
	UsePOP bool
	// contains filtered or unexported fields
}

func (*MDTrans) AddDefaultOracle

func (t *MDTrans) AddDefaultOracle()

func (*MDTrans) GetTransitions

func (a *MDTrans) GetTransitions(from Configuration) (byte, []int)

func (*MDTrans) Name

func (t *MDTrans) Name() string

func (*MDTrans) Oracle

func (t *MDTrans) Oracle() Oracle

func (*MDTrans) Transition

func (t *MDTrans) Transition(from Configuration, transition Transition) Configuration

func (*MDTrans) TransitionTypes

func (t *MDTrans) TransitionTypes() []string

func (*MDTrans) YieldTransitions

func (t *MDTrans) YieldTransitions(c Configuration) (byte, chan int)

type MDWBOracle

type MDWBOracle struct {
	Transitions *util.EnumSet

	ParamFunc MDParam
	UsePOP    bool
	// contains filtered or unexported fields
}

func (*MDWBOracle) Name

func (o *MDWBOracle) Name() string

func (*MDWBOracle) SetGold

func (o *MDWBOracle) SetGold(g interface{})

func (*MDWBOracle) Transition

func (o *MDWBOracle) Transition(conf Configuration) Transition

type MDWBTrans

type MDWBTrans struct {
	ParamFunc MDParam
	POP       Transition

	Transitions *util.EnumSet

	Log    bool
	UsePOP bool
	// contains filtered or unexported fields
}

func (*MDWBTrans) AddDefaultOracle

func (t *MDWBTrans) AddDefaultOracle()

func (*MDWBTrans) GetTransitions

func (a *MDWBTrans) GetTransitions(from Configuration) (byte, []int)

func (*MDWBTrans) Name

func (t *MDWBTrans) Name() string

func (*MDWBTrans) Oracle

func (t *MDWBTrans) Oracle() Oracle

func (*MDWBTrans) Transition

func (t *MDWBTrans) Transition(from Configuration, transition Transition) Configuration

func (*MDWBTrans) TransitionTypes

func (t *MDWBTrans) TransitionTypes() []string

func (*MDWBTrans) YieldTransitions

func (t *MDWBTrans) YieldTransitions(c Configuration) (byte, chan int)

type MorphologicalDisambiguator

type MorphologicalDisambiguator interface {
	Parse(LatticeSentence) (Mappings, interface{})
}

Jump to

Keyboard shortcuts

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