papers

package
v0.0.0-...-2d7094a Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package papers indes a data model and utilities for paper details extraction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractAndAggPapersFromMsgs

func ExtractAndAggPapersFromMsgs(msgs []*gmail.Message, authors, refs bool) (*Stats, AggPapers)

ExtractAndAggPapersFromMsgs parses mail messages and creates Papers, aggregated by title.

func SortedKeys

func SortedKeys(m AggPapers) []string

SortedKeys sort the given map by key.

Types

type Abstract

type Abstract struct {
	FirstLine, Rest string
}

Abstract represents a view of the parsed abstract.

type AggPapers

type AggPapers map[string]*Paper

AggPapers represents an aggregated collection of Papers.

type Paper

type Paper struct {
	Title    string
	URL      string
	Author   string `json:",omitempty"`
	Abstract Abstract
	Refs     []Ref `json:",omitempty"`
	Freq     int
}

Paper is a map key, thus aggregation take into account all it's fields.

type Ref

type Ref struct {
	ID, Title string
}

Ref saves information about a source, referencing the paper.

type Stats

type Stats struct {
	Msgs, Titles, Errs int
}

Stats is a number of counters \w stats on paper extraction from gmail messages.

Jump to

Keyboard shortcuts

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