abstractor 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +50 -5
- data/lib/abstractor/setup.rb +19 -15
- data/lib/abstractor/version.rb +1 -1
- data/lib/generators/abstractor/install/install_generator.rb +0 -21
- metadata +28 -16
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWNjMjEzMjY1NWFjNjAyNjZjNjU1ZmJhYmNkMWIyZTQ3ZTQ3NmYwNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGI5ZmRjOGRjZmM5NDAyYmNkMDYwZmNlMWI1MTNiYjcyZjY2NDNiOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MGM5NWQ3ZWVmYmMzNGM3YTJkN2MzMjE1MTNiMmFiM2Q5MWU3NDMzMzNlYTRh
|
10
|
+
ZTRmNDk5NjA4NGQ0MDE1ZTk3Njc2YzNmODIyYzlmM2VlMDYzZmExOTgzNTBh
|
11
|
+
MzA4N2Y1MjFkYjllMGIyM2UwODc2ODk0Mjk2NzFhYjE4NDA3NzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDNhMjg5NTYxNzI4NjhjMjFkMDQyZDhlMzMzZGRmMzA0MzRiM2YzODA0NTUy
|
14
|
+
ZmE1NGUzYTZhNTk5YjA3MTYxNzNmOTYyNGE5ZmRjZDliZjM1NGRhYmM0YmJj
|
15
|
+
MjM5OTFiOGE2ZjM2NWFhZGFkOWY4NTUyMGU3Y2M3ZTE3YWI0NTU=
|
data/README.md
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
Abstractor
|
2
2
|
====
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
* A web user interface for the presentation of the NLP-derived abstracted discrete data points for confirmation/revision.
|
3
|
+
Abstractor is a Rails engine gem for deriving discrete data points
|
4
|
+
from narrative text via natural language processing. The gem includes
|
5
|
+
a user interface to present the abstracted data points for
|
6
|
+
confirmation/revision by curator.
|
8
7
|
|
9
8
|
Reader's note: this README uses [YARD][] markup to provide links to
|
10
9
|
Abstractor's API documentation. If you aren't already, consider reading it
|
@@ -12,3 +11,49 @@ on [rubydoc.info][] so that the links will be followable.
|
|
12
11
|
|
13
12
|
[YARD]: http://yardoc.org/
|
14
13
|
[rubydoc.info]: http://rubydoc.info/github/NUBIC/abstractor/master/file/README.md
|
14
|
+
|
15
|
+
## Status
|
16
|
+
[![Gem Version](https://badge.fury.io/rb/abstractor.svg)](http://badge.fury.io/rb/abstractor)
|
17
|
+
|
18
|
+
## Requirements
|
19
|
+
|
20
|
+
Abstractor works with:
|
21
|
+
|
22
|
+
* Ruby 1.9.3, 2.0.0 and 2.1.1
|
23
|
+
* Rails 3.2 (not Rails 4.0 or later yet)
|
24
|
+
|
25
|
+
Some key dependencies are:
|
26
|
+
|
27
|
+
* Gems
|
28
|
+
* stanford-core-nlp
|
29
|
+
* paper\_trail
|
30
|
+
* Haml
|
31
|
+
* Sass
|
32
|
+
* A more exhaustive list can be found in the [gemspec][].
|
33
|
+
[gemspec]: https://github.com/NUBIC/abstractor/blob/master/abstractor.gemspec
|
34
|
+
|
35
|
+
* JavaScript
|
36
|
+
* [jQuery](http://jquery.com/)
|
37
|
+
* [jQuery UI](https://jqueryui.com/)
|
38
|
+
|
39
|
+
* Java
|
40
|
+
* [Stanford CoreNLP](http://nlp.stanford.edu/software/corenlp.shtml)
|
41
|
+
* [lingscope](http://sourceforge.net/projects/lingscope/)
|
42
|
+
|
43
|
+
## Install
|
44
|
+
|
45
|
+
Add abstractor to your Gemfile:
|
46
|
+
|
47
|
+
gem 'abstractor'
|
48
|
+
|
49
|
+
Bundle, install, and migrate:
|
50
|
+
|
51
|
+
* bundle install
|
52
|
+
* bundle exec rails g abstractor:install
|
53
|
+
* bundle exec rake db:migrate
|
54
|
+
* bundle exec rake abstractor:setup:system
|
55
|
+
|
56
|
+
Install the paper\_trail gem (if it is not already installed in your application).
|
57
|
+
|
58
|
+
* bundle exec rails g paper_trail:install
|
59
|
+
* bundle exec rake db:migrate
|
data/lib/abstractor/setup.rb
CHANGED
@@ -1,24 +1,28 @@
|
|
1
1
|
module Abstractor
|
2
2
|
module Setup
|
3
3
|
def self.system
|
4
|
-
|
5
|
-
Abstractor::AbstractorObjectType.
|
6
|
-
Abstractor::AbstractorObjectType.
|
7
|
-
Abstractor::AbstractorObjectType.
|
8
|
-
Abstractor::AbstractorObjectType.
|
4
|
+
puts 'Setting up AbstractorObjectType'
|
5
|
+
Abstractor::AbstractorObjectType.find_or_create_by_value('list')
|
6
|
+
Abstractor::AbstractorObjectType.find_or_create_by_value('number')
|
7
|
+
Abstractor::AbstractorObjectType.find_or_create_by_value('boolean')
|
8
|
+
Abstractor::AbstractorObjectType.find_or_create_by_value('string')
|
9
|
+
Abstractor::AbstractorObjectType.find_or_create_by_value('radio button list')
|
9
10
|
|
10
|
-
|
11
|
-
Abstractor::AbstractorRuleType.
|
12
|
-
Abstractor::AbstractorRuleType.
|
13
|
-
Abstractor::AbstractorRuleType.
|
14
|
-
Abstractor::AbstractorRuleType.
|
11
|
+
puts 'Setting up AbstractorRuleType'
|
12
|
+
Abstractor::AbstractorRuleType.find_or_create_by_name_and_description(name: 'name/value', description:'search for value associated with name')
|
13
|
+
Abstractor::AbstractorRuleType.find_or_create_by_name_and_description(name:'name', description: 'search for name match')
|
14
|
+
Abstractor::AbstractorRuleType.find_or_create_by_name_and_description(name:'value', description: 'search for value match')
|
15
|
+
Abstractor::AbstractorRuleType.find_or_create_by_name_and_description(name: 'unknown', description: 'do not try to abstract, always assign "unknown"')
|
16
|
+
Abstractor::AbstractorRuleType.find_or_create_by_name_and_description(name:'custom', description: 'use whatever from_method returns as a value')
|
15
17
|
|
16
|
-
|
17
|
-
Abstractor::AbstractorSuggestionStatus.
|
18
|
-
Abstractor::AbstractorSuggestionStatus.
|
18
|
+
puts 'Setting up AbstractorSuggestionStatus'
|
19
|
+
Abstractor::AbstractorSuggestionStatus.find_or_create_by_name('Needs review')
|
20
|
+
Abstractor::AbstractorSuggestionStatus.find_or_create_by_name('Accepted')
|
21
|
+
Abstractor::AbstractorSuggestionStatus.find_or_create_by_name('Rejected')
|
19
22
|
|
20
|
-
|
21
|
-
Abstractor::AbstractorRelationType.
|
23
|
+
puts 'Setting up AbstractorRelationType'
|
24
|
+
Abstractor::AbstractorRelationType.find_or_create_by_name('member_of')
|
25
|
+
Abstractor::AbstractorRelationType.find_or_create_by_name('preceded_by')
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
data/lib/abstractor/version.rb
CHANGED
@@ -3,7 +3,6 @@ require "rails/generators"
|
|
3
3
|
|
4
4
|
module Abstractor
|
5
5
|
class InstallGenerator < Rails::Generators::Base
|
6
|
-
class_option "no-migrate", :type => :boolean
|
7
6
|
class_option "customize-all", :type => :boolean
|
8
7
|
class_option "customize-controllers", :type => :boolean
|
9
8
|
class_option "customize-models", :type => :boolean
|
@@ -46,20 +45,6 @@ module Abstractor
|
|
46
45
|
:after => "ActionController::Base\n")
|
47
46
|
end
|
48
47
|
|
49
|
-
def run_migrations
|
50
|
-
unless options["no-migrate"]
|
51
|
-
puts "Running rake db:migrate"
|
52
|
-
`rake db:migrate`
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def seed_database_with_setup_system
|
57
|
-
unless options["no-migrate"]
|
58
|
-
puts "Running rake abstractor:setup:system"
|
59
|
-
`rake abstractor:setup:system`
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
48
|
def mount_engine
|
64
49
|
puts "Mounting Abstractor::Engine at \"/\" in config/routes.rb..."
|
65
50
|
insert_into_file("#{Rails.root}/config/routes.rb", :after => /routes.draw.do\n/) do
|
@@ -67,12 +52,6 @@ module Abstractor
|
|
67
52
|
end
|
68
53
|
end
|
69
54
|
|
70
|
-
# def sample_abstraction_schema
|
71
|
-
# path = "#{Rails.root}/lib"
|
72
|
-
# empty_directory "#{path}/setup"
|
73
|
-
# copy_file "abstraction_schema.yml", "#{path}/setup/abstraction_schema.yml"
|
74
|
-
# end
|
75
|
-
|
76
55
|
def make_customizable
|
77
56
|
if options["customize-all"] || options["customize-controllers"]
|
78
57
|
path = "#{Rails.root}/app/controllers/abstractor"
|
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.9
|
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-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -330,7 +330,7 @@ dependencies:
|
|
330
330
|
requirements:
|
331
331
|
- - ~>
|
332
332
|
- !ruby/object:Gem::Version
|
333
|
-
version:
|
333
|
+
version: 1.0.0
|
334
334
|
- - ! '>='
|
335
335
|
- !ruby/object:Gem::Version
|
336
336
|
version: 1.0.0
|
@@ -340,7 +340,7 @@ dependencies:
|
|
340
340
|
requirements:
|
341
341
|
- - ~>
|
342
342
|
- !ruby/object:Gem::Version
|
343
|
-
version:
|
343
|
+
version: 1.0.0
|
344
344
|
- - ! '>='
|
345
345
|
- !ruby/object:Gem::Version
|
346
346
|
version: 1.0.0
|
@@ -348,35 +348,47 @@ dependencies:
|
|
348
348
|
name: yard
|
349
349
|
requirement: !ruby/object:Gem::Requirement
|
350
350
|
requirements:
|
351
|
+
- - ~>
|
352
|
+
- !ruby/object:Gem::Version
|
353
|
+
version: 0.8.7.3
|
351
354
|
- - ! '>='
|
352
355
|
- !ruby/object:Gem::Version
|
353
|
-
version:
|
356
|
+
version: 0.8.7.3
|
354
357
|
type: :development
|
355
358
|
prerelease: false
|
356
359
|
version_requirements: !ruby/object:Gem::Requirement
|
357
360
|
requirements:
|
361
|
+
- - ~>
|
362
|
+
- !ruby/object:Gem::Version
|
363
|
+
version: 0.8.7.3
|
358
364
|
- - ! '>='
|
359
365
|
- !ruby/object:Gem::Version
|
360
|
-
version:
|
366
|
+
version: 0.8.7.3
|
361
367
|
- !ruby/object:Gem::Dependency
|
362
368
|
name: redcarpet
|
363
369
|
requirement: !ruby/object:Gem::Requirement
|
364
370
|
requirements:
|
371
|
+
- - ~>
|
372
|
+
- !ruby/object:Gem::Version
|
373
|
+
version: 3.1.1
|
365
374
|
- - ! '>='
|
366
375
|
- !ruby/object:Gem::Version
|
367
|
-
version:
|
376
|
+
version: 3.1.1
|
368
377
|
type: :development
|
369
378
|
prerelease: false
|
370
379
|
version_requirements: !ruby/object:Gem::Requirement
|
371
380
|
requirements:
|
381
|
+
- - ~>
|
382
|
+
- !ruby/object:Gem::Version
|
383
|
+
version: 3.1.1
|
372
384
|
- - ! '>='
|
373
385
|
- !ruby/object:Gem::Version
|
374
|
-
version:
|
375
|
-
description: Rails engine
|
376
|
-
|
377
|
-
|
386
|
+
version: 3.1.1
|
387
|
+
description: A Rails engine gem for deriving discrete data points from narrative text
|
388
|
+
via natural language processing. The gem includes a user interface to present the
|
389
|
+
abstracted data points for confirmation/revision by curator.
|
378
390
|
email:
|
379
|
-
-
|
391
|
+
- michaeljamesgurley@gmail.com, y.bushmanova@gmail.com
|
380
392
|
executables: []
|
381
393
|
extensions: []
|
382
394
|
extra_rdoc_files: []
|
@@ -737,7 +749,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
737
749
|
requirements:
|
738
750
|
- - ! '>='
|
739
751
|
- !ruby/object:Gem::Version
|
740
|
-
version:
|
752
|
+
version: 1.9.3
|
741
753
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
742
754
|
requirements:
|
743
755
|
- - ! '>='
|
@@ -748,7 +760,7 @@ rubyforge_project:
|
|
748
760
|
rubygems_version: 2.2.2
|
749
761
|
signing_key:
|
750
762
|
specification_version: 4
|
751
|
-
summary: Rails engine
|
752
|
-
|
753
|
-
|
763
|
+
summary: A Rails engine gem for deriving discrete data points from narrative text
|
764
|
+
via natural language processing. The gem includes a user interface to present the
|
765
|
+
abstracted data points for confirmation/revision by curator.
|
754
766
|
test_files: []
|