knowledge

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package knowledge 包含知识图谱提取

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	Subject   string `json:"subject,omitempty"`
	Attribute string `json:"attribute,omitempty"`
	Value     string `json:"value,omitempty"`
}

Entity entity result

func (Entity) String

func (e Entity) String() string

type Knowledge

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

Knowledge 知识图谱关系提取

func New

func New(model *perceptron.Perceptron) *Knowledge

New 新建图谱关系

func NewFromReader

func NewFromReader(r io.Reader) (*Knowledge, error)

NewFromReader 从model新建

func (*Knowledge) Entities

func (k *Knowledge) Entities(words []string) []Entity

type Subject

type Subject struct {
	Word  string
	Label string
	Index int
}

Subject model subject

Jump to

Keyboard shortcuts

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