Loading sqad2database.py +2 −2 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ def fill_with_sent(data, rec_part, vocabulary, w2v): for s in get_struct(data, 's'): sent = persistent.list.PersistentList() for token in s: if not struct_re.match(token): if not struct_re.match(token) and token.strip(): word, lemma, tag = token.strip().split('\t')[:3] wid = word2id(vocabulary, word, lemma, tag, w2v) sent.append(wid) Loading @@ -82,7 +82,7 @@ def fill_not_sent(data, rec_part, vocabulary, w2v): """ sent = persistent.list.PersistentList() for token in data: if not struct_re.match(token): if not struct_re.match(token) and token.strip(): word, lemma, tag = token.strip().split('\t')[:3] wid = word2id(vocabulary, word, lemma, tag, w2v) sent.append(wid) Loading Loading
sqad2database.py +2 −2 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ def fill_with_sent(data, rec_part, vocabulary, w2v): for s in get_struct(data, 's'): sent = persistent.list.PersistentList() for token in s: if not struct_re.match(token): if not struct_re.match(token) and token.strip(): word, lemma, tag = token.strip().split('\t')[:3] wid = word2id(vocabulary, word, lemma, tag, w2v) sent.append(wid) Loading @@ -82,7 +82,7 @@ def fill_not_sent(data, rec_part, vocabulary, w2v): """ sent = persistent.list.PersistentList() for token in data: if not struct_re.match(token): if not struct_re.match(token) and token.strip(): word, lemma, tag = token.strip().split('\t')[:3] wid = word2id(vocabulary, word, lemma, tag, w2v) sent.append(wid) Loading