Class: Datte::Train

Inherits:
Object
  • Object
show all
Defined in:
lib/datte/train.rb

Constant Summary collapse

FNAME =
File.join(File.dirname(__FILE__), 'data.txt')

Instance Method Summary collapse

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

#trainObject



41
42
# File 'lib/datte/train.rb', line 41

def train()
end

#x_testObject



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_trainObject



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_testObject



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_trainObject



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