gnfinder 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +51 -0
- data/.rspec +3 -0
- data/.rubocop.yml +10 -0
- data/CHANGELOG.md +26 -0
- data/Gemfile +5 -0
- data/LICENSE +21 -0
- data/README.md +185 -0
- data/Rakefile +39 -0
- data/gnfinder.gemspec +31 -0
- data/lib/gnfinder.rb +10 -0
- data/lib/gnfinder/client.rb +31 -0
- data/lib/gnfinder/version.rb +10 -0
- data/lib/protob_pb.rb +59 -0
- data/lib/protob_services_pb.rb +23 -0
- metadata +157 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: eae6b30a26b68c5f5ccba1be049217ab729193362b9fc0d8beabc9e3f552b282
|
4
|
+
data.tar.gz: bf0663a41af4296984664f7568ea2d773a07dff823d9181e2cfa073a8f15cb32
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1c1cc186e55feca2b0ea65b9ebbd05faf8190ed6bbefddd51f70c605e88d180686e594a0d0e7174387087c50b5d88cc6f554e49905120b7be55a0ef74ebacd7b
|
7
|
+
data.tar.gz: 9785c062cbf89f645434d0e5e796a71d33c9406ef64d8ead8b9e9795f5525fd9a98ccfb09a124e58e3344cba50883fae7c200a3ce9de7249546b111940105b7e
|
data/.gitignore
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.byebug_history
|
4
|
+
/.config
|
5
|
+
/coverage/
|
6
|
+
/InstalledFiles
|
7
|
+
/pkg/
|
8
|
+
/spec/reports/
|
9
|
+
/spec/examples.txt
|
10
|
+
/test/tmp/
|
11
|
+
/test/version_tmp/
|
12
|
+
/tmp/
|
13
|
+
|
14
|
+
# Used by dotenv library to load environment variables.
|
15
|
+
# .env
|
16
|
+
|
17
|
+
## Specific to RubyMotion:
|
18
|
+
.dat*
|
19
|
+
.repl_history
|
20
|
+
build/
|
21
|
+
*.bridgesupport
|
22
|
+
build-iPhoneOS/
|
23
|
+
build-iPhoneSimulator/
|
24
|
+
|
25
|
+
## Specific to RubyMotion (use of CocoaPods):
|
26
|
+
#
|
27
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
28
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
29
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
30
|
+
#
|
31
|
+
# vendor/Pods/
|
32
|
+
|
33
|
+
## Documentation cache and generated files:
|
34
|
+
/.yardoc/
|
35
|
+
/_yardoc/
|
36
|
+
/doc/
|
37
|
+
/rdoc/
|
38
|
+
|
39
|
+
## Environment normalization:
|
40
|
+
/.bundle/
|
41
|
+
/vendor/bundle
|
42
|
+
/lib/bundler/man/
|
43
|
+
|
44
|
+
# for a library or gem, you might want to ignore these files since the code is
|
45
|
+
# intended to run in multiple environments; otherwise, check them in:
|
46
|
+
Gemfile.lock
|
47
|
+
.ruby-version
|
48
|
+
.ruby-gemset
|
49
|
+
|
50
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
51
|
+
.rvmrc
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## Unreleased
|
4
|
+
|
5
|
+
## [v0.1.0]
|
6
|
+
|
7
|
+
- Add [#5]: add an optional list of preferred data-sources for verification
|
8
|
+
- Add [#4]: add an option for verification of found names
|
9
|
+
- Add [#3]: enable sending options to gRPC service
|
10
|
+
- Add [#2]: send a text and receive found names
|
11
|
+
- Add [#1]: connect to gRPC server of `gnfinder` Go-lang program
|
12
|
+
|
13
|
+
## Footnotes
|
14
|
+
|
15
|
+
This document follows [changelog guidelines]
|
16
|
+
|
17
|
+
[v0.1.0]: https://github.com/GlobalNamesArchitecture/gnfinder/tree/v0.1.0
|
18
|
+
|
19
|
+
[#5]: https://github.com/GlobalNamesArchitecture/gnfinder/issues/5
|
20
|
+
[#4]: https://github.com/GlobalNamesArchitecture/gnfinder/issues/4
|
21
|
+
[#3]: https://github.com/GlobalNamesArchitecture/gnfinder/issues/3
|
22
|
+
[#2]: https://github.com/GlobalNamesArchitecture/gnfinder/issues/2
|
23
|
+
[#1]: https://github.com/GlobalNamesArchitecture/gnfinder/issues/1
|
24
|
+
|
25
|
+
|
26
|
+
[changelog guidelines]: https://github.com/olivierlacan/keep-a-changelog
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 Global Names
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
# gnfinder
|
2
|
+
|
3
|
+
Ruby gem to access functionality of [gnfinder] project written in Go. This gem
|
4
|
+
allows to perform fast and accurate scientific name finding in UTF-8 encoded
|
5
|
+
plain texts for Ruby-based projects.
|
6
|
+
|
7
|
+
|
8
|
+
## Requirements
|
9
|
+
|
10
|
+
This gem uses gRPC to access a running [gnfinder] server. You can find how
|
11
|
+
to run it in [gnfinder] README file.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
To use the gem from Ruby proect install it using Gemfile, or manually:
|
16
|
+
|
17
|
+
```bash
|
18
|
+
gem install gnfinder
|
19
|
+
```
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
The purpose of this gem is to access [gnfinder] functionality out of Ruby
|
24
|
+
applications. If you need to find names using other languages, use the
|
25
|
+
[source code][client] of this gem for reference. For other usages read
|
26
|
+
the original Go-lang [gnfinder] README file.
|
27
|
+
|
28
|
+
First you need to create a instance of a `gnfinder` client
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
import 'gnfinder'
|
32
|
+
|
33
|
+
gf = Gnfinder::Client.new
|
34
|
+
```
|
35
|
+
|
36
|
+
By default the client will try to connect to `localhost:8778`. If you
|
37
|
+
have another location for the server use:
|
38
|
+
|
39
|
+
```
|
40
|
+
import 'gnfinder'
|
41
|
+
gf = Gnfinder.new(host: 123.123.123.123, port: 8000)
|
42
|
+
```
|
43
|
+
|
44
|
+
### Finding names in a text using default settings
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
txt = File.read('utf8-text-with-names.txt')
|
48
|
+
|
49
|
+
names = gf.find_names(txt)
|
50
|
+
puts names[0].value
|
51
|
+
puts names[0].odds
|
52
|
+
```
|
53
|
+
|
54
|
+
Returned result will have the following methods for each name:
|
55
|
+
|
56
|
+
* value: mame-string cleaned up for verification.
|
57
|
+
* verbatim: name-string as it was found in the text.
|
58
|
+
* odds: Bayes' odds value. For example odds 0.1 would mean that according to
|
59
|
+
the algorithm there is 1 chance out of 10 that the name-string is
|
60
|
+
a scientific name. This field will be empty if Bayes algorithms did not run.
|
61
|
+
|
62
|
+
### Always enable Bayes search
|
63
|
+
|
64
|
+
For languages that are not supported by [gnfinder] only heuristic algorithms
|
65
|
+
are used by default, because some languages that are close to Latin (Italian,
|
66
|
+
French, Portugese) would generate too many false positives. However you can
|
67
|
+
override this default setting by running:
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
names = gf.find_names(txt, with_bayes: true)
|
71
|
+
```
|
72
|
+
|
73
|
+
### Set a language for the text
|
74
|
+
|
75
|
+
Sometimes gnfinder cannot determine the language of a text correctly. For
|
76
|
+
example it happens when the text mostly consists of scientific names, or has
|
77
|
+
large citations or list of references in a different language. It is possible
|
78
|
+
to set a language for a text by hand. For supported languages
|
79
|
+
(English and German) it will enable Bayes algorithm. For other languages
|
80
|
+
this setting will be ignored.
|
81
|
+
|
82
|
+
List of supported languages will increase with time.
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
names = gf.find_names(txt, language: 'eng')
|
86
|
+
names = gf.find_names(txt, language: 'deu')
|
87
|
+
|
88
|
+
# setting is ignored, only known by gnfinder
|
89
|
+
# 3-character notations iso-639-2 code are supported
|
90
|
+
names = gf.find_names(txt, language: 'english')
|
91
|
+
names = gf.find_names(txt, language: 'rus')
|
92
|
+
```
|
93
|
+
|
94
|
+
### Set verification option
|
95
|
+
|
96
|
+
In case if found names need to be validated against a large collection of
|
97
|
+
name-strings, use `with_verification` option. For each name algorithm will
|
98
|
+
return the following information:
|
99
|
+
|
100
|
+
* match type:
|
101
|
+
- ``NONE``: name-string is unknown
|
102
|
+
- ``EXACT``: name-string matched exactly.
|
103
|
+
- ``CANONICAL_EXACT``: canonical form of a name-string matched exactly.
|
104
|
+
- ``CANONICAL_FUZZY``: fuzzy match of a canonical string.
|
105
|
+
- ``PARTIAL_EXACT``: only part of a name matched. For examle only genus of a
|
106
|
+
species was found.
|
107
|
+
- ``PARTIAL_FUZZY``: fuzzy match of a partial result. For example canonical
|
108
|
+
form of a trinomial matched on a species level with some corrections.
|
109
|
+
* source_id: ID of a data-source of a best matched result. Data source IDs
|
110
|
+
can be compared with the [data-source list]
|
111
|
+
* curated: true if name-string was found in some data-sources that are
|
112
|
+
deemed to curated by humans.
|
113
|
+
* path: the classification path of a matched name (if available)
|
114
|
+
|
115
|
+
```ruby
|
116
|
+
names = gf.find_names(txt, with_verification: true)
|
117
|
+
```
|
118
|
+
|
119
|
+
### Set preferred data-sources list
|
120
|
+
|
121
|
+
Sometimes it is important to know if a name was found in a particular
|
122
|
+
data-source (data-sources). There is a parameter that takes IDs from the
|
123
|
+
[data-source list]. If a name-string was found in these data-sources, match
|
124
|
+
results will be returned back.
|
125
|
+
|
126
|
+
```ruby
|
127
|
+
names = gf.find_names(txt, with_verification: true, sources: [1, 4, 179])
|
128
|
+
```
|
129
|
+
### Combination of parameters.
|
130
|
+
|
131
|
+
It is possible to combine parameters. However if a parameter makes no sense in
|
132
|
+
a particular context. It is silently ignored.
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
# Runs Bayes' algorithms using English training set, runs verification and
|
136
|
+
# returns matched results for 3 data-sources if they are available.
|
137
|
+
names = gf.find_names(txt, language: eng, with_verification: true,
|
138
|
+
sources: [1, 4, 179])
|
139
|
+
|
140
|
+
# Ignores `sources:` settings, because `with_verification` is not set to `true`
|
141
|
+
names = gf.find_names(txt, language: eng, sources: [1, 4, 179])
|
142
|
+
```
|
143
|
+
|
144
|
+
## Development
|
145
|
+
|
146
|
+
This gem uses gRPC to access [gnfinder] server. gRPC in turn depends on a
|
147
|
+
protobuf library. If you need to compile Ruby programs with protobuf you need
|
148
|
+
to install [Go] language and download [gnfinder] project.
|
149
|
+
|
150
|
+
```bash
|
151
|
+
go get github.com/gnames/gnfinder
|
152
|
+
```
|
153
|
+
Then you need to run bundle from the root of the project and generate
|
154
|
+
grpc files:
|
155
|
+
|
156
|
+
```bash
|
157
|
+
bundle
|
158
|
+
rake grpc
|
159
|
+
```
|
160
|
+
|
161
|
+
If you get an error, you might need to set a ``GOPATH`` environment variable.
|
162
|
+
|
163
|
+
After starting the server with default host and port (localhost:8778) you will
|
164
|
+
be able to run tests for this Ruby client with:
|
165
|
+
|
166
|
+
```bash
|
167
|
+
bundle exec rake
|
168
|
+
```
|
169
|
+
|
170
|
+
To run rubocop test
|
171
|
+
|
172
|
+
```bash
|
173
|
+
bundle exec rake rubocop
|
174
|
+
```
|
175
|
+
|
176
|
+
To run tests without rubocop
|
177
|
+
```bash
|
178
|
+
bundle exec rspec
|
179
|
+
```
|
180
|
+
|
181
|
+
[gnfinder]: https://github.com/gnames/gnfinder
|
182
|
+
[gnfinder recent release]: https://github.com/gnames/gnfinder/releases
|
183
|
+
[Go]: https://golang.org/doc/install
|
184
|
+
[client]: https://github.com/GlobalNamesArchitecture/gnfinder/blob/master/lib/gnfinder/client.rb
|
185
|
+
[data-source list]: http://index.globalnames.org/datasource
|
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
require 'bundler/gem_tasks'
|
6
|
+
|
7
|
+
begin
|
8
|
+
Bundler.setup(:default, :development)
|
9
|
+
rescue Bundler::BundlerError => e
|
10
|
+
warn e.message
|
11
|
+
warn 'Run `bundle install` to install missing gems'
|
12
|
+
exit e.status_code
|
13
|
+
end
|
14
|
+
require 'rake'
|
15
|
+
|
16
|
+
require 'rspec/core'
|
17
|
+
require 'rspec/core/rake_task'
|
18
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
19
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
20
|
+
end
|
21
|
+
|
22
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
23
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
24
|
+
spec.rcov = true
|
25
|
+
end
|
26
|
+
|
27
|
+
task :grpc do
|
28
|
+
cmd = 'grpc_tools_ruby_protoc ' \
|
29
|
+
'-I $GOPATH/src/github.com/gnames/gnfinder/protob ' \
|
30
|
+
'--ruby_out=lib --grpc_out=lib ' \
|
31
|
+
'$GOPATH/src/github.com/gnames/gnfinder/protob/protob.proto'
|
32
|
+
puts cmd
|
33
|
+
`#{cmd}`
|
34
|
+
end
|
35
|
+
|
36
|
+
require 'rubocop/rake_task'
|
37
|
+
RuboCop::RakeTask.new
|
38
|
+
|
39
|
+
task default: %i[rubocop grpc spec]
|
data/gnfinder.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
+
|
5
|
+
require 'gnfinder/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |gem|
|
8
|
+
gem.name = 'gnfinder'
|
9
|
+
gem.homepage = 'http://github.com/GlobalNamesArchitecture/gnfinder'
|
10
|
+
gem.version = Gnfinder::VERSION
|
11
|
+
gem.authors = ['Dmitry Mozzherin']
|
12
|
+
gem.license = 'MIT'
|
13
|
+
gem.summary = 'Scientific names finder'
|
14
|
+
gem.description = %(The gem searches for scientific names in texts using
|
15
|
+
gRPC server running gnfinder app written in Go language)
|
16
|
+
gem.email = 'dmozzherin@gmail.com'
|
17
|
+
|
18
|
+
gem.files = `git ls-files -z`
|
19
|
+
.split("\x0")
|
20
|
+
.reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
|
22
|
+
gem.require_paths = ['lib']
|
23
|
+
gem.required_ruby_version = '~> 2.5'
|
24
|
+
gem.add_development_dependency 'bundler', '~> 1.16'
|
25
|
+
gem.add_development_dependency 'byebug', '~> 10.0'
|
26
|
+
gem.add_development_dependency 'grpc', '~> 1.15'
|
27
|
+
gem.add_development_dependency 'grpc-tools', '~> 1.15'
|
28
|
+
gem.add_development_dependency 'rake', '~> 12.3'
|
29
|
+
gem.add_development_dependency 'rspec', '~> 3.8'
|
30
|
+
gem.add_development_dependency 'rubocop', '~> 0.59'
|
31
|
+
end
|
data/lib/gnfinder.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'gnfinder/version'
|
4
|
+
require_relative 'protob_pb.rb'
|
5
|
+
require_relative 'protob_services_pb.rb'
|
6
|
+
require_relative 'gnfinder/client'
|
7
|
+
|
8
|
+
# Gnfinder is a namespace module for gndinfer gem.
|
9
|
+
module Gnfinder
|
10
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Gnfinder
|
4
|
+
# Gnfinder::Client connects to gnfinder server
|
5
|
+
class Client
|
6
|
+
def initialize(host = '0.0.0.0', port = '8778')
|
7
|
+
@stub = Protob::GNFinder::Stub.new("#{host}:#{port}",
|
8
|
+
:this_channel_is_insecure)
|
9
|
+
end
|
10
|
+
|
11
|
+
def ping
|
12
|
+
@stub.ping(Protob::Void.new).value
|
13
|
+
end
|
14
|
+
|
15
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
16
|
+
def find_names(text, opts = {})
|
17
|
+
raise 'Text cannot be empty' if text.to_s.strip == ''
|
18
|
+
|
19
|
+
params = { text: text }
|
20
|
+
params[:with_bayes] = true if opts[:with_bayes]
|
21
|
+
params[:language] = opts[:language] if opts[:language].to_s.strip != ''
|
22
|
+
params[:with_verification] = true if opts[:with_verification]
|
23
|
+
if opts[:sources] && !opts[:sources].empty?
|
24
|
+
params[:sources] = opts[:sources]
|
25
|
+
end
|
26
|
+
|
27
|
+
@stub.find_names(Protob::Params.new(params)).names
|
28
|
+
end
|
29
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
30
|
+
end
|
31
|
+
end
|
data/lib/protob_pb.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: protob.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "protob.Pong" do
|
8
|
+
optional :value, :string, 1
|
9
|
+
end
|
10
|
+
add_message "protob.Void" do
|
11
|
+
end
|
12
|
+
add_message "protob.Params" do
|
13
|
+
optional :text, :bytes, 1
|
14
|
+
optional :with_bayes, :bool, 3
|
15
|
+
optional :language, :string, 4
|
16
|
+
optional :with_verification, :bool, 5
|
17
|
+
repeated :sources, :int32, 6
|
18
|
+
end
|
19
|
+
add_message "protob.NameStrings" do
|
20
|
+
optional :text, :bytes, 3
|
21
|
+
repeated :names, :message, 6, "protob.NameString"
|
22
|
+
end
|
23
|
+
add_message "protob.NameString" do
|
24
|
+
optional :value, :string, 1
|
25
|
+
optional :verbatim, :string, 2
|
26
|
+
optional :odds, :float, 3
|
27
|
+
optional :path, :string, 4
|
28
|
+
optional :curated, :bool, 5
|
29
|
+
optional :edit_distance, :int32, 6
|
30
|
+
optional :edit_distance_stem, :int32, 7
|
31
|
+
optional :source_id, :int32, 8
|
32
|
+
optional :match, :enum, 9, "protob.MatchType"
|
33
|
+
repeated :sources_result, :message, 10, "protob.SourceResult"
|
34
|
+
end
|
35
|
+
add_message "protob.SourceResult" do
|
36
|
+
optional :source_id, :int32, 1
|
37
|
+
optional :title, :string, 2
|
38
|
+
optional :name_id, :string, 3
|
39
|
+
optional :taxon_id, :string, 4
|
40
|
+
end
|
41
|
+
add_enum "protob.MatchType" do
|
42
|
+
value :NONE, 0
|
43
|
+
value :EXACT, 1
|
44
|
+
value :CANONICAL_EXACT, 2
|
45
|
+
value :CANONICAL_FUZZY, 3
|
46
|
+
value :PARTIAL_EXACT, 4
|
47
|
+
value :PARTIAL_FUZZY, 5
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
module Protob
|
52
|
+
Pong = Google::Protobuf::DescriptorPool.generated_pool.lookup("protob.Pong").msgclass
|
53
|
+
Void = Google::Protobuf::DescriptorPool.generated_pool.lookup("protob.Void").msgclass
|
54
|
+
Params = Google::Protobuf::DescriptorPool.generated_pool.lookup("protob.Params").msgclass
|
55
|
+
NameStrings = Google::Protobuf::DescriptorPool.generated_pool.lookup("protob.NameStrings").msgclass
|
56
|
+
NameString = Google::Protobuf::DescriptorPool.generated_pool.lookup("protob.NameString").msgclass
|
57
|
+
SourceResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("protob.SourceResult").msgclass
|
58
|
+
MatchType = Google::Protobuf::DescriptorPool.generated_pool.lookup("protob.MatchType").enummodule
|
59
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: protob.proto for package 'protob'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'protob_pb'
|
6
|
+
|
7
|
+
module Protob
|
8
|
+
module GNFinder
|
9
|
+
class Service
|
10
|
+
|
11
|
+
include GRPC::GenericService
|
12
|
+
|
13
|
+
self.marshal_class_method = :encode
|
14
|
+
self.unmarshal_class_method = :decode
|
15
|
+
self.service_name = 'protob.GNFinder'
|
16
|
+
|
17
|
+
rpc :Ping, Void, Pong
|
18
|
+
rpc :FindNames, Params, NameStrings
|
19
|
+
end
|
20
|
+
|
21
|
+
Stub = Service.rpc_stub_class
|
22
|
+
end
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gnfinder
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dmitry Mozzherin
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-10-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: byebug
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: grpc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.15'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.15'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: grpc-tools
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.15'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.15'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '12.3'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '12.3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.8'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.8'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.59'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.59'
|
111
|
+
description: |-
|
112
|
+
The gem searches for scientific names in texts using
|
113
|
+
gRPC server running gnfinder app written in Go language
|
114
|
+
email: dmozzherin@gmail.com
|
115
|
+
executables: []
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rspec"
|
121
|
+
- ".rubocop.yml"
|
122
|
+
- CHANGELOG.md
|
123
|
+
- Gemfile
|
124
|
+
- LICENSE
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- gnfinder.gemspec
|
128
|
+
- lib/gnfinder.rb
|
129
|
+
- lib/gnfinder/client.rb
|
130
|
+
- lib/gnfinder/version.rb
|
131
|
+
- lib/protob_pb.rb
|
132
|
+
- lib/protob_services_pb.rb
|
133
|
+
homepage: http://github.com/GlobalNamesArchitecture/gnfinder
|
134
|
+
licenses:
|
135
|
+
- MIT
|
136
|
+
metadata: {}
|
137
|
+
post_install_message:
|
138
|
+
rdoc_options: []
|
139
|
+
require_paths:
|
140
|
+
- lib
|
141
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '2.5'
|
146
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
requirements: []
|
152
|
+
rubyforge_project:
|
153
|
+
rubygems_version: 2.7.6
|
154
|
+
signing_key:
|
155
|
+
specification_version: 4
|
156
|
+
summary: Scientific names finder
|
157
|
+
test_files: []
|