resource

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: 12 Imported by: 0

Documentation

Overview

Package resource defines the configuration for a knowledge base resource. It uses a simple toml file format

Index

Constants

View Source
const (
	// RDFXML sets the input format to RDF XML
	RDFXML = "rdfxml"
	// Turtle sets the input format to Turtle
	Turtle = "turtle"
	// Discard sets the ambig handler to discard all ambiguities.
	Discard = "discard"
	// Merge sets the ambig handler to merge ambiguities to a distinct concept.
	Merge = "merge"
	// Split sets the ambig handler to split ambiguities to an ambigiuous concept.
	Split = "split"
	// Fail sets the ambig handle to fail on any internal ambiguity.
	Fail = "fail"
)

Comparision ignores case

Variables

This section is empty.

Functions

func Parse

func Parse(file string, useCache bool) (*semix.Resource, error)

Parse is a convinence fuction that parses a knowledge base using a toml configuration file.

Types

type Config

type Config struct {
	File       file
	Predicates predicates
}

Config represents the configuration for a knowledge base.

func Read

func Read(file string) (*Config, error)

Read reads a configuration from a file.

func (*Config) Parse

func (c *Config) Parse(useCache bool) (*semix.Resource, error)

Parse parses the configuration and returns the graph and the dictionary. If useCache is false, the cache is neither read nor written.

func (*Config) Traits

func (c *Config) Traits() semix.Traits

Traits returns a new Traits interface using the configuration of this config file.

Jump to

Keyboard shortcuts

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