resolve

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(ctx context.Context, n int, r Interface, s semix.Stream) semix.Stream

Resolve resolves ambiguities using the given Interface.

Types

type Automatic

type Automatic struct {
	Threshold float64
}

Automatic disambiguates concepts by calculating the thematic overlap of the concepts with the memory.

func (Automatic) Resolve

func (a Automatic) Resolve(c *semix.Concept, mem *memory.Memory) *semix.Concept

Resolve resolves ambiguities using the automatic method.

type Interface

type Interface interface {
	// Resolve returns the disambiguated concept or nil if the
	// concept could not be disambiguated. It is an error
	// to call Resolve with a non-ambigiuous concept.
	Resolve(*semix.Concept, *memory.Memory) *semix.Concept
}

Interface defines the interface for the disambiguation.

type Ruled

type Ruled struct {
	Rules rule.Map
}

Ruled is a resolver that uses the compiled rules to disambiguate concepts.

func (Ruled) Resolve

func (r Ruled) Resolve(c *semix.Concept, mem *memory.Memory) *semix.Concept

Resolve is used to resolve ambiguities.

type Simple

type Simple struct{}

Simple chooses the most occuring concept in the memory that occurres at least once in the memory.

func (Simple) Resolve

func (Simple) Resolve(c *semix.Concept, mem *memory.Memory) *semix.Concept

Resolve chooses the most occuring concept in the memory that occurres at least once in the memory.

Jump to

Keyboard shortcuts

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