diff

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBase

type DBase interface {
	Init(*sql.DB)
	Select(string) ([]Record, error)
}

type Diff

type Diff interface {
	// Compare takes two SFGA archives and compares their data.
	// The result is saved internally to SFGA database.
	Compare(src, ref, out string) error
}

Diff defines methods to compare two SFGA datasets.

type Exact

type Exact interface {
	Init([]Record)
	Find(string) bool
}

type Fuzzy

type Fuzzy interface {
	Init([]Record) error
	FindExact(string) []string
	FindFuzzy(string) []string
}

type Matcher

type Matcher interface {
	Init(*sql.DB, []Record) error
	Match(Record) ([]Record, error)
	MatchExact(string) ([]Record, error)
	MatchFuzzy(string, string) ([]Record, error)
}

type Record

type Record struct {
	DataSet          string                  `json:"dataSet"`
	Index            int                     `json:"index"`
	EditDistance     int                     `json:"editDistance,omitempty"`
	ID               string                  `json:"id,omitempty"`
	Name             string                  `json:"name"`
	ParsingQuality   int                     `json:"parsingQuality"`
	Cardinality      int                     `json:"cardinality,omitempty"`
	CanonicalSimple  string                  `json:"canonicalSimple,omitempty"`
	CanonicalFull    string                  `json:"canonicalFull,omitempty"`
	CanonicalStemmed string                  `json:"canonicalStemmed,omitempty"`
	Authors          []string                `json:"authors,omitempty"`
	Year             int                     `json:"year,omitempty"`
	Family           string                  `json:"family,omitempty"`
	MatchType        verifier.MatchTypeValue `json:"matchType,omitempty"`
	Score            float64                 `json:"score,omitempty"`
	ScoreDetails     *verifier.ScoreDetails  `json:"scoreDetails,omitempty"`
}

Jump to

Keyboard shortcuts

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