abstractor 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjVjNmU3ZjYxNTAyMDgxZjk0YjY4N2IyNmFjOWIzYWU4YjhlMDZmZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWUzY2FjYTQzNTU3MGM0Yzk1YzQ0NjQ0MmU2YWJjMTM4NWNjNzk1Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTg0ZGJjNWJhMjZlZDc0NGFjM2M1MWYyOTc0YjNiMjNhZDE1ODA2YTkwYmE1
|
10
|
+
NTU0Y2Y1MWEzNTQ1MWJiYzcyNDUwMTZkNjZkMmE1MjIzMjE0NWNmZDE2NGFm
|
11
|
+
YmFjZDhhZTI1NzQ0MTEyNWM3YzRhYzYwNjFmNjIyMjNkZTFlMDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzgxYTkyZDY3NTU4MjE5YmY2ZGY2MTFhZjI4YTk0MmIzOWUxZDY2Mzk3YjQ4
|
14
|
+
NDhkYjZhYjdlZTMyMWI2NWQxODk3YmMxNDhmMDQ0YTYwNDIwYjMxY2ZkODFk
|
15
|
+
MzU1MTA0NzdiNWQ4NGUwOTJiMWY1OTI2NjA2NmVmOTFjZTVlOTg=
|
@@ -43,9 +43,9 @@
|
|
43
43
|
- abstractable_from_column = about.send(from_method)
|
44
44
|
- unless abstractable_from_column.nil?
|
45
45
|
- if abstractor_suggestion_source.match_value
|
46
|
-
= Abstractor::UserInterface.highlight(abstractable_from_column.clone, abstractor_suggestion_source.match_value.strip)
|
46
|
+
= Abstractor::UserInterface.highlight(simple_format(abstractable_from_column.clone), abstractor_suggestion_source.match_value.strip)
|
47
47
|
- else
|
48
|
-
= abstractable_from_column.clone
|
48
|
+
= simple_format(abstractable_from_column.clone)
|
49
49
|
.column-3
|
50
50
|
= f.select :abstractor_suggestion_status_id, Abstractor::AbstractorSuggestionStatus.all.sort_by(&:name).map{|s| [s.name, s.id]}
|
51
51
|
- else
|
data/lib/abstractor/parser.rb
CHANGED
@@ -3,9 +3,17 @@ module Abstractor
|
|
3
3
|
class Parser
|
4
4
|
attr_accessor :sentences, :abstractor_text
|
5
5
|
|
6
|
-
def initialize(abstractor_text)
|
6
|
+
def initialize(abstractor_text, options = {})
|
7
|
+
options = { new_line_is_sentence_break: true }.merge(options)
|
7
8
|
@abstractor_text = abstractor_text
|
8
9
|
|
10
|
+
puts options[:new_line_is_sentence_break]
|
11
|
+
if options[:new_line_is_sentence_break]
|
12
|
+
StanfordCoreNLP.custom_properties['ssplit.newlineIsSentenceBreak'] = 'always'
|
13
|
+
else
|
14
|
+
StanfordCoreNLP.custom_properties['ssplit.newlineIsSentenceBreak'] = 'two'
|
15
|
+
end
|
16
|
+
|
9
17
|
pipeline = StanfordCoreNLP.load(:tokenize, :ssplit)
|
10
18
|
t = StanfordCoreNLP::Annotation.new(@abstractor_text)
|
11
19
|
pipeline.annotate(t)
|
@@ -73,4 +81,4 @@ module Abstractor
|
|
73
81
|
end
|
74
82
|
end
|
75
83
|
end
|
76
|
-
end
|
84
|
+
end
|
data/lib/abstractor/version.rb
CHANGED
@@ -56,8 +56,8 @@ module Abstractor
|
|
56
56
|
def setup_stanford_core_nlp
|
57
57
|
unless options["install-stanford-core-nlp"]
|
58
58
|
puts "Running rake abstractor:setup:stanford_core_nlp"
|
59
|
-
puts 'Please be patient...this could take a while'
|
60
|
-
`rake abstractor:setup:stanford_core_nlp`
|
59
|
+
puts 'Please be patient...this could take a while.'
|
60
|
+
# `rake abstractor:setup:stanford_core_nlp`
|
61
61
|
|
62
62
|
insert_into_file("#{Rails.root}/config/environments/development.rb", :after => /::Application.configure do\n/) do
|
63
63
|
' StanfordCoreNLP.use :english
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abstractor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Gurley, Yulia Bushmanova
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -148,16 +148,22 @@ dependencies:
|
|
148
148
|
name: rubyzip
|
149
149
|
requirement: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
+
- - ~>
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: 1.1.0
|
151
154
|
- - ! '>='
|
152
155
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
156
|
+
version: 1.1.0
|
154
157
|
type: :runtime
|
155
158
|
prerelease: false
|
156
159
|
version_requirements: !ruby/object:Gem::Requirement
|
157
160
|
requirements:
|
161
|
+
- - ~>
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: 1.1.0
|
158
164
|
- - ! '>='
|
159
165
|
- !ruby/object:Gem::Version
|
160
|
-
version:
|
166
|
+
version: 1.1.0
|
161
167
|
- !ruby/object:Gem::Dependency
|
162
168
|
name: sqlite3
|
163
169
|
requirement: !ruby/object:Gem::Requirement
|