gntagger

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: MIT Imports: 6 Imported by: 0

README

gntagger Doc Status

Takes output from gnfinder and uses it to find false positives and false negatives in the result

Ascii Cast

Documentation

Overview

gntagger is a command line application that helps to find/curate scientific names interactively. For example if there is a monograph about a genus with hundreds of scientific names, gntagger will find names automatically and then will let the user to verify found names interactively.

Asciicast: https://asciinema.org/a/wNfIt2TfZiyrAwJZKhuq5DkHV

The user interface of the program consists of 2 panels. The left panel contains detected scientific names, with a "current name" located in the middle of the screen and highlighted. The left panel contains the full text, where the "current name" is highlighted and aligned with the "current name" in the left panel.

The program is designed to move though the names quickly. Navigate to the next/previous name in the left panel using Right/Left arrow keys. All names have an empty annotation at the beginning. Pressing Right Arrow key automatically "accepts" found name if the annotation is empty. Other keys allow to annotate the "current name" differently:

* Space: rejects a name with "NotName" annotation

* 'y': re-accepts mistakenly rejected name with "Accepted" annotation

* 'u': marks a name as "Uninomial"

* 'g': marks a name as "Genus"

* 's': marks a name as "Species"

* 'd': marks a name as "Doubtful"

* Ctrl-C: saves curation and exits application

* Ctrl-S: saves curations made so far

The program autosaves results of curation. If the program crashes, or exited the user can continue curation at the last point instead of starting from scratch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGUI

func InitGUI(t *Text, n *Names)

func Keybindings

func Keybindings(g *gocui.Gui) error

func Layout

func Layout(g *gocui.Gui) error

Types

type Annotation

type Annotation struct{}

func (*Annotation) Accepted

func (a *Annotation) Accepted() string

func (*Annotation) Doubtful

func (a *Annotation) Doubtful() string

func (*Annotation) Genus

func (a *Annotation) Genus() string

func (*Annotation) NotName

func (a *Annotation) NotName() string

func (*Annotation) Species

func (a *Annotation) Species() string

func (*Annotation) Uninomial

func (a *Annotation) Uninomial() string

type Names

type Names struct {
	// Path to json file with names
	Path string
	// Data is a gnfinder output
	Data gnfinder.OutputJSON
}

func NamesFromJSON

func NamesFromJSON(path string) *Names

func (*Names) Save

func (n *Names) Save() error

func (*Names) String

func (n *Names) String() string

type Text

type Text struct {
	// Path to the text file
	Path string
	// Content of the file converted to runes
	Original []rune
	// Vertical offset of the text to align it with name
	OffsetY int
}

func PrepareText

func PrepareText(path string) *Text

func (*Text) Markup

func (t *Text) Markup(n *Names) string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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