ruby-spacy 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +58 -0
  3. data/.yardopts +2 -0
  4. data/Gemfile +18 -0
  5. data/Gemfile.lock +39 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +498 -0
  8. data/Rakefile +12 -0
  9. data/bin/console +15 -0
  10. data/bin/setup +8 -0
  11. data/examples/get_started/lexeme.rb +24 -0
  12. data/examples/get_started/linguistic_annotations.rb +32 -0
  13. data/examples/get_started/most_similar.rb +46 -0
  14. data/examples/get_started/named_entities.rb +24 -0
  15. data/examples/get_started/outputs/test_dep.svg +84 -0
  16. data/examples/get_started/outputs/test_dep_compact.svg +84 -0
  17. data/examples/get_started/outputs/test_ent.html +11 -0
  18. data/examples/get_started/pos_tags_and_dependencies.rb +31 -0
  19. data/examples/get_started/similarity.rb +13 -0
  20. data/examples/get_started/tokenization.rb +22 -0
  21. data/examples/get_started/visualizing_dependencies.rb +14 -0
  22. data/examples/get_started/visualizing_dependencies_compact.rb +12 -0
  23. data/examples/get_started/visualizing_named_entities.rb +12 -0
  24. data/examples/get_started/vocab.rb +10 -0
  25. data/examples/get_started/word_vectors.rb +24 -0
  26. data/examples/japanese/ancestors.rb +44 -0
  27. data/examples/japanese/entity_annotations_and_labels.rb +45 -0
  28. data/examples/japanese/information_extraction.rb +27 -0
  29. data/examples/japanese/lemmatization.rb +32 -0
  30. data/examples/japanese/most_similar.rb +46 -0
  31. data/examples/japanese/named_entity_recognition.rb +27 -0
  32. data/examples/japanese/navigating_parse_tree.rb +34 -0
  33. data/examples/japanese/noun_chunks.rb +23 -0
  34. data/examples/japanese/outputs/test_dep.svg +149 -0
  35. data/examples/japanese/outputs/test_ent.html +16 -0
  36. data/examples/japanese/pos_tagging.rb +34 -0
  37. data/examples/japanese/sentence_segmentation.rb +16 -0
  38. data/examples/japanese/similarity.rb +12 -0
  39. data/examples/japanese/tokenization.rb +38 -0
  40. data/examples/japanese/visualizing_dependencies.rb +13 -0
  41. data/examples/japanese/visualizing_named_entities.rb +14 -0
  42. data/examples/linguistic_features/ancestors.rb +41 -0
  43. data/examples/linguistic_features/entity_annotations_and_labels.rb +29 -0
  44. data/examples/linguistic_features/finding_a_verb_with_a_subject.rb +20 -0
  45. data/examples/linguistic_features/information_extraction.rb +36 -0
  46. data/examples/linguistic_features/iterating_children.rb +24 -0
  47. data/examples/linguistic_features/iterating_lefts_and_rights.rb +20 -0
  48. data/examples/linguistic_features/lemmatization.rb +31 -0
  49. data/examples/linguistic_features/morphology.rb +17 -0
  50. data/examples/linguistic_features/named_entity_recognition.rb +25 -0
  51. data/examples/linguistic_features/navigating_parse_tree.rb +32 -0
  52. data/examples/linguistic_features/noun_chunks.rb +27 -0
  53. data/examples/linguistic_features/outputs/test_ent.html +11 -0
  54. data/examples/linguistic_features/pos_tagging.rb +31 -0
  55. data/examples/linguistic_features/retokenize_1.rb +29 -0
  56. data/examples/linguistic_features/retokenize_2.rb +16 -0
  57. data/examples/linguistic_features/rule_based_morphology.rb +12 -0
  58. data/examples/linguistic_features/sentence_segmentation.rb +16 -0
  59. data/examples/linguistic_features/similarity.rb +14 -0
  60. data/examples/linguistic_features/similarity_between_spans.rb +23 -0
  61. data/examples/linguistic_features/special_case_tokenization_rules.rb +19 -0
  62. data/examples/linguistic_features/tokenization.rb +23 -0
  63. data/examples/rule_based_matching/creating_spans_from_matches.rb +16 -0
  64. data/examples/rule_based_matching/matcher.rb +19 -0
  65. data/lib/ruby-spacy.rb +567 -0
  66. data/lib/ruby-spacy/version.rb +6 -0
  67. data/ruby-spacy.gemspec +42 -0
  68. metadata +157 -0
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Spacy
4
+ # The version number of the module
5
+ VERSION = "0.1.0"
6
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/ruby-spacy/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "ruby-spacy"
7
+ spec.version = Spacy::VERSION
8
+ spec.authors = ["Yoichiro Hasebe"]
9
+ spec.email = ["yohasebe@gmail.com"]
10
+
11
+ spec.summary = "A wrapper module for using spaCy natural language processing library from the Ruby programming language using PyCall"
12
+ spec.description =<<EOD
13
+ ruby-spacy** is a wrapper module for using spaCy from the Ruby programming language via PyCall. This module aims to make it easy and natural for Ruby programmers to use spaCy. This module covers the areas of spaCy functionality for using many varieties of its language models, not for building ones.
14
+ EOD
15
+
16
+ spec.homepage = "https://github.com/yohasebe/ruby-spacy"
17
+ spec.license = "MIT"
18
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.8")
19
+
20
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
21
+
22
+ # spec.metadata["homepage_uri"] = spec.homepage
23
+ # spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
24
+ # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
25
+
26
+ # Specify which files should be added to the gem when it is released.
27
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
28
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
29
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
30
+ end
31
+ # spec.bindir = "exe"
32
+ # spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
34
+
35
+ # Uncomment to register a new dependency of your gem
36
+ spec.add_dependency "pycall", "~> 1.4.0"
37
+ spec.add_dependency "numpy", "~> 0.4.0"
38
+ spec.add_dependency "terminal-table", "~> 3.0.1"
39
+
40
+ # For more information and examples about making a new gem, checkout our
41
+ # guide at: https://bundler.io/guides/creating_gem.html
42
+ end
metadata ADDED
@@ -0,0 +1,157 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-spacy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Yoichiro Hasebe
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-06-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pycall
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.4.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.4.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: numpy
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.4.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.4.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: terminal-table
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.0.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.0.1
55
+ description: 'ruby-spacy** is a wrapper module for using spaCy from the Ruby programming
56
+ language via PyCall. This module aims to make it easy and natural for Ruby programmers
57
+ to use spaCy. This module covers the areas of spaCy functionality for using many
58
+ varieties of its language models, not for building ones.
59
+
60
+ '
61
+ email:
62
+ - yohasebe@gmail.com
63
+ executables: []
64
+ extensions: []
65
+ extra_rdoc_files: []
66
+ files:
67
+ - ".gitignore"
68
+ - ".yardopts"
69
+ - Gemfile
70
+ - Gemfile.lock
71
+ - LICENSE.txt
72
+ - README.md
73
+ - Rakefile
74
+ - bin/console
75
+ - bin/setup
76
+ - examples/get_started/lexeme.rb
77
+ - examples/get_started/linguistic_annotations.rb
78
+ - examples/get_started/most_similar.rb
79
+ - examples/get_started/named_entities.rb
80
+ - examples/get_started/outputs/test_dep.svg
81
+ - examples/get_started/outputs/test_dep_compact.svg
82
+ - examples/get_started/outputs/test_ent.html
83
+ - examples/get_started/pos_tags_and_dependencies.rb
84
+ - examples/get_started/similarity.rb
85
+ - examples/get_started/tokenization.rb
86
+ - examples/get_started/visualizing_dependencies.rb
87
+ - examples/get_started/visualizing_dependencies_compact.rb
88
+ - examples/get_started/visualizing_named_entities.rb
89
+ - examples/get_started/vocab.rb
90
+ - examples/get_started/word_vectors.rb
91
+ - examples/japanese/ancestors.rb
92
+ - examples/japanese/entity_annotations_and_labels.rb
93
+ - examples/japanese/information_extraction.rb
94
+ - examples/japanese/lemmatization.rb
95
+ - examples/japanese/most_similar.rb
96
+ - examples/japanese/named_entity_recognition.rb
97
+ - examples/japanese/navigating_parse_tree.rb
98
+ - examples/japanese/noun_chunks.rb
99
+ - examples/japanese/outputs/test_dep.svg
100
+ - examples/japanese/outputs/test_ent.html
101
+ - examples/japanese/pos_tagging.rb
102
+ - examples/japanese/sentence_segmentation.rb
103
+ - examples/japanese/similarity.rb
104
+ - examples/japanese/tokenization.rb
105
+ - examples/japanese/visualizing_dependencies.rb
106
+ - examples/japanese/visualizing_named_entities.rb
107
+ - examples/linguistic_features/ancestors.rb
108
+ - examples/linguistic_features/entity_annotations_and_labels.rb
109
+ - examples/linguistic_features/finding_a_verb_with_a_subject.rb
110
+ - examples/linguistic_features/information_extraction.rb
111
+ - examples/linguistic_features/iterating_children.rb
112
+ - examples/linguistic_features/iterating_lefts_and_rights.rb
113
+ - examples/linguistic_features/lemmatization.rb
114
+ - examples/linguistic_features/morphology.rb
115
+ - examples/linguistic_features/named_entity_recognition.rb
116
+ - examples/linguistic_features/navigating_parse_tree.rb
117
+ - examples/linguistic_features/noun_chunks.rb
118
+ - examples/linguistic_features/outputs/test_ent.html
119
+ - examples/linguistic_features/pos_tagging.rb
120
+ - examples/linguistic_features/retokenize_1.rb
121
+ - examples/linguistic_features/retokenize_2.rb
122
+ - examples/linguistic_features/rule_based_morphology.rb
123
+ - examples/linguistic_features/sentence_segmentation.rb
124
+ - examples/linguistic_features/similarity.rb
125
+ - examples/linguistic_features/similarity_between_spans.rb
126
+ - examples/linguistic_features/special_case_tokenization_rules.rb
127
+ - examples/linguistic_features/tokenization.rb
128
+ - examples/rule_based_matching/creating_spans_from_matches.rb
129
+ - examples/rule_based_matching/matcher.rb
130
+ - lib/ruby-spacy.rb
131
+ - lib/ruby-spacy/version.rb
132
+ - ruby-spacy.gemspec
133
+ homepage: https://github.com/yohasebe/ruby-spacy
134
+ licenses:
135
+ - MIT
136
+ metadata: {}
137
+ post_install_message:
138
+ rdoc_options: []
139
+ require_paths:
140
+ - lib
141
+ required_ruby_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: 2.5.8
146
+ required_rubygems_version: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ version: '0'
151
+ requirements: []
152
+ rubygems_version: 3.2.3
153
+ signing_key:
154
+ specification_version: 4
155
+ summary: A wrapper module for using spaCy natural language processing library from
156
+ the Ruby programming language using PyCall
157
+ test_files: []