opener-property-tagger 3.0.3 → 3.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bd138d2aeb528bf87f83fde2af933ca3ebce6dd
4
- data.tar.gz: e0e64e5f709effb0e2671b08790ee5c5e4afb5b2
3
+ metadata.gz: 5fcbb1d26847503036b37ae52b3b16512d330de5
4
+ data.tar.gz: c6b1073d682eac907c79ac458b6ca74d395c1f3c
5
5
  SHA512:
6
- metadata.gz: 7228f65dde150175167d2ac0f72cac888f8649467be2bd983ba28d1d9738222f20aa8bec7678813f4200756529558159764b4edfa420c2d43d2aee9593f9dccc
7
- data.tar.gz: 0303f61b4f14aedc1c37c4378f3a030d602280b261f60013426ec3d9d986356dabfebbbf6f7a665f04fd9f7b65ac0901a67567416eabea5725db96699b1ee67c
6
+ metadata.gz: fed41840272ddb94c80d3848c4f21b0733419ac7c7e4c177432370e071fe10c4c30792fc36378e41438b562f7370bb3febfce3740da6f5a4263a1a2db71e5eba
7
+ data.tar.gz: 73ced1da1bcef395afb7d65e3aad0bcbf4d4225198adba6d79861420bdd9ef039de3e52cf66dee6d3e2834504cf901bc02d914a7290469074f5c9b442c8c57e7
@@ -50,7 +50,7 @@ module Opener
50
50
 
51
51
  File.foreach(aspects_file) do |line|
52
52
  lemma, pos, aspect = line.gsub("\n", "").split("\t")
53
-
53
+
54
54
  aspects_hash[lemma.to_sym] = [] unless aspects_hash[lemma.to_sym]
55
55
  aspects_hash[lemma.to_sym] << aspect
56
56
  end
@@ -98,11 +98,15 @@ module Opener
98
98
  while current_token < terms.count
99
99
  (0..max_ngram).each do |tam_ngram|
100
100
  if current_token + tam_ngram <= terms.count
101
- ngram = lemmas[current_token..current_token+tam_ngram].join(" ").downcase
101
+ ngram = lemmas[current_token..current_token+tam_ngram].join(" ").downcase
102
+
102
103
  if aspects[ngram.to_sym]
103
104
  properties = aspects[ngram.to_sym]
104
- ids = term_ids[current_token..current_token+tam_ngram]
105
- properties.uniq.reject{|p| p.gsub(" ", "").empty?}.each do |property|
105
+ ids = term_ids[current_token..current_token+tam_ngram]
106
+
107
+ properties.uniq.each do |property|
108
+ next if !property or property.strip.empty?
109
+
106
110
  uniq_aspects[property.to_sym] = [] unless uniq_aspects[property.to_sym]
107
111
  uniq_aspects[property.to_sym] << [ids,ngram]
108
112
  end
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class PropertyTagger
3
- VERSION = '3.0.3'
3
+ VERSION = '3.0.4'
4
4
  end # PropertyTagger
5
5
  end # Opener
metadata CHANGED
@@ -1,115 +1,115 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opener-property-tagger
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - development@olery.com
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-19 00:00:00.000000000 Z
11
+ date: 2015-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opener-daemons
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '2.2'
20
15
  requirement: !ruby/object:Gem::Requirement
21
16
  requirements:
22
- - - ~>
17
+ - - "~>"
23
18
  - !ruby/object:Gem::Version
24
19
  version: '2.2'
25
- prerelease: false
26
20
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: opener-webservice
21
+ prerelease: false
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - ~>
24
+ - - "~>"
32
25
  - !ruby/object:Gem::Version
33
- version: '2.1'
26
+ version: '2.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: opener-webservice
34
29
  requirement: !ruby/object:Gem::Requirement
35
30
  requirements:
36
- - - ~>
31
+ - - "~>"
37
32
  - !ruby/object:Gem::Version
38
33
  version: '2.1'
39
- prerelease: false
40
34
  type: :runtime
41
- - !ruby/object:Gem::Dependency
42
- name: opener-core
35
+ prerelease: false
43
36
  version_requirements: !ruby/object:Gem::Requirement
44
37
  requirements:
45
- - - ~>
38
+ - - "~>"
46
39
  - !ruby/object:Gem::Version
47
- version: '2.2'
40
+ version: '2.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: opener-core
48
43
  requirement: !ruby/object:Gem::Requirement
49
44
  requirements:
50
- - - ~>
45
+ - - "~>"
51
46
  - !ruby/object:Gem::Version
52
47
  version: '2.2'
53
- prerelease: false
54
48
  type: :runtime
55
- - !ruby/object:Gem::Dependency
56
- name: oga
49
+ prerelease: false
57
50
  version_requirements: !ruby/object:Gem::Requirement
58
51
  requirements:
59
- - - '>='
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
- version: '0'
54
+ version: '2.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: oga
62
57
  requirement: !ruby/object:Gem::Requirement
63
58
  requirements:
64
- - - '>='
59
+ - - ">="
65
60
  - !ruby/object:Gem::Version
66
61
  version: '0'
67
- prerelease: false
68
62
  type: :runtime
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
63
+ prerelease: false
71
64
  version_requirements: !ruby/object:Gem::Requirement
72
65
  requirements:
73
- - - ~>
66
+ - - ">="
74
67
  - !ruby/object:Gem::Version
75
- version: '3.0'
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
76
71
  requirement: !ruby/object:Gem::Requirement
77
72
  requirements:
78
- - - ~>
73
+ - - "~>"
79
74
  - !ruby/object:Gem::Version
80
75
  version: '3.0'
81
- prerelease: false
82
76
  type: :development
83
- - !ruby/object:Gem::Dependency
84
- name: cucumber
77
+ prerelease: false
85
78
  version_requirements: !ruby/object:Gem::Requirement
86
79
  requirements:
87
- - - '>='
80
+ - - "~>"
88
81
  - !ruby/object:Gem::Version
89
- version: '0'
82
+ version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: cucumber
90
85
  requirement: !ruby/object:Gem::Requirement
91
86
  requirements:
92
- - - '>='
87
+ - - ">="
93
88
  - !ruby/object:Gem::Version
94
89
  version: '0'
95
- prerelease: false
96
90
  type: :development
97
- - !ruby/object:Gem::Dependency
98
- name: rake
91
+ prerelease: false
99
92
  version_requirements: !ruby/object:Gem::Requirement
100
93
  requirements:
101
- - - '>='
94
+ - - ">="
102
95
  - !ruby/object:Gem::Version
103
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rake
104
99
  requirement: !ruby/object:Gem::Requirement
105
100
  requirements:
106
- - - '>='
101
+ - - ">="
107
102
  - !ruby/object:Gem::Version
108
103
  version: '0'
109
- prerelease: false
110
104
  type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
111
  description: Property tagger for hotels in Dutch and English.
112
- email:
112
+ email:
113
113
  executables:
114
114
  - property-tagger
115
115
  - property-tagger-daemon
@@ -117,46 +117,47 @@ executables:
117
117
  extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
+ - LICENSE.txt
121
+ - README.md
122
+ - bin/property-tagger
123
+ - bin/property-tagger-daemon
124
+ - bin/property-tagger-server
125
+ - config.ru
126
+ - exec/property-tagger.rb
120
127
  - lib/opener/property_tagger.rb
121
128
  - lib/opener/property_tagger/cli.rb
122
129
  - lib/opener/property_tagger/processor.rb
130
+ - lib/opener/property_tagger/public/markdown.css
123
131
  - lib/opener/property_tagger/server.rb
124
132
  - lib/opener/property_tagger/version.rb
125
- - lib/opener/property_tagger/public/markdown.css
126
133
  - lib/opener/property_tagger/views/index.erb
127
134
  - lib/opener/property_tagger/views/result.erb
128
- - config.ru
129
135
  - opener-property-tagger.gemspec
130
- - README.md
131
- - LICENSE.txt
132
- - exec/property-tagger.rb
133
136
  - task/lexicons.rake
134
137
  - task/test.rake
135
- - bin/property-tagger
136
- - bin/property-tagger-daemon
137
- - bin/property-tagger-server
138
138
  homepage: http://opener-project.github.com/
139
139
  licenses:
140
140
  - Apache 2.0
141
141
  metadata: {}
142
- post_install_message:
142
+ post_install_message:
143
143
  rdoc_options: []
144
144
  require_paths:
145
145
  - lib
146
146
  required_ruby_version: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - '>='
148
+ - - ">="
149
149
  - !ruby/object:Gem::Version
150
150
  version: 1.9.2
151
151
  required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  requirements:
153
- - - '>='
153
+ - - ">="
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubyforge_project:
158
- rubygems_version: 2.1.9
159
- signing_key:
157
+ rubyforge_project:
158
+ rubygems_version: 2.2.2
159
+ signing_key:
160
160
  specification_version: 4
161
161
  summary: Property tagger for hotels in Dutch and English.
162
162
  test_files: []
163
+ has_rdoc: