Documentation ¶
Overview ¶
Service reasoner provides a knowledge base and inference engine.
Index ¶
- Variables
- func AddNamespacePrefix(s string, ns map[string]string) string
- func BuildQuery(q *sparql.Query, facts []*Fact) *sparql.Query
- func CreateURIFromLiteral(s string) string
- func FillVariables(fs []*Fact)
- func FormSentences(fs []*Fact) []string
- func GetLabelMappings(fs []*Fact) (map[string]string, []string)
- func GuessType(s string) string
- func ToJsonLd(fs []*Fact) []interface{}
- type Dependencies
- type Fact
- type Service
- func (s *Service) AddLabelFacts(fs []*Fact) ([]*Fact, error)
- func (s *Service) Enable() error
- func (s *Service) HandleQuery(msg sarif.Message)
- func (s *Service) HandleQueryExternal(msg sarif.Message)
- func (s *Service) HandleStore(msg sarif.Message)
- func (s *Service) InterpretLiterals(f Fact) (Fact, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = &services.Module{ Name: "reasoner", Version: "1.0", NewInstance: NewService, }
Functions ¶
func CreateURIFromLiteral ¶
func FillVariables ¶
func FillVariables(fs []*Fact)
func FormSentences ¶
Types ¶
type Fact ¶
type Fact struct { Id int64 `json:"-"` Subject string `json:"subject"` Predicate string `json:"predicate"` Object string `json:"object"` SubjectType string `json:"subject_type" sql:"-"` PredicateType string `json:"predicate_type" sql:"-"` ObjectType string `json:"object_type" sql:"-"` UpdatedAt time.Time `json:"updated_at,omitempty" sql:"index"` }
func (*Fact) FillMissingTypes ¶
func (f *Fact) FillMissingTypes()
type Service ¶
func NewService ¶
func NewService(deps *Dependencies) *Service
func (*Service) HandleQuery ¶
func (*Service) HandleQueryExternal ¶
func (*Service) HandleStore ¶
Click to show internal directories.
Click to hide internal directories.