quality

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 4 Imported by: 0 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalParserName

func CanonicalParserName(name string) string

Types

type ArbitrationDecisionInput

type ArbitrationDecisionInput struct {
	AcceptedParser string
	Reason         string
	Reviewer       string
}

type ComparisonReport

type ComparisonReport struct {
	PaperID        string             `json:"paperId"`
	Documents      []ParserRunSummary `json:"documents"`
	Candidates     []ParserCandidate  `json:"candidates"`
	SectionDelta   int                `json:"sectionDelta"`
	PassageDelta   int                `json:"passageDelta"`
	ReferenceDelta int                `json:"referenceDelta"`
	WarningCount   int                `json:"warningCount"`
	TitleMismatch  bool               `json:"titleMismatch"`
	RecommendedUse string             `json:"recommendedUse"`
}

ComparisonReport summarizes differences between parser outputs for the same paper.

func CompareParsedDocuments

func CompareParsedDocuments(docs []model.ParsedDocument) ComparisonReport

CompareParsedDocuments creates a deterministic parser comparison/fallback report.

type FieldComparison

type FieldComparison struct {
	Field        string             `json:"field"`
	ParserValues []ParserFieldValue `json:"parserValues"`
}

type FieldScore

type FieldScore struct {
	ParserName string  `json:"parserName"`
	Score      float64 `json:"score"`
	Reason     string  `json:"reason"`
}

type ParserArbitrationDecision

type ParserArbitrationDecision struct {
	AcceptedParser           string `json:"acceptedParser"`
	Reason                   string `json:"reason"`
	Reviewer                 string `json:"reviewer,omitempty"`
	ReviewerApprovalRequired bool   `json:"reviewerApprovalRequired"`
}

type ParserArbitrationReport

type ParserArbitrationReport struct {
	SchemaVersion         string                             `json:"schemaVersion"`
	PaperID               string                             `json:"paperId"`
	FieldScores           map[string][]FieldScore            `json:"fieldScores"`
	Comparisons           []FieldComparison                  `json:"comparisons"`
	WarningComparison     []ParserWarnings                   `json:"warningComparison"`
	ConflictReviewQueue   []ParserConflictReviewItem         `json:"conflictReviewQueue,omitempty"`
	ReconciliationOutputs []model.ParserReconciliationOutput `json:"reconciliationOutputs"`
	Decision              ParserArbitrationDecision          `json:"decision"`
}

type ParserBenchmarkFixture

type ParserBenchmarkFixture struct {
	ParserName         string
	FixtureID          string
	CorrectFields      int
	TotalFields        int
	ActiveMaintenance  bool
	HistoricalFallback bool
}

func DefaultParserBenchmarkFixtures

func DefaultParserBenchmarkFixtures() []ParserBenchmarkFixture

type ParserCandidate

type ParserCandidate struct {
	ParserName          string `json:"parserName"`
	CoverageScore       int    `json:"coverageScore"`
	MaintenanceRisk     string `json:"maintenanceRisk"`
	DependencyFootprint string `json:"dependencyFootprint"`
	LicensePolicy       string `json:"licensePolicy"`
}

ParserCandidate scores parser output coverage and fallback risk for reviewer triage.

type ParserConflictReviewItem

type ParserConflictReviewItem struct {
	Field        string             `json:"field"`
	Reason       string             `json:"reason"`
	ParserValues []ParserFieldValue `json:"parserValues"`
}

type ParserFieldValue

type ParserFieldValue struct {
	ParserName string           `json:"parserName"`
	RawText    string           `json:"rawText"`
	Offset     model.TextOffset `json:"offset"`
}

type ParserMaintenanceRisk

type ParserMaintenanceRisk struct {
	ParserName         string  `json:"parserName"`
	FixtureCount       int     `json:"fixtureCount"`
	Accuracy           float64 `json:"accuracy"`
	ActiveMaintenance  bool    `json:"activeMaintenance"`
	HistoricalFallback bool    `json:"historicalFallback"`
	RiskLevel          string  `json:"riskLevel"`
	ReviewerGate       string  `json:"reviewerGate"`
	EnableFallback     bool    `json:"enableFallback"`
}

type ParserMaintenanceRiskReport

type ParserMaintenanceRiskReport struct {
	SchemaVersion string                  `json:"schemaVersion"`
	Parsers       []ParserMaintenanceRisk `json:"parsers"`
}

func BuildParserMaintenanceRiskReport

func BuildParserMaintenanceRiskReport(fixtures []ParserBenchmarkFixture) ParserMaintenanceRiskReport

func (ParserMaintenanceRiskReport) HasParser

func (r ParserMaintenanceRiskReport) HasParser(parser string) bool

func (ParserMaintenanceRiskReport) Parser

type ParserQualityConflict

type ParserQualityConflict struct {
	Field  string   `json:"field"`
	Values []string `json:"values"`
	Status string   `json:"status"`
}

type ParserQualityReport

type ParserQualityReport struct {
	SchemaVersion      string                  `json:"schemaVersion"`
	PaperID            string                  `json:"paperId"`
	ParserRuns         []ParserQualityRun      `json:"parserRuns"`
	MissingParsers     []string                `json:"missingParsers"`
	FieldConfidence    map[string]float64      `json:"fieldConfidence"`
	Conflicts          []ParserQualityConflict `json:"conflicts"`
	ReviewerRequired   bool                    `json:"reviewerRequired"`
	AutoAcceptedFields bool                    `json:"autoAcceptedFields"`
	RecommendedAction  string                  `json:"recommendedAction"`
}

func BuildParserQualityReport

func BuildParserQualityReport(docs []model.ParsedDocument) ParserQualityReport

func (ParserQualityReport) HasParser

func (r ParserQualityReport) HasParser(parser string) bool

type ParserQualityRun

type ParserQualityRun struct {
	ParserName       string  `json:"parserName"`
	ParserVersion    string  `json:"parserVersion"`
	TitlePresent     bool    `json:"titlePresent"`
	Sections         int     `json:"sections"`
	Passages         int     `json:"passages"`
	References       int     `json:"references"`
	ReferenceDOIs    int     `json:"referenceDois"`
	Warnings         int     `json:"warnings"`
	ParserConfidence float64 `json:"parserConfidence"`
	QualityScore     float64 `json:"qualityScore"`
}

type ParserRunSummary

type ParserRunSummary struct {
	ParserName    string `json:"parserName"`
	ParserVersion string `json:"parserVersion"`
	Title         string `json:"title"`
	Sections      int    `json:"sections"`
	Passages      int    `json:"passages"`
	References    int    `json:"references"`
	Warnings      int    `json:"warnings"`
}

ParserRunSummary records comparable parser output counts.

type ParserWarnings

type ParserWarnings struct {
	ParserName string   `json:"parserName"`
	Warnings   []string `json:"warnings"`
}

Jump to

Keyboard shortcuts

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