Documentation
¶
Index ¶
- type Entity
- type ExtractionResult
- type Extractor
- type OllamaExtractor
- func (o *OllamaExtractor) Available(ctx context.Context) bool
- func (o *OllamaExtractor) Extract(text string) ([]Entity, []Relationship, error)
- func (o *OllamaExtractor) ListModels(ctx context.Context) ([]string, error)
- func (o *OllamaExtractor) Name() string
- func (o *OllamaExtractor) PullModel(ctx context.Context, model string, progress func(api.ProgressResponse) error) error
- type Pipeline
- type RegexExtractor
- type Relationship
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct {
Name string
Type string
Confidence float64
Source string // "regex" or "ollama"
}
Entity represents an extracted entity
type ExtractionResult ¶
type ExtractionResult struct {
Entities []Entity
Relationships []Relationship
Duration time.Duration
Extractor string
}
ExtractionResult contains all extracted information and metadata
type Extractor ¶
type Extractor interface {
Extract(text string) ([]Entity, []Relationship, error)
Name() string
}
Extractor is the interface for entity extraction strategies
type OllamaExtractor ¶
type OllamaExtractor struct {
// contains filtered or unexported fields
}
func NewOllamaExtractor ¶
func NewOllamaExtractor(model string) (*OllamaExtractor, error)
func (*OllamaExtractor) Available ¶
func (o *OllamaExtractor) Available(ctx context.Context) bool
Available checks if Ollama is running and reachable
func (*OllamaExtractor) Extract ¶
func (o *OllamaExtractor) Extract(text string) ([]Entity, []Relationship, error)
func (*OllamaExtractor) ListModels ¶
func (o *OllamaExtractor) ListModels(ctx context.Context) ([]string, error)
ListModels returns a list of installed Ollama models
func (*OllamaExtractor) Name ¶
func (o *OllamaExtractor) Name() string
func (*OllamaExtractor) PullModel ¶
func (o *OllamaExtractor) PullModel(ctx context.Context, model string, progress func(api.ProgressResponse) error) error
PullModel pulls a model from the Ollama library
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
func NewPipeline ¶
type RegexExtractor ¶
type RegexExtractor struct {
// contains filtered or unexported fields
}
func NewRegexExtractor ¶
func NewRegexExtractor() *RegexExtractor
func (*RegexExtractor) Extract ¶
func (r *RegexExtractor) Extract(text string) ([]Entity, []Relationship, error)
func (*RegexExtractor) Name ¶
func (r *RegexExtractor) Name() string
type Relationship ¶
type Relationship struct {
FromEntity string
ToEntity string
Type string
Confidence float64
Source string // "regex" or "ollama"
}
Relationship represents a dependency between two entities
func ExtractRelationships ¶
func ExtractRelationships(text string) []Relationship
ExtractRelationships extracts explicit relationships from text Pattern: "- EntityA -> EntityB (relationship)"
Click to show internal directories.
Click to hide internal directories.