Class: Datte::Train
- Inherits:
-
Object
- Object
- Datte::Train
- Defined in:
- lib/datte/train.rb
Constant Summary collapse
- FNAME =
File.join(File.dirname(__FILE__), 'data.txt')
Instance Method Summary collapse
- #initialize(path = FNAME) ⇒ Train constructor
- #train ⇒ Object
- #x_test ⇒ Object
- #x_train ⇒ Object
- #y_test ⇒ Object
- #y_train ⇒ Object
Constructor Details
#initialize(path = FNAME) ⇒ Train
7 8 9 10 11 12 13 14 15 |
# File 'lib/datte/train.rb', line 7 def initialize(path = FNAME) train_sents = corpus_read x = corpus_read[0] p x p '===' p sent2features(x) #sent2features(corpus_read[0])[0] #sent2features(train_sents[0])[0] end |
Instance Method Details
#train ⇒ Object
41 42 |
# File 'lib/datte/train.rb', line 41 def train() end |
#x_test ⇒ Object
29 30 31 32 33 |
# File 'lib/datte/train.rb', line 29 def x_test test_sents.each do |s| return sent2features(s) end end |
#x_train ⇒ Object
17 18 19 20 21 |
# File 'lib/datte/train.rb', line 17 def x_train train_sents.each do |s| return sent2features(s) end end |
#y_test ⇒ Object
35 36 37 38 39 |
# File 'lib/datte/train.rb', line 35 def y_test test_sents.each do |s| return sent2labels(s) end end |
#y_train ⇒ Object
23 24 25 26 27 |
# File 'lib/datte/train.rb', line 23 def y_train train_sents.each do |s| return sent2labels(s) end end |