Skip to content

Commit

Permalink
add names with Candidatus (close #162)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimus committed Mar 22, 2021
1 parent 8a68eae commit 7e99f38
Show file tree
Hide file tree
Showing 19 changed files with 4,452 additions and 4,523 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## [v1.1.0]

- Add [#163]: support bacterial `Candidatus` names.
- Add [#162]: show PEG AST tree for debugging.
- Add [#161]: add automatic tools dependency.
Expand Down Expand Up @@ -257,6 +259,7 @@ array of names instead of a stream.

This document follows [changelog guidelines]

[v1.1.0]: https://github.com/gnames/gnparser/compare/v1.0.14...v1.1.0
[v1.0.14]: https://github.com/gnames/gnparser/compare/v1.0.13...v1.0.14
[v1.0.13]: https://github.com/gnames/gnparser/compare/v1.0.12...v1.0.13
[v1.0.12]: https://github.com/gnames/gnparser/compare/v1.0.11...v1.0.12
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ gnparser -h
* [Usage](#usage)
* [Command Line](#command-line)
* [Pipes](#pipes)
* [R language package](#r-language-package)
* [Usage as a REST API Interface](#usage-as-a-rest-api-interface)
* [Use as a Docker image](#use-as-a-docker-image)
* [Use as a library in Go](#use-as-a-library-in-go)
Expand Down Expand Up @@ -459,6 +460,11 @@ end
Note that you have to use `--stream -s` flag for this approach to work.
### R language package
For R language it is possible to use [`rgnparser` package][rgnparser]. It
implements mentioned above `pipes` method.
### Usage as a REST API Interface
Web-based user interface and API are invoked by ``--port`` or
Expand Down Expand Up @@ -625,3 +631,4 @@ Released under [MIT license]
[wsl]: https://docs.microsoft.com/en-us/windows/wsl/
[gnparser paper]: https://doi.org/10.1186/s12859-017-1663-3
[PHP pipes]: https://gist.github.com/marcobrt/72b2a3d1b0649c1bf738c9fc88f74ec0
[rgnparser]: https://github.com/ropensci/rgnparser
11 changes: 11 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ type Config struct {
// In such cases the `ParserVersion` field is presented as `test_version`
// instead of displaying the actual version of `gnparser`.
IsTest bool

// Debug sets a "debug" state for parsing. The debug state forces output
// format to showing parsed ast tree.
Debug bool
}

// NewConfig generates a new Config object. It can take an arbitrary number
Expand Down Expand Up @@ -143,3 +147,10 @@ func OptIsTest(b bool) Option {
cfg.IsTest = b
}
}

// OptDebugParse returns parsed tree
func OptDebug(b bool) Option {
return func(cfg *Config) {
cfg.Debug = b
}
}
4 changes: 2 additions & 2 deletions ent/internal/preprocess/annot.rl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func AnnotationRL(data []byte) bool {
action setMatch {match = true}
action setPos {pos = append(pos,p)}

notes = ("species"i | "group"i | "authors"i);
notes = ("species"i | "group"i | "clade"i | "authors"i);
tc1 = ("sensu"i | "auct"i | "sec"i | "near" | "str") "."?;
tc2 = "("? "s." space? ([sl] | "str" | "lat") ".";
tc3 = "pro parte"i | "p."i space? "p."i;
Expand All @@ -36,4 +36,4 @@ func AnnotationRL(data []byte) bool {
}%%

return match
}
}
Loading

0 comments on commit 7e99f38

Please sign in to comment.