diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ef43ee..5fffec9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,14 @@ ## Unreleased + +## [v1.9.1] - 2023-10-13 Fri + - Add: update modules. +- Fix [#259]: allow diacritics in any UTF-8 normalization form. +- Fix [#258]: allow authors with 2 dashes in the name. +- Fix [#256]: fix normalization where a misplacced year changes + the year of original authors. ## [v1.9.0] - 2023-10-12 Thu @@ -452,6 +459,11 @@ This document follows [changelog guidelines] +[v1.9.1]: https://github.com/gnames/gnparser/compare/v1.9.0...v1.9.1 +[v1.9.0]: https://github.com/gnames/gnparser/compare/v1.8.0...v1.9.0 +[v1.8.0]: https://github.com/gnames/gnparser/compare/v1.7.5...v1.8.0 +[v1.7.5]: https://github.com/gnames/gnparser/compare/v1.7.4...v1.7.5 +[v1.7.4]: https://github.com/gnames/gnparser/compare/v1.7.3...v1.7.4 [v1.7.3]: https://github.com/gnames/gnparser/compare/v1.7.2...v1.7.3 [v1.7.2]: https://github.com/gnames/gnparser/compare/v1.7.1...v1.7.2 [v1.7.1]: https://github.com/gnames/gnparser/compare/v1.7.0...v1.7.1 @@ -518,6 +530,27 @@ This document follows [changelog guidelines] [v0.7.0]: https://github.com/gnames/gnparser/compare/v0.6.0...v0.7.0 [v0.6.0]: https://github.com/gnames/gnparser/compare/v0.5.1...v0.6.0 [v0.5.1]: https://github.com/gnames/gnparser/tree/v0.5.1 + +[#270]: https://github.com/gnames/gnparser/issues/270 +[#269]: https://github.com/gnames/gnparser/issues/269 +[#268]: https://github.com/gnames/gnparser/issues/268 +[#267]: https://github.com/gnames/gnparser/issues/267 +[#266]: https://github.com/gnames/gnparser/issues/266 +[#265]: https://github.com/gnames/gnparser/issues/265 +[#264]: https://github.com/gnames/gnparser/issues/264 +[#263]: https://github.com/gnames/gnparser/issues/263 +[#262]: https://github.com/gnames/gnparser/issues/262 +[#261]: https://github.com/gnames/gnparser/issues/261 +[#260]: https://github.com/gnames/gnparser/issues/260 +[#259]: https://github.com/gnames/gnparser/issues/259 +[#258]: https://github.com/gnames/gnparser/issues/258 +[#257]: https://github.com/gnames/gnparser/issues/257 +[#256]: https://github.com/gnames/gnparser/issues/256 +[#255]: https://github.com/gnames/gnparser/issues/255 +[#254]: https://github.com/gnames/gnparser/issues/254 +[#253]: https://github.com/gnames/gnparser/issues/253 +[#252]: https://github.com/gnames/gnparser/issues/252 +[#251]: https://github.com/gnames/gnparser/issues/251 [#250]: https://github.com/gnames/gnparser/issues/250 [#249]: https://github.com/gnames/gnparser/issues/249 [#248]: https://github.com/gnames/gnparser/issues/248 diff --git a/ent/parsed/warning.go b/ent/parsed/warning.go index c51df93..272f07c 100644 --- a/ent/parsed/warning.go +++ b/ent/parsed/warning.go @@ -61,6 +61,7 @@ const ( WhiteSpaceTrailWarn YearCharWarn YearDotWarn + YearMisplacedWarn YearOrigMisplacedWarn YearPageWarn YearParensWarn @@ -121,6 +122,7 @@ var warningMap = map[Warning]string{ WhiteSpaceTrailWarn: "Trailing whitespace", YearCharWarn: "Year with latin character", YearDotWarn: "Year with period", + YearMisplacedWarn: "Misplaced year", YearOrigMisplacedWarn: "Misplaced basionym year", YearPageWarn: "Year with page info", YearParensWarn: "Year with parentheses", @@ -190,7 +192,8 @@ var WarningQualityMap = map[Warning]int{ WhiteSpaceTrailWarn: 2, YearCharWarn: 2, YearDotWarn: 2, - YearOrigMisplacedWarn: 2, + YearMisplacedWarn: 3, + YearOrigMisplacedWarn: 3, YearPageWarn: 2, YearParensWarn: 2, YearQuestionWarn: 2, diff --git a/ent/parser/ast.go b/ent/parser/ast.go index 727e390..5204dda 100644 --- a/ent/parser/ast.go +++ b/ent/parser/ast.go @@ -900,7 +900,6 @@ func (p *Engine) newAuthorshipNode(n *node32) *authorshipNode { case ruleOriginalAuthorshipComb: on := n.up if on.pegRule == ruleBasionymAuthorshipYearMisformed { - p.addWarn(parsed.YearOrigMisplacedWarn) on = on.up misplacedYear = true } else { @@ -910,7 +909,12 @@ func (p *Engine) newAuthorshipNode(n *node32) *authorshipNode { oa.Parens = true if misplacedYear { yr := p.newYearNode(on.next) - oa.Team1.Year = yr + if oa.Team1.Year == nil { + p.addWarn(parsed.YearOrigMisplacedWarn) + oa.Team1.Year = yr + } else { + p.addWarn(parsed.YearMisplacedWarn) + } } case ruleCombinationAuthorship: ca = p.newAuthorsGroupNode(n.up) diff --git a/go.mod b/go.mod index a5b52bb..f2a78d7 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,12 @@ module github.com/gnames/gnparser -go 1.21 +go 1.22.1 require ( github.com/dustin/go-humanize v1.0.1 github.com/gnames/gnfmt v0.4.3 - github.com/gnames/gnlib v0.30.0 - github.com/gnames/gnsys v0.2.3 + github.com/gnames/gnlib v0.33.0 + github.com/gnames/gnsys v0.3.2 github.com/gnames/gnuuid v0.1.2 github.com/gnames/organizer v0.1.1 github.com/gnames/tribool v0.1.1 @@ -14,18 +14,22 @@ require ( github.com/labstack/gommon v0.4.2 github.com/pointlander/peg v1.0.1 github.com/rendon/testcli v1.0.0 - github.com/rs/zerolog v1.31.0 + github.com/rs/zerolog v1.32.0 github.com/sfgrp/lognsq v0.1.1 github.com/spf13/cobra v1.8.0 - github.com/stretchr/testify v1.8.4 - golang.org/x/net v0.20.0 - golang.org/x/perf v0.0.0-20240108191414-4ad5199aa6b5 - golang.org/x/tools v0.16.1 + github.com/stretchr/testify v1.9.0 + golang.org/x/net v0.22.0 + golang.org/x/perf v0.0.0-20240305160248-5eefbfdba9dd + golang.org/x/text v0.14.0 + golang.org/x/tools v0.19.0 ) require ( + github.com/VividCortex/ewma v1.2.0 // indirect github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 // indirect + github.com/cheggaaa/pb/v3 v3.1.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang/snappy v0.0.3 // indirect github.com/google/uuid v1.3.1 // indirect @@ -33,19 +37,20 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/nsqio/go-nsq v1.1.0 // 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 + github.com/rivo/uniseg v0.2.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 21900ab..7f97e61 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,9 @@ +github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow= +github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= +github.com/cheggaaa/pb/v3 v3.1.5 h1:QuuUzeM2WsAqG2gMqtzaWithDJv0i+i6UlnwSCI4QLk= +github.com/cheggaaa/pb/v3 v3.1.5/go.mod h1:CrxkeghYTXi1lQBEI7jSn+3svI3cuc19haAj6jM60XI= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -7,13 +11,15 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/gnames/gnfmt v0.1.0/go.mod h1:WG9c3CoiVrGc1SDsxLk7zjmv2B4UIzI00m4K5Khc/d0= github.com/gnames/gnfmt v0.4.3 h1:TUbqT+2KsC7qdo2lUICw9vOx2tBDF80ehvBrLZaMMR0= github.com/gnames/gnfmt v0.4.3/go.mod h1:Nnxb1w0jh+8cit4gVkfSKqH2lA2chImkvSiDvAFhJes= -github.com/gnames/gnlib v0.30.0 h1:qjGyb4hffOww5Vl1QVwQbNt9oWNYMDNbyBPwnkdigP8= -github.com/gnames/gnlib v0.30.0/go.mod h1:NpOFjiabjkMM/S/C8semOLlMwH5qc/hqyIGBg5Ty+vA= -github.com/gnames/gnsys v0.2.3 h1:4Qb6jhJJMfLeyhKkela1V2R0cd/Vf8Qn6tqOWOPy/lY= -github.com/gnames/gnsys v0.2.3/go.mod h1:NTE1nKitxH/eJf8f386zqayaUHC6DnqmVODb7XXCsBk= +github.com/gnames/gnlib v0.33.0 h1:nEOvii9gR6UXD8X77VpkSltP8jkTpPb77+fkjBukn7E= +github.com/gnames/gnlib v0.33.0/go.mod h1:MbAXGtgFwWakNImNqCXrU36mNeP1mu8zDhOI6Tq38fk= +github.com/gnames/gnsys v0.3.2 h1:sEJK+o+mG3daZMVg3uLQ8Tzz1e0fIP+q4TtSr+CJ2FA= +github.com/gnames/gnsys v0.3.2/go.mod h1:xg0s4lEaoUgIgkdsSqbGXNNhvRJUsdJUYtqrHwRYOHE= github.com/gnames/gnuuid v0.1.2 h1:VAaZqggCUaLys86z6bZhDjWn60iVIgX/1vstKgCW0q8= github.com/gnames/gnuuid v0.1.2/go.mod h1:9mfrGGK+czM2uLFO6S0F+lF5gCkMhnBvKKJqpRp1om4= github.com/gnames/organizer v0.1.1 h1:3Xcz4QWS6cDBKI5sFK6ZJjpNptMJV6Fsq4N9gmC7Um8= @@ -47,6 +53,8 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -65,9 +73,11 @@ github.com/pointlander/peg v1.0.1 h1:mgA/GQE8TeS9MdkU6Xn6iEzBmQUQCNuWD7rHCK6Mjs0 github.com/pointlander/peg v1.0.1/go.mod h1:5hsGDQR2oZI4QoWz0/Kdg3VSVEC31iJw/b7WjqCBGRI= github.com/rendon/testcli v1.0.0 h1:GMGirnade1Zj88y/UINfa0sgVG0ph5dAFXr9xsx8zyE= github.com/rendon/testcli v1.0.0/go.mod h1:z5nHelI3O4dlSj2vIeFKvwn2z2Tm3hwV2M8J7SQ7XOg= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sfgrp/lognsq v0.1.1 h1:Cg6J5TO0AlDg7OpmQSdM2liY0lhQEFf3fWKSW6V9xaY= github.com/sfgrp/lognsq v0.1.1/go.mod h1:aNbHWh6z8OIKU/3jwQIYnd3hDh0f4Nmdj0kyAiHKvh0= @@ -78,31 +88,31 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/perf v0.0.0-20240108191414-4ad5199aa6b5 h1:PwYdPa+q0X1wHuyhWfR6JandSrksyjCIz7AGeeuyvqk= -golang.org/x/perf v0.0.0-20240108191414-4ad5199aa6b5/go.mod h1:kCrIb1Um4s5xKJaUgzwyqbtv/ILXfS+eNQkThFkWW6c= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/perf v0.0.0-20240305160248-5eefbfdba9dd h1:rglj7j7GZzz4GcR21t9lmupN+8ALC8L//rdzE/50vLE= +golang.org/x/perf v0.0.0-20240305160248-5eefbfdba9dd/go.mod h1:9aZNLn0je8D5R0rbpRog/X1gTnJt4uajOXR4k1WpzXk= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/testdata/test_data.md b/testdata/test_data.md index f714815..a223b20 100644 --- a/testdata/test_data.md +++ b/testdata/test_data.md @@ -3145,6 +3145,16 @@ Authorship: (Chatanay 1914) {"parsed":true,"quality":1,"verbatim":"Zophosis persis (Chatanay 1914)","normalized":"Zophosis persis (Chatanay 1914)","canonical":{"stemmed":"Zophosis pers","simple":"Zophosis persis","full":"Zophosis persis"},"cardinality":2,"authorship":{"verbatim":"(Chatanay 1914)","normalized":"(Chatanay 1914)","year":"1914","authors":["Chatanay"],"originalAuth":{"authors":["Chatanay"],"year":{"year":"1914"}}},"details":{"species":{"genus":"Zophosis","species":"persis","authorship":{"verbatim":"(Chatanay 1914)","normalized":"(Chatanay 1914)","year":"1914","authors":["Chatanay"],"originalAuth":{"authors":["Chatanay"],"year":{"year":"1914"}}}}},"words":[{"verbatim":"Zophosis","normalized":"Zophosis","wordType":"GENUS","start":0,"end":8},{"verbatim":"persis","normalized":"persis","wordType":"SPECIES","start":9,"end":15},{"verbatim":"Chatanay","normalized":"Chatanay","wordType":"AUTHOR_WORD","start":17,"end":25},{"verbatim":"1914","normalized":"1914","wordType":"YEAR","start":26,"end":30}],"id":"c6c42947-16b5-5c1c-a889-51392d82a03b","parserVersion":"test_version"} ``` +Name: Lobodon (Hombrot & Jacquinot, 1842), 2020 + +Canonical: Lobodon + +Authorship: (Hombrot & Jacquinot, 1842) + +```json +{"parsed":true,"quality":3,"qualityWarnings":[{"quality":3,"warning":"Misplaced year"}],"verbatim":"Lobodon (Hombrot \u0026 Jacquinot, 1842), 2020","normalized":"Lobodon (Hombrot \u0026 Jacquinot 1842)","canonical":{"stemmed":"Lobodon","simple":"Lobodon","full":"Lobodon"},"cardinality":1,"authorship":{"verbatim":"(Hombrot \u0026 Jacquinot, 1842), 2020","normalized":"(Hombrot \u0026 Jacquinot 1842)","year":"1842","authors":["Hombrot","Jacquinot"],"originalAuth":{"authors":["Hombrot","Jacquinot"],"year":{"year":"1842"}}},"details":{"uninomial":{"uninomial":"Lobodon","authorship":{"verbatim":"(Hombrot \u0026 Jacquinot, 1842), 2020","normalized":"(Hombrot \u0026 Jacquinot 1842)","year":"1842","authors":["Hombrot","Jacquinot"],"originalAuth":{"authors":["Hombrot","Jacquinot"],"year":{"year":"1842"}}}}},"words":[{"verbatim":"Lobodon","normalized":"Lobodon","wordType":"UNINOMIAL","start":0,"end":7},{"verbatim":"Hombrot","normalized":"Hombrot","wordType":"AUTHOR_WORD","start":9,"end":16},{"verbatim":"Jacquinot","normalized":"Jacquinot","wordType":"AUTHOR_WORD","start":19,"end":28},{"verbatim":"1842","normalized":"1842","wordType":"YEAR","start":30,"end":34}],"id":"449d5241-186f-5b1c-af6a-ec8786108fba","parserVersion":"test_version"} +``` + Name: Zophosis persis (Chatanay), 1914 Canonical: Zophosis persis @@ -3152,7 +3162,7 @@ Canonical: Zophosis persis Authorship: (Chatanay 1914) ```json -{"parsed":true,"quality":2,"qualityWarnings":[{"quality":2,"warning":"Misplaced basionym year"}],"verbatim":"Zophosis persis (Chatanay), 1914","normalized":"Zophosis persis (Chatanay 1914)","canonical":{"stemmed":"Zophosis pers","simple":"Zophosis persis","full":"Zophosis persis"},"cardinality":2,"authorship":{"verbatim":"(Chatanay), 1914","normalized":"(Chatanay 1914)","year":"1914","authors":["Chatanay"],"originalAuth":{"authors":["Chatanay"],"year":{"year":"1914"}}},"details":{"species":{"genus":"Zophosis","species":"persis","authorship":{"verbatim":"(Chatanay), 1914","normalized":"(Chatanay 1914)","year":"1914","authors":["Chatanay"],"originalAuth":{"authors":["Chatanay"],"year":{"year":"1914"}}}}},"words":[{"verbatim":"Zophosis","normalized":"Zophosis","wordType":"GENUS","start":0,"end":8},{"verbatim":"persis","normalized":"persis","wordType":"SPECIES","start":9,"end":15},{"verbatim":"Chatanay","normalized":"Chatanay","wordType":"AUTHOR_WORD","start":17,"end":25},{"verbatim":"1914","normalized":"1914","wordType":"YEAR","start":28,"end":32}],"id":"3f9b079c-510a-5c0c-9df6-f1660e1b005f","parserVersion":"test_version"} +{"parsed":true,"quality":3,"qualityWarnings":[{"quality":3,"warning":"Misplaced basionym year"}],"verbatim":"Zophosis persis (Chatanay), 1914","normalized":"Zophosis persis (Chatanay 1914)","canonical":{"stemmed":"Zophosis pers","simple":"Zophosis persis","full":"Zophosis persis"},"cardinality":2,"authorship":{"verbatim":"(Chatanay), 1914","normalized":"(Chatanay 1914)","year":"1914","authors":["Chatanay"],"originalAuth":{"authors":["Chatanay"],"year":{"year":"1914"}}},"details":{"species":{"genus":"Zophosis","species":"persis","authorship":{"verbatim":"(Chatanay), 1914","normalized":"(Chatanay 1914)","year":"1914","authors":["Chatanay"],"originalAuth":{"authors":["Chatanay"],"year":{"year":"1914"}}}}},"words":[{"verbatim":"Zophosis","normalized":"Zophosis","wordType":"GENUS","start":0,"end":8},{"verbatim":"persis","normalized":"persis","wordType":"SPECIES","start":9,"end":15},{"verbatim":"Chatanay","normalized":"Chatanay","wordType":"AUTHOR_WORD","start":17,"end":25},{"verbatim":"1914","normalized":"1914","wordType":"YEAR","start":28,"end":32}],"id":"3f9b079c-510a-5c0c-9df6-f1660e1b005f","parserVersion":"test_version"} ``` Name: Zophosis quadrilineata (Oliv. ) diff --git a/version.go b/version.go index ea6d4d9..50a095f 100644 --- a/version.go +++ b/version.go @@ -3,7 +3,7 @@ package gnparser var ( // Version is the version of the gnparser package. When Makefile is // used, the version is calculated out of Git tags. - Version = "v1.9.0" + Version = "v1.9.1" // Build is a timestamp of when Makefile was used to compile // the gnparser code. If go build was used, Build stays empty. Build string