File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 24
24
NUM_LAYERS = 1
25
25
26
26
# format of files: each line is "word1/tag2 word2/tag2 ..."
27
- train_file = '/ data/tags/train.txt'
28
- test_file = '/ data/tags/dev.txt'
27
+ train_file = 'data/tags/train.txt'
28
+ test_file = 'data/tags/dev.txt'
29
29
30
30
class Vocab :
31
31
def __init__ (self , w2i = None ):
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ def read_dataset(filename):
21
21
yield ([w2i [x ] for x in words .split (" " )], t2i [tag ])
22
22
23
23
# Read in the data
24
- train = list (read_dataset ("../ data/classes/train.txt" ))
24
+ train = list (read_dataset ("data/classes/train.txt" ))
25
25
w2i = defaultdict (lambda : UNK , w2i )
26
- dev = list (read_dataset ("../ data/classes/test.txt" ))
26
+ dev = list (read_dataset ("data/classes/test.txt" ))
27
27
nwords = len (w2i )
28
28
ntags = len (t2i )
29
29
EPOCHS = 100
Original file line number Diff line number Diff line change 25
25
NUM_LAYERS = 1
26
26
27
27
# format of files: each line is "word1/tag2 word2/tag2 ..."
28
- train_file = '/ data/text/train.txt'
29
- test_file = '/ data/text/dev.txt'
28
+ train_file = 'data/text/train.txt'
29
+ test_file = 'data/text/dev.txt'
30
30
w2i = defaultdict (count (0 ).next )
31
31
eos = '<s>'
32
32
You can’t perform that action at this time.
0 commit comments