inference

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package inference implements an in-memory store for inference.

RDFS Rules:

  1. (x p y) -> (p rdf:type rdf:Property)
  2. (p rdfs:domain c), (x p y) -> (x rdf:type c)
  3. (p rdfs:range c), (x p y) -> (y rdf:type c) 4a. (x p y) -> (x rdf:type rdfs:Resource) 4b. (x p y) -> (y rdf:type rdfs:Resource)
  4. (p rdfs:subPropertyOf q), (q rdfs:subPropertyOf r) -> (p rdfs:subPropertyOf r)
  5. (p rdf:type Property) -> (p rdfs:subPropertyOf p)
  6. (p rdf:subPropertyOf q), (x p y) -> (x q y)
  7. (c rdf:type rdfs:Class) -> (c rdfs:subClassOf rdfs:Resource)
  8. (c rdfs:subClassOf d), (x rdf:type c) -> (x rdf:type d)
  9. (c rdf:type rdfs:Class) -> (c rdfs:subClassOf c)
  10. (c rdfs:subClassOf d), (d rdfs:subClassOf e) -> (c rdfs:subClassOf e)
  11. (p rdf:type rdfs:ContainerMembershipProperty) -> (p rdfs:subPropertyOf rdfs:member)
  12. (x rdf:type rdfs:Datatype) -> (x rdfs:subClassOf rdfs:Literal)

Exported from: https://www.researchgate.net/figure/RDF-RDFS-entailment-rules_tbl1_268419911

Implemented here: 1 2 3 5 6 8 10 11

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	// contains filtered or unexported fields
}

Class represents a RDF Class with the links to classes and other properties

func (*Class) IsSubClassOf

func (c *Class) IsSubClassOf(super *Class) bool

IsSubClassOf recursively checks whether class is a superClass

func (*Class) Name

func (c *Class) Name() quad.Value

Name returns the class's name

type Property

type Property struct {
	// contains filtered or unexported fields
}

Property represents a RDF Property with the links to classes and other properties

func (*Property) Domain

func (p *Property) Domain() *Class

Domain returns the domain of the property

func (*Property) IsSubPropertyOf

func (p *Property) IsSubPropertyOf(super *Property) bool

IsSubPropertyOf recursively checks whether property is a superProperty

func (*Property) Name

func (p *Property) Name() quad.Value

Name returns the property's name

func (*Property) Range

func (p *Property) Range() *Class

Range returns the range of the property

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is a struct holding the inference data

func NewStore

func NewStore() Store

NewStore creates a new Store

func (*Store) GetClass

func (s *Store) GetClass(name quad.Value) *Class

GetClass returns a class struct for class name, if it doesn't exist in the store then it returns nil

func (*Store) GetProperty

func (s *Store) GetProperty(name quad.Value) *Property

GetProperty returns a class struct for property name, if it doesn't exist in the store then it returns nil

func (*Store) ProcessQuads

func (s *Store) ProcessQuads(quads ...quad.Quad)

ProcessQuads is used to update the store with multiple quads

func (*Store) UnprocessQuads

func (s *Store) UnprocessQuads(quads ...quad.Quad)

UnprocessQuads is used to delete multiple quads from the store

Jump to

Keyboard shortcuts

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