analyzer

package
v0.0.0-...-f7f3e2b Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const UniquenessThresholdValue = 70

Variables

This section is empty.

Functions

This section is empty.

Types

type CompareResult

type CompareResult struct {
	TargetPaperId  string
	SimilarityRate float64
}

type Dispatcher

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

func NewDispatcher

func NewDispatcher() *Dispatcher

func (*Dispatcher) GetProcessedTaskCnt

func (d *Dispatcher) GetProcessedTaskCnt() int

func (*Dispatcher) GetTaskQueue

func (d *Dispatcher) GetTaskQueue() chan DocTask

func (*Dispatcher) Run

func (d *Dispatcher) Run()

func (*Dispatcher) Stop

func (d *Dispatcher) Stop()

type DocTask

type DocTask struct {
	TargetPaperShingles common.PaperShingles
	Comparator          DocsComparator
}

type DocsComparator

type DocsComparator interface {
	CompareToDoc(targetPaperShingles common.PaperShingles)
}

type PaperPdfProcessor

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

func NewPaperPdfProcessor

func NewPaperPdfProcessor(newPaper common.UploadedPaper, database storage.DatabaseInterface, dispatcher *Dispatcher) *PaperPdfProcessor

func (*PaperPdfProcessor) CompareToDoc

func (p *PaperPdfProcessor) CompareToDoc(targetPaperShingles common.PaperShingles)

func (*PaperPdfProcessor) MakeShingles

func (p *PaperPdfProcessor) MakeShingles() error

func (*PaperPdfProcessor) PerformAnalyze

func (p *PaperPdfProcessor) PerformAnalyze() (common.AnalysisResult, error)

func (*PaperPdfProcessor) PrepareFile

func (p *PaperPdfProcessor) PrepareFile() error

type Worker

type Worker struct {
	Id int

	WorkerPool  chan chan DocTask
	TaskChannel chan DocTask
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(workerId int, workerPool chan chan DocTask) *Worker

func (*Worker) GetTotallyProcessedTasks

func (w *Worker) GetTotallyProcessedTasks() int

func (*Worker) Start

func (w *Worker) Start()

func (*Worker) Stop

func (w *Worker) Stop()

Jump to

Keyboard shortcuts

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