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

Not mentioned <start>、<end> token #86

Open
huosan0123 opened this issue Jul 15, 2019 · 0 comments
Open

Not mentioned <start>、<end> token #86

huosan0123 opened this issue Jul 15, 2019 · 0 comments

Comments

@huosan0123
Copy link

In the paper Neural Architectures for Named Entity Recognition, the author mentioned to use token at the beginning of a sequence, and a token at the end of a sequence. In your code I didn't find these two's info. According to a pytorch NER implementation,there are <start> and <end> tokens. By the way, in his implementation of viterbi decode,he take care of first step,to make sure it's <start>, but at tensorflow's code

  trellis[0] = score[0]

  for t in range(1, score.shape[0]):
    v = np.expand_dims(trellis[t - 1], 1) + transition_params
    trellis[t] = score[t] + np.max(v, 0)
    backpointers[t] = np.argmax(v, 0)

I am not sure whether start end is necessary, and whether these two code are right?

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

1 participant