rbbt-text 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/ner/rnorm.rb +15 -2
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 357d34614c78eef41ce0bf2a143feafa73960e71
|
4
|
+
data.tar.gz: 4a08f43322486115cbf54d40dabe5d5559652465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29c0950181322582432792dfc56a58480c35486c66ccf76e8096fd7c89ef10a2eadcfe236c91f4bbb6502944acde47338fa39c5337b9e80bc2ec22a3150747a9
|
7
|
+
data.tar.gz: 767440205f67636ca59d1897acff712e05d1b59063cf77bdfbb8a7b5893444794d89b39bf6a72724305061fc38e31ea7ec00d5d223991edc8bf67d4ad803c94b
|
data/lib/rbbt/ner/rnorm.rb
CHANGED
@@ -100,10 +100,22 @@ class Normalizer
|
|
100
100
|
|
101
101
|
|
102
102
|
def initialize(lexicon, options = {})
|
103
|
-
@synonyms =
|
103
|
+
@synonyms = case lexicon
|
104
|
+
when TSV
|
105
|
+
lexicon.unnamed = true
|
106
|
+
lexicon
|
107
|
+
when Array
|
108
|
+
tsv = TSV.setup(lexicon, :fields => [], :type => :flat, :unnamed => true, :defaul_value => [])
|
109
|
+
tsv.add_field "Term" do |k,v|
|
110
|
+
k
|
111
|
+
end
|
112
|
+
tsv
|
113
|
+
else
|
114
|
+
TSV.open(lexicon, :type => :flat, :unnamed => true)
|
115
|
+
end
|
104
116
|
|
105
117
|
@index = CueIndex.new
|
106
|
-
@index.load(
|
118
|
+
@index.load(@synonyms, options[:max_candidates])
|
107
119
|
|
108
120
|
@to_entrez = options[:to_entrez]
|
109
121
|
@tokens = Tokenizer.new(options[:file])
|
@@ -157,6 +169,7 @@ class Normalizer
|
|
157
169
|
end
|
158
170
|
|
159
171
|
def resolve(mention, text = nil, options = {})
|
172
|
+
text, options = nil, text if options.empty? and Hash === text
|
160
173
|
candidates = match(mention)
|
161
174
|
select(candidates, mention, text, options)
|
162
175
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|
@@ -178,31 +178,31 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.
|
181
|
+
rubygems_version: 2.6.6
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Text mining tools for the Ruby Bioinformatics Toolkit (rbbt)
|
185
185
|
test_files:
|
186
|
-
- test/
|
187
|
-
- test/rbbt/
|
186
|
+
- test/test_helper.rb
|
187
|
+
- test/rbbt/ner/test_abner.rb
|
188
|
+
- test/rbbt/ner/test_rnorm.rb
|
189
|
+
- test/rbbt/ner/test_patterns.rb
|
188
190
|
- test/rbbt/ner/test_regexpNER.rb
|
189
|
-
- test/rbbt/ner/
|
190
|
-
- test/rbbt/ner/segment/test_transformed.rb
|
191
|
+
- test/rbbt/ner/test_chemical_tagger.rb
|
191
192
|
- test/rbbt/ner/segment/test_segmented.rb
|
192
193
|
- test/rbbt/ner/segment/test_named_entity.rb
|
193
|
-
- test/rbbt/ner/
|
194
|
+
- test/rbbt/ner/segment/test_transformed.rb
|
195
|
+
- test/rbbt/ner/test_linnaeus.rb
|
196
|
+
- test/rbbt/ner/test_segment.rb
|
194
197
|
- test/rbbt/ner/test_oscar4.rb
|
195
198
|
- test/rbbt/ner/test_finder.rb
|
196
|
-
- test/rbbt/ner/test_patterns.rb
|
197
|
-
- test/rbbt/ner/test_rnorm.rb
|
198
|
-
- test/rbbt/ner/test_segment.rb
|
199
|
-
- test/rbbt/ner/test_ngram_prefix_dictionary.rb
|
200
199
|
- test/rbbt/ner/test_token_trieNER.rb
|
200
|
+
- test/rbbt/ner/test_banner.rb
|
201
201
|
- test/rbbt/ner/test_NER.rb
|
202
|
-
- test/rbbt/ner/
|
203
|
-
- test/rbbt/ner/test_chemical_tagger.rb
|
202
|
+
- test/rbbt/ner/test_ngram_prefix_dictionary.rb
|
204
203
|
- test/rbbt/entity/test_document.rb
|
205
|
-
- test/rbbt/bow/test_bow.rb
|
206
204
|
- test/rbbt/bow/test_dictionary.rb
|
205
|
+
- test/rbbt/bow/test_bow.rb
|
207
206
|
- test/rbbt/bow/test_misc.rb
|
208
|
-
- test/
|
207
|
+
- test/rbbt/nlp/test_nlp.rb
|
208
|
+
- test/rbbt/nlp/open_nlp/test_sentence_splitter.rb
|