citations

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: 8 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 AccessibleGraphMarkdown

func AccessibleGraphMarkdown(view AccessibleGraphView) string

func GraphReportMarkdown

func GraphReportMarkdown(report GraphReport) string

GraphReportMarkdown renders a citation graph report as Markdown.

Types

type AccessibleDomainTopicRow

type AccessibleDomainTopicRow struct {
	TopicID                string `json:"topicId"`
	Label                  string `json:"label"`
	RepresentativePapers   string `json:"representativePapers"`
	RepresentativePassages string `json:"representativePassages"`
	CitationLinks          int    `json:"citationLinks"`
}

type AccessibleEdgeRow

type AccessibleEdgeRow struct {
	Source string `json:"source"`
	Target string `json:"target"`
}

type AccessibleGraphOptions

type AccessibleGraphOptions struct {
	Filter string
}

type AccessibleGraphView

type AccessibleGraphView struct {
	SchemaVersion      string                     `json:"schemaVersion"`
	Filter             string                     `json:"filter,omitempty"`
	Summary            GraphAccessibleSummary     `json:"summary"`
	Report             GraphReport                `json:"report"`
	KeyboardNavigation []string                   `json:"keyboardNavigation"`
	NodeRows           []AccessibleNodeRow        `json:"nodeRows"`
	EdgeRows           []AccessibleEdgeRow        `json:"edgeRows"`
	DomainTopicRows    []AccessibleDomainTopicRow `json:"domainTopicRows,omitempty"`
}

func BuildAccessibleGraphView

func BuildAccessibleGraphView(graphData []byte, domain DomainMapArtifact, opts AccessibleGraphOptions) (AccessibleGraphView, error)

type AccessibleNodeRow

type AccessibleNodeRow struct {
	NodeID    string `json:"nodeId"`
	InDegree  int    `json:"inDegree"`
	OutDegree int    `json:"outDegree"`
}

type BibliographicCouplingPair

type BibliographicCouplingPair struct {
	PaperA            string
	PaperB            string
	SharedReferenceID string
}

BibliographicCouplingPair groups papers sharing a reference.

type BibliographyEdge

type BibliographyEdge struct {
	SourceID       string `json:"sourceId"`
	TargetID       string `json:"targetId"`
	ReferenceIndex int    `json:"referenceIndex"`
	Raw            string `json:"raw,omitempty"`
	Title          string `json:"title,omitempty"`
	DOI            string `json:"doi,omitempty"`
}

type BibliographyImportReport

type BibliographyImportReport struct {
	SchemaVersion     string                     `json:"schemaVersion"`
	PaperID           string                     `json:"paperId,omitempty"`
	DocumentReports   []BibliographyImportReport `json:"documentReports,omitempty"`
	EdgeCount         int                        `json:"edgeCount"`
	Edges             []BibliographyEdge         `json:"edges"`
	CitationSpanLinks []CitationSpanLink         `json:"citationSpanLinks"`
	EvidenceLinks     []EvidenceLink             `json:"evidenceLinks"`
	Graph             *Graph                     `json:"-"`
}

func ImportParsedBibliographies

func ImportParsedBibliographies(docs []parsing.ParsedDocument, items []evidence.EvidenceItem) BibliographyImportReport
type CitationGraphLink struct {
	SourceID string `json:"sourceId"`
	TargetID string `json:"targetId"`
	Relation string `json:"relation"`
}
type CitationSpanLink struct {
	CitationSpanID string             `json:"citationSpanId"`
	PassageID      string             `json:"passageId"`
	ReferenceIndex int                `json:"referenceIndex"`
	TargetID       string             `json:"targetId"`
	SpanText       string             `json:"spanText"`
	Offset         parsing.TextOffset `json:"offset"`
}

type CoCitationCluster

type CoCitationCluster struct {
	ReferenceID    string
	CitingPaperIDs []string
}

CoCitationCluster groups papers citing the same reference.

type Degree

type Degree struct {
	PaperID string `json:"paperId"`
	Count   int    `json:"count"`
}

Degree records a paper's graph degree for reporting.

type DomainMapArtifact

type DomainMapArtifact struct {
	SchemaVersion     string                 `json:"schemaVersion"`
	QuerySetChecksum  string                 `json:"querySetChecksum"`
	ModelSettings     DomainMapModelSettings `json:"modelSettings"`
	Topics            []DomainTopic          `json:"topics"`
	MergeSplitHistory []TopicHistoryEvent    `json:"mergeSplitHistory,omitempty"`
}

func BuildDomainMapArtifact

func BuildDomainMapArtifact(docs []parsing.ParsedDocument, graphData []byte, opts DomainMapOptions) (DomainMapArtifact, error)

type DomainMapModelSettings

type DomainMapModelSettings struct {
	Model             string            `json:"model"`
	EmbeddingProvider string            `json:"embeddingProvider"`
	MinTopicSize      int               `json:"minTopicSize"`
	Parameters        map[string]string `json:"parameters,omitempty"`
}

type DomainMapOptions

type DomainMapOptions struct {
	ReviewerLabels    map[string]string
	MergeSplitHistory []TopicHistoryEvent
	ModelSettings     DomainMapModelSettings
}

type DomainTopic

type DomainTopic struct {
	TopicID                string                  `json:"topicId"`
	Label                  string                  `json:"label"`
	ReviewerEditedLabel    bool                    `json:"reviewerEditedLabel"`
	RepresentativePapers   []RepresentativePaper   `json:"representativePapers"`
	RepresentativePassages []RepresentativePassage `json:"representativePassages"`
	CitationGraphLinks     []CitationGraphLink     `json:"citationGraphLinks,omitempty"`
}
type EvidenceLink struct {
	PaperID             string `json:"paperId"`
	EvidenceIndex       int    `json:"evidenceIndex"`
	EvidenceSupportRef  string `json:"evidenceSupportRef"`
	CitationSpanID      string `json:"citationSpanId"`
	CitationTargetID    string `json:"citationTargetId"`
	CitationReferenceID int    `json:"citationReferenceIndex"`
}

type Graph

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

Graph stores citation relationships as citing paper -> referenced paper.

func NewGraph

func NewGraph() *Graph

NewGraph creates an empty citation graph.

func (*Graph) AddCitation

func (g *Graph) AddCitation(citingPaperID, referencedPaperID string)

AddCitation records that citingPaperID cites referencedPaperID.

func (*Graph) Backward

func (g *Graph) Backward(paperID string) []string

Backward returns references cited by paperID.

func (*Graph) BibliographicCoupling

func (g *Graph) BibliographicCoupling() []BibliographicCouplingPair

BibliographicCoupling returns simple shared-reference pairs.

func (*Graph) CoCitationClusters

func (g *Graph) CoCitationClusters() []CoCitationCluster

CoCitationClusters returns simple same-reference clusters.

func (*Graph) ExportJSON

func (g *Graph) ExportJSON() ([]byte, error)

ExportJSON writes a stable node/edge JSON graph.

func (*Graph) Forward

func (g *Graph) Forward(paperID string) []string

Forward returns papers that cite paperID.

type GraphAccessibleSummary

type GraphAccessibleSummary struct {
	NodeCount        int `json:"nodeCount"`
	EdgeCount        int `json:"edgeCount"`
	FilteredNodes    int `json:"filteredNodes"`
	FilteredEdges    int `json:"filteredEdges"`
	DomainTopicCount int `json:"domainTopicCount"`
}

type GraphReport

type GraphReport struct {
	NodeCount     int      `json:"nodeCount"`
	EdgeCount     int      `json:"edgeCount"`
	TopCited      []Degree `json:"topCited"`
	TopCiting     []Degree `json:"topCiting"`
	CoCitations   int      `json:"coCitations"`
	CouplingPairs int      `json:"couplingPairs"`
}

GraphReport is a deterministic summary of a citation graph artifact.

func BuildGraphReport

func BuildGraphReport(data []byte) (GraphReport, error)

BuildGraphReport summarizes exported node/edge citation graph JSON.

type RepresentativePaper

type RepresentativePaper struct {
	PaperID string `json:"paperId"`
	Title   string `json:"title,omitempty"`
}

type RepresentativePassage

type RepresentativePassage struct {
	PaperID   string `json:"paperId"`
	PassageID string `json:"passageId"`
	Text      string `json:"text"`
}

type ResearchLineageViewModel

type ResearchLineageViewModel struct {
	PaperID    string
	References []string
	CitedBy    []string
}

ResearchLineageViewModel is a UI-ready citation lineage summary.

func NewResearchLineageViewModel

func NewResearchLineageViewModel(graph *Graph, paperID string) ResearchLineageViewModel

NewResearchLineageViewModel summarizes backward and forward citation links for a paper.

type TopicHistoryEvent

type TopicHistoryEvent struct {
	Action        string   `json:"action"`
	TopicIDs      []string `json:"topicIds"`
	ResultTopicID string   `json:"resultTopicId"`
	Reviewer      string   `json:"reviewer,omitempty"`
	Reason        string   `json:"reason,omitempty"`
}

Jump to

Keyboard shortcuts

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