Skip to content

Commit

Permalink
update gnames to v1.0.0-RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
dimus committed May 10, 2022
1 parent 2e0c3a5 commit b407026
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 96 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [v1.0.0-RC1] - 2022-05-10 Tue

- Add: update gnmatcher, gnames to v1.0.0-RC1

## [v0.9.5] - 2022-05-02 Mon

- Add: update gnlib to v0.13.7, gnames to v0.13.3.
Expand Down Expand Up @@ -179,6 +183,9 @@

This document follows [changelog guidelines]

<!-- VERSIONS -->

[v1.0.0-rc1]: https://github.com/gnames/gnverifier/compare/v0.9.5...v1.0.0-RC1
[v0.9.5]: https://github.com/gnames/gnverifier/compare/v0.9.4...v0.9.5
[v0.9.4]: https://github.com/gnames/gnverifier/compare/v0.9.3...v0.9.4
[v0.9.3]: https://github.com/gnames/gnverifier/compare/v0.9.2...v0.9.3
Expand Down Expand Up @@ -215,6 +222,9 @@ This document follows [changelog guidelines]
[v0.2.1]: https://github.com/gnames/gnverifier/compare/v0.2.0...v0.2.1
[v0.2.0]: https://github.com/gnames/gnverifier/compare/v0.1.0...v0.2.0
[v0.1.0]: https://github.com/gnames/gnverifier/tree/v0.1.0

<!-- Issues -->

[#100]: https://github.com/gnames/gnverifier/issues/100
[#99]: https://github.com/gnames/gnverifier/issues/99
[#98]: https://github.com/gnames/gnverifier/issues/98
Expand Down
197 changes: 107 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,74 +10,76 @@ search feature.

<!-- vim-markdown-toc GFM -->

* [Citing](#citing)
* [Features](#features)
* [Installation](#installation)
* [Using Homebrew on Mac OS X, Linux, and Linux on Windows ([WSL2])](#using-homebrew-on-mac-os-x-linux-and-linux-on-windows-wsl2)
* [MS Windows](#ms-windows)
* [Linux and Mac (without Homebrew)](#linux-and-mac-without-homebrew)
* [Compile from source](#compile-from-source)
* [Usage](#usage)
* [As a web service](#as-a-web-service)
* [One name-string](#one-name-string)
* [Many name-strings in a file](#many-name-strings-in-a-file)
* [Advanced search](#advanced-search)
* [Options and flags](#options-and-flags)
* [help](#help)
* [version](#version)
* [port](#port)
* [all_matches](#all_matches)
* [capitalize](#capitalize)
* [format](#format)
* [jobs](#jobs)
* [quiet](#quiet)
* [sources](#sources)
* [web-logs](#web-logs)
* [nsqd-tcp](#nsqd-tcp)
* [Configuration file](#configuration-file)
* [Advanced Search Query Language](#advanced-search-query-language)
* [Examples of searches](#examples-of-searches)
* [Copyright](#copyright)
- [Citing](#citing)
- [Features](#features)
- [Installation](#installation)
- [Using Homebrew on Mac OS X, Linux, and Linux on Windows ([WSL2])](#using-homebrew-on-mac-os-x-linux-and-linux-on-windows-wsl2)
- [MS Windows](#ms-windows)
- [Linux and Mac (without Homebrew)](#linux-and-mac-without-homebrew)
- [Compile from source](#compile-from-source)
- [Usage](#usage)
- [As a web service](#as-a-web-service)
- [As a RESTful API](#as-a-restful-api)
- [One name-string](#one-name-string)
- [Many name-strings in a file](#many-name-strings-in-a-file)
- [Advanced search](#advanced-search)
- [Options and flags](#options-and-flags)
- [help](#help)
- [version](#version)
- [port](#port)
- [all_matches](#all_matches)
- [capitalize](#capitalize)
- [species group](#species-group)
- [format](#format)
- [jobs](#jobs)
- [quiet](#quiet)
- [sources](#sources)
- [web-logs](#web-logs)
- [nsqd-tcp](#nsqd-tcp)
- [Configuration file](#configuration-file)
- [Advanced Search Query Language](#advanced-search-query-language)
- [Examples of searches](#examples-of-searches)
- [Copyright](#copyright)

<!-- vim-markdown-toc -->

## Citing

If you want to cite GNverifier, use [DOI generated by Zenodo][Zenodo DOI]:
If you want to cite GNverifier, use [DOI generated by Zenodo][zenodo doi]:

## Features

* Small and fast app to verify scientific names against many biodiversity
- Small and fast app to verify scientific names against many biodiversity
databases. The app is a client to a [verifier API].
* It provides 6 different match levels:
* **Exact**: complete match with a canonical form or a full name-string
- It provides 6 different match levels:
- **Exact**: complete match with a canonical form or a full name-string
from a data source.
* **Fuzzy**: if exact match did not happen, it tries to match name-strings
- **Fuzzy**: if exact match did not happen, it tries to match name-strings
assuming spelling errors.
* **Partial**: strips middle or last epithets from bi- or multi-nomial names
- **Partial**: strips middle or last epithets from bi- or multi-nomial names
and tries to match what is left.
* **PartialFuzzy**: the same as Partial but assuming spelling mistakes.
* **Virus**: verification of virus names.
* **FacetedSearch**: marks [advanced-search](#advanced-search) queries.
* Taxonomic resolution. If a database contains taxonomic information, it
- **PartialFuzzy**: the same as Partial but assuming spelling mistakes.
- **Virus**: verification of virus names.
- **FacetedSearch**: marks [advanced-search](#advanced-search) queries.
- Taxonomic resolution. If a database contains taxonomic information, it
returns the currently accepted name for the provided name-string.
* Best match is returned according to the match score. Data sources with some
- Best match is returned according to the match score. Data sources with some
manual curation have priority over auto-curated and uncurated datasets. For
example [Catalogue of Life] or [WoRMS] are considered curated,
[GBIF] auto-curated, [uBio] not curated.
* Fine-tunng the match score by matching authors, years, ranks etc.
* It is possible to map any name-strings checklist to any of registered
- Fine-tunng the match score by matching authors, years, ranks etc.
- It is possible to map any name-strings checklist to any of registered
Data Sources.
* If a Data Source provides a classification for a name, it will be returned in
- If a Data Source provides a classification for a name, it will be returned in
the output.
* The app works for checking just one name-string, or multiple ones written in
- The app works for checking just one name-string, or multiple ones written in
a file.
* [Advanced search](#advanced-search) uses simple but powerful
- [Advanced search](#advanced-search) uses simple but powerful
[query language](#advanced-search-query-language)
to find abbreviated names, search by author, year etc.
* Supports feeding data via pipes of an operating system. This feature allows
- Supports feeding data via pipes of an operating system. This feature allows
to chain the program together with other tools.
* [GNverifier] includes a web-based graphical user interface identical to its
- [GNverifier] includes a web-based graphical user interface identical to its
"official" [web-service].

## Installation
Expand All @@ -87,7 +89,7 @@ If you want to cite GNverifier, use [DOI generated by Zenodo][Zenodo DOI]:
Homebrew is a popular package manager for Open Source software originally
developed for Mac OS X. Now it is also available on Linux, and can easily
be used on Windows 10, if Windows Subsystem for Linux (WSL) is
[installed][WSL install].
[installed][wsl install].

To use [GNverifier] with Homebrew:

Expand All @@ -105,21 +107,21 @@ brew install gnverifier
Download the [latest release] from GitHub, unzip.

One possible way would be to create a default folder for executables and place
``GNverifier`` there.
`GNverifier` there.

Use ``Windows+R`` keys
combination and type "``cmd``". In the appeared terminal window type:
Use `Windows+R` keys
combination and type "`cmd`". In the appeared terminal window type:

```cmd
mkdir C:\Users\your_username\bin
copy path_to\gnverifier.exe C:\Users\your_username\bin
```

[Add ``C:\Users\your_username\bin`` directory to your ``PATH``][winpath]
[Add `C:\Users\your_username\bin` directory to your `PATH`][winpath]
environment variable.

Another, simpler way, would be to use ``cd C:\Users\your_username\bin`` command
in ``cmd`` terminal window. The [GNverifier] program then will be automatically
Another, simpler way, would be to use `cd C:\Users\your_username\bin` command
in `cmd` terminal window. The [GNverifier] program then will be automatically
found by Windows operating system when you run its commands from that
directory.

Expand Down Expand Up @@ -152,9 +154,9 @@ line as an argument, sends a query with these data to a [remote GNames
server][gnames] to match the name-strigs against many different biodiversity
databases and returns results to STDOUT either in JSON, CSV or TSV format.

The app can alto take a query string like `g:M. sp:galloprovincialis
au:Olivier` to perform advanced searching, if the full scientific name is
undetermined.
The app can alto take a query string like
`g:M. sp:galloprovincialis au:Olivier` to perform advanced searching,
if the full scientific name is undetermined.

### As a web service

Expand All @@ -163,7 +165,12 @@ gnverifier -p 8080
```

After running this command, you should be able to access web-based user
interface via a browser at ``http://localhost:8080``
interface via a browser at `http://localhost:8080`

### As a RESTful API

Refer to the [RESTful API docs][gnames] to learn how to use the same
functionality via scripts.

### One name-string

Expand Down Expand Up @@ -227,12 +234,11 @@ gnverifier -p 8080
```

This command will run user-interface accessible by a browser
at ``http://localhost:8080``
at `http://localhost:8080`

#### all_matches

Sometimes data sources have more than one match to a name. To see all matches
instead of the best one per source use --all_matches flag.
To see all matches instead of the best one use --all_matches flag.

WARNING: for some names the result will be excessively large.

Expand All @@ -255,14 +261,26 @@ gnverifier -c "bubo bubo"
gnverifier --capitalize "bubo bubo"
```

#### species group

If `species_group` flag is on, a search of `Aus bus` would also search for
`Aus bus bus` and vice versa. This flag expands search to a species group of
a name if applicable. It means it involves into search botanical autonyms and
coordinated names in zoology.

```bash
gnverifier -g "Bubo bubo"
gnverifier --species_group "Bubo bubo"
```

#### format

Allows to pick a format for output. Supported formats are

* compact: one-liner JSON.
* pretty: prettified JSON with new lines and tabs for easier reading.
* tsv: returns tab-separated values representation.
* csv: (DEFAULT) returns comma-separated values representation.
- compact: one-liner JSON.
- pretty: prettified JSON with new lines and tabs for easier reading.
- tsv: returns tab-separated values representation.
- csv: (DEFAULT) returns comma-separated values representation.

```bash
# short form for compact JSON format
Expand Down Expand Up @@ -404,46 +422,45 @@ It includes following operators:
`sp:`
: specific epithet, can be abbreviated (for example `sp:galloprovincialis`,
`sp:gallop.`).
`sp:gallop.`).
`isp:`
: Infraspecific epithet, can be abbreviated (for example `isp:auspicalis`,
`isp:ausp.`).
`isp:ausp.`).
`asp:`
: Either specific, or infraspecific epithet (for example `asp:bubo`).
`au:`
: One of the authors of a name, can be abbreviated (for example `au:Linn.`,
`au:Linnaeus`).
`au:Linnaeus`).
`y:`
: Year. Can be one year, or a year range (for example `y:1888`, `y:1800-1802`,
`y:1756-`, `y:-1880`)
`ds:`
: Limit result to one or more data-sources. Note that command line `sources`
option, if given, will overwrite this setting (`ds:1,2,172`).
option, if given, will overwrite this setting (`ds:1,2,172`).
`tx:`
: Parent taxon. Limits results to names that contain a particular clade in
their classification. If `ds:` is given, uses the classification of the
first data-source in the setting. If `ds:` is not given, uses managerial
classification of the Catalogue of Life (`tx:Hemiptera`, `tx:Animalia`,
`tx:Magnoliopsida`).
their classification. If `ds:` is given, uses the classification of the
first data-source in the setting. If `ds:` is not given, uses managerial
classification of the Catalogue of Life (`tx:Hemiptera`, `tx:Animalia`,
`tx:Magnoliopsida`).
`all:`
: If true, [GNverifier] will show all results, not only the best ones.
The setting can be `true` or `false` (`all:t`, `all:f`). This setting
will become true if `sources` command line option is set to `0`.
The setting can be `true` or `false` (`all:t`, `all:f`). This setting
will become true if `sources` command line option is set to `0`.
`n:`
: A "name" setting, that allows to combine several query components together
for convenience. Note that it is not a 'real' scientific name, but a shortcut
to enter several settings at once loosely following rules of nomenclature
(`n:B. bubo Linn. 1758`). For example, in contrast with GNparser results, it
is possible to have abbreviated specific epithets or range in years: `n:Mono.
gall. Oliv. 1750-1800`.
to enter several settings at once loosely following rules of nomenclature
(`n:B. bubo Linn. 1758`). For example, in contrast with GNparser results, it
is possible to have abbreviated specific epithets or range in years: `n:Mono. gall. Oliv. 1750-1800`.
The query language is in `Beta` stage, and might change to some degree, to
improve its functionality.
Expand Down Expand Up @@ -471,25 +488,25 @@ Authors: [Dmitry Mozzherin][dimus]
Copyright © 2020-2022 Dmitry Mozzherin. See [LICENSE] for further
details.
[Catalogue of Life]: https://catalogueoflife.org/
[GBIF]: https://www.gbif.org/
[GNverifier]: https://github.com/gnames/gnverifier
[Homebrew]: https://brew.sh/
[LICENSE]: https://github.com/gnames/gnverifier/blob/master/LICENSE
[NSQ]: https://nsq.io/overview/quick_start.html
[WSL install]: https://docs.microsoft.com/en-us/windows/wsl/install-win10
[WSL2]: https://docs.microsoft.com/en-us/windows/wsl/install
[WoRMS]: https://marinespecies.org/
[Zenodo DOI]: https://zenodo.org/badge/latestdoi/297323648
[catalogue of life]: https://catalogueoflife.org/
[gbif]: https://www.gbif.org/
[gnverifier]: https://github.com/gnames/gnverifier
[homebrew]: https://brew.sh/
[license]: https://github.com/gnames/gnverifier/blob/master/LICENSE
[nsq]: https://nsq.io/overview/quick_start.html
[wsl install]: https://docs.microsoft.com/en-us/windows/wsl/install-win10
[wsl2]: https://docs.microsoft.com/en-us/windows/wsl/install
[worms]: https://marinespecies.org/
[zenodo doi]: https://zenodo.org/badge/latestdoi/297323648
[data_source_ids]: https://verifier.globalnames.org/data_sources
[default gnverifier.yaml]: https://github.com/gnames/gnverifier/blob/master/gnverifier/cmd/gnverifier.yaml
[dimus]: https://github.com/dimus
[latest release]: https://github.com/gnames/gnverifier/releases/latest
[gnames]: https://apidoc.globalnames.org/gnames-beta
[go-install]: https://golang.org/doc/install
[test directory]: https://github.com/gnames/gnverifier/tree/master/testdata
[uBio]: https://ubio.org/
[verifier API]: https://apidoc.globalnames.org/gnames-beta
[ubio]: https://ubio.org/
[verifier api]: https://apidoc.globalnames.org/gnames-beta
[web-service]: https://verifier.globalnames.org
[win-pdf]: https://github.com/gnames/gnverifier/blob/master/use-gnverifier-windows.pdf
[winpath]: https://www.computerhope.com/issues/ch000549.htm
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/dnaeon/go-vcr v1.2.0
github.com/dustin/go-humanize v1.0.0
github.com/gnames/gnfmt v0.2.0
github.com/gnames/gnlib v0.13.7
github.com/gnames/gnlib v0.14.0
github.com/gnames/gnquery v0.3.3
github.com/gnames/gnsys v0.2.2
github.com/gnames/gnuuid v0.1.1
Expand Down Expand Up @@ -40,7 +40,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nsqio/go-nsq v1.1.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3 // indirect
github.com/pointlander/jetset v1.0.1-0.20190518214125-eee7eff80bd4 // indirect
Expand All @@ -52,10 +52,10 @@ require (
github.com/subosito/gotenv v1.2.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.1 // indirect
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect
golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba // indirect
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
golang.org/x/tools v0.1.10 // indirect
Expand Down
Loading

0 comments on commit b407026

Please sign in to comment.