entityextractor 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/entityextractor.rb +10 -0
  2. metadata +2 -2
@@ -88,7 +88,13 @@ class EntityExtractor
88
88
  end
89
89
 
90
90
  def extract(type, minchar, ignoreterms, *terms)
91
+ flag = 0
91
92
  @input.each do |i|
93
+ if i.length == 1
94
+ i = @input
95
+ flag = 1
96
+ end
97
+
92
98
  addlist = Array.new
93
99
 
94
100
  # Generate set terms list
@@ -129,6 +135,10 @@ class EntityExtractor
129
135
  i["extract"] = addlist
130
136
  @output.push(i)
131
137
  end
138
+
139
+ if flag == 1
140
+ break
141
+ end
132
142
  end
133
143
  end
134
144
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: entityextractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-18 00:00:00.000000000 Z
12
+ date: 2014-03-23 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Extracts entities and terms from any JSON.
15
15
  email: shidash@shidash.com