Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insurance_qa_data_helper.py中build_vocab()函数不能理解 #9

Open
jozerozero opened this issue Jan 11, 2017 · 2 comments
Open

insurance_qa_data_helper.py中build_vocab()函数不能理解 #9

jozerozero opened this issue Jan 11, 2017 · 2 comments

Comments

@jozerozero
Copy link

第14行
def build_vocab():
code = int(0)
vocab = {}
vocab['UNKNOWN'] = code
code += 1
for line in open('/export/jw/cnn/insuranceQA/train'):
items = line.strip().split(' ')
for i in range(2, 3)://就是这一行,为什么不是range(2, 4)
words = items[i].split('_')
for word in words:
if not word in vocab:
vocab[word] = code
code += 1

@pcgreat
Copy link

pcgreat commented Mar 21, 2017

同问,也觉得应该是range(2, 4)而不是2到3

1 similar comment
@liuluyeah
Copy link

同问,也觉得应该是range(2, 4)而不是2到3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants