Created
July 30, 2019 15:00
-
-
Save billpku/2f0a136f79aa4631832369d8d0d38205 to your computer and use it in GitHub Desktop.
NER with BERT in Action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Real token mask is 1,pad token(meaning a place holder for the empty space) is 0 | |
| attention_masks = [[int(i>0) for i in ii] for ii in input_ids] | |
| attention_masks[0]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment