torchtext 0.1.1 → 0.2.0

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
  SHA256:
3
- metadata.gz: d5c6ff21a492fa03ce88ed7b823d29310e67b3d0c86825ccd2b6092f330bdbc1
4
- data.tar.gz: 7df74bb05bb110ae37e9d962adc9dc020088203ed1b9e920fe3c4e9421f8e714
3
+ metadata.gz: f9f88b060fcb69a0df1258c1a5399b2518ca9b1c95cd3c3f999bd81f9df0cc41
4
+ data.tar.gz: 3b04fab3f8e9a3ef86e3c46aa64f2ba98a8d85c3dd42889cb728d0c7f39e7be2
5
5
  SHA512:
6
- metadata.gz: e2d0da285afa14f72380ad688ce63c316a6e46e0cceb7f332b15d298253ffe05d9f6bf9244aa630bc20719a794fe6b316ac7861788e7775ac104e7741dcf167b
7
- data.tar.gz: '0202023381da0eefdd6c27587ad1798e9052a8798d3d32f8e71b19d7a5303aaf5a01f16c77d486d1d8249ef89cf4009f146855f6e3d1f4cf2c7e3fc9e66ce830'
6
+ metadata.gz: 4669a0ce275ec3ef0a1331c39835b81a8cff582c62012adc62ae8c59ea941befb53cf232198922bcbdd9795930e970a4e8970a851d66969531c75dd83e7bd40c
7
+ data.tar.gz: a3bb8659e334540849a011a0f526136650a4bd88d5a9da6b48f6e3d14dd889b08fe730c3e517837e6989e06c9a8b515d8a34958e3df267a80eedd465a239123f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.2.0 (2023-01-30)
2
+
3
+ - Added `Functional` module
4
+ - Dropped support for Ruby < 2.7
5
+
1
6
  ## 0.1.1 (2021-07-15)
2
7
 
3
8
  - Added `NN` module
data/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  BSD 3-Clause License
2
2
 
3
3
  Copyright (c) James Bradbury and Soumith Chintala 2016,
4
- Copyright (c) Andrew Kane 2020,
4
+ Copyright (c) Andrew Kane 2020-2023,
5
5
  All rights reserved.
6
6
 
7
7
  Redistribution and use in source and binary forms, with or without
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # TorchText
1
+ # TorchText Ruby
2
2
 
3
3
  :fire: Data loaders and abstractions for text and NLP - for Ruby
4
4
 
5
- [![Build Status](https://github.com/ankane/torchtext/workflows/build/badge.svg?branch=master)](https://github.com/ankane/torchtext/actions)
5
+ [![Build Status](https://github.com/ankane/torchtext-ruby/workflows/build/badge.svg?branch=master)](https://github.com/ankane/torchtext-ruby/actions)
6
6
 
7
7
  ## Installation
8
8
 
9
9
  Add this line to your application’s Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'torchtext'
12
+ gem "torchtext"
13
13
  ```
14
14
 
15
15
  ## Getting Started
@@ -74,22 +74,22 @@ If you’re a dataset owner and wish to update any details or remove it from thi
74
74
 
75
75
  ## History
76
76
 
77
- View the [changelog](https://github.com/ankane/torchtext/blob/master/CHANGELOG.md)
77
+ View the [changelog](https://github.com/ankane/torchtext-ruby/blob/master/CHANGELOG.md)
78
78
 
79
79
  ## Contributing
80
80
 
81
81
  Everyone is encouraged to help improve this project. Here are a few ways you can help:
82
82
 
83
- - [Report bugs](https://github.com/ankane/torchtext/issues)
84
- - Fix bugs and [submit pull requests](https://github.com/ankane/torchtext/pulls)
83
+ - [Report bugs](https://github.com/ankane/torchtext-ruby/issues)
84
+ - Fix bugs and [submit pull requests](https://github.com/ankane/torchtext-ruby/pulls)
85
85
  - Write, clarify, or fix documentation
86
86
  - Suggest or add new features
87
87
 
88
88
  To get started with development:
89
89
 
90
90
  ```sh
91
- git clone https://github.com/ankane/torchtext.git
92
- cd torchtext
91
+ git clone https://github.com/ankane/torchtext-ruby.git
92
+ cd torchtext-ruby
93
93
  bundle install
94
94
  bundle exec rake test
95
95
  ```
@@ -0,0 +1,11 @@
1
+ module TorchText
2
+ module Data
3
+ module Functional
4
+ class << self
5
+ def simple_space_split(iterator)
6
+ iterator.map(&:split)
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module TorchText
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/torchtext.rb CHANGED
@@ -8,15 +8,16 @@ require "rubygems/package"
8
8
  require "set"
9
9
 
10
10
  # modules
11
- require "torchtext/data/utils"
12
- require "torchtext/data/metrics"
13
- require "torchtext/datasets/text_classification"
14
- require "torchtext/datasets/text_classification_dataset"
15
- require "torchtext/nn/in_proj_container"
16
- require "torchtext/nn/multihead_attention_container"
17
- require "torchtext/nn/scaled_dot_product"
18
- require "torchtext/vocab"
19
- require "torchtext/version"
11
+ require_relative "torchtext/data/functional"
12
+ require_relative "torchtext/data/metrics"
13
+ require_relative "torchtext/data/utils"
14
+ require_relative "torchtext/datasets/text_classification"
15
+ require_relative "torchtext/datasets/text_classification_dataset"
16
+ require_relative "torchtext/nn/in_proj_container"
17
+ require_relative "torchtext/nn/multihead_attention_container"
18
+ require_relative "torchtext/nn/scaled_dot_product"
19
+ require_relative "torchtext/vocab"
20
+ require_relative "torchtext/version"
20
21
 
21
22
  module TorchText
22
23
  class Error < StandardError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torchtext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-15 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: torch-rb
@@ -16,58 +16,16 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.2
19
+ version: 0.11.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.2
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '5'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '5'
26
+ version: 0.11.1
69
27
  description:
70
- email: andrew@chartkick.com
28
+ email: andrew@ankane.org
71
29
  executables: []
72
30
  extensions: []
73
31
  extra_rdoc_files: []
@@ -76,6 +34,7 @@ files:
76
34
  - LICENSE.txt
77
35
  - README.md
78
36
  - lib/torchtext.rb
37
+ - lib/torchtext/data/functional.rb
79
38
  - lib/torchtext/data/metrics.rb
80
39
  - lib/torchtext/data/utils.rb
81
40
  - lib/torchtext/datasets/text_classification.rb
@@ -85,7 +44,7 @@ files:
85
44
  - lib/torchtext/nn/scaled_dot_product.rb
86
45
  - lib/torchtext/version.rb
87
46
  - lib/torchtext/vocab.rb
88
- homepage: https://github.com/ankane/torchtext
47
+ homepage: https://github.com/ankane/torchtext-ruby
89
48
  licenses:
90
49
  - BSD-3-Clause
91
50
  metadata: {}
@@ -97,14 +56,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
56
  requirements:
98
57
  - - ">="
99
58
  - !ruby/object:Gem::Version
100
- version: '2.5'
59
+ version: '2.7'
101
60
  required_rubygems_version: !ruby/object:Gem::Requirement
102
61
  requirements:
103
62
  - - ">="
104
63
  - !ruby/object:Gem::Version
105
64
  version: '0'
106
65
  requirements: []
107
- rubygems_version: 3.2.22
66
+ rubygems_version: 3.4.1
108
67
  signing_key:
109
68
  specification_version: 4
110
69
  summary: Data loaders and abstractions for text and NLP