assessment

package
v0.0.0-...-05931ac Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

README

Assessment Module

The Assessment Module will analyse user-provided input to provide more complex statistics.

Additionally, it can cache results for analyses so that multiple requests only require one real run. This cache assumes that the user-provided input is not changed through its lifespan.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	Props schematree.IList
	// contains filtered or unexported fields
}

Instance - An assessment on properties

COMMENT: The assessment module might be too tighly coupled with the SchemaTree. In the

early days the SchemaTree delegate the job of creating the input arguments to
the caller of the method. The caller would create the IList and then pass it
to the SchemaTree. This behaviour should be avoid because it makes too much
internal information visible to the outside. The correct behaviour is to accept
an array of strings (or byte-arrays) and then construct the IList oneself.
To fix this issue in the future, please consider making IList and IItem private
and then use the schematree.Recommend(props []string, types []string).
Likewise, assessments should be working with arrays of strings and not IItems.
The benefit in the current method is a faster evaluation since the IList
construction does not need to be done multiple times.

func NewInstance

func NewInstance(argProps schematree.IList, argTree *schematree.SchemaTree, argUseCache bool) *Instance

NewInstance : constructor method

func NewInstanceFromInput

func NewInstanceFromInput(argProps []string, argTypes []string, argTree *schematree.SchemaTree, argUseCache bool) *Instance

NewInstanceFromInput : constructor method to receive strings and convert them into the current assessment format that uses IList.

func (*Instance) CalcPropertyLength

func (inst *Instance) CalcPropertyLength() int

CalcPropertyLength : Calculate the amount of properties.

func (*Instance) CalcRecommendations

func (inst *Instance) CalcRecommendations() schematree.PropertyRecommendations

CalcRecommendations : Will execute the core schematree recommender on the properties and return the list of recommendations. Cache-enabled operation.

func (*Instance) GetWikiRecs

func (inst *Instance) GetWikiRecs(Properties []string) schematree.PropertyRecommendations

GetWikiRecs computes recommendations from a local wikidata PropertySuggester

Jump to

Keyboard shortcuts

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