Last active
October 3, 2019 01:39
-
-
Save sam-writer/a81af70fd3d983e3d6c44cc53b231759 to your computer and use it in GitHub Desktop.
fitbert-syntax
This file contains 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
# example from "Targeted Syntactic Evaluation of Language Models" | |
# https://arxiv.org/abs/1808.09031 | |
masked_string = "the author that the guard likes ***mask***" | |
options = ['laugh', 'laughs'] | |
fb.rank_with_prob(masked_string, options) | |
# >>> (['laughs', 'laugh'], [4.14195717654553e-12, 3.3748110100755013e-13]) |
This file contains 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
# example from "Assessing the Ability of LSTMs to Learn Syntax-Sensitive Dependencies" | |
# https://transacl.org/ojs/index.php/tacl/article/view/972 | |
masked_string = "accusations of abusive sockpuppetry from a trusted source ***mask*** a serious chilling effect ." | |
options = ["have", "has"] | |
fb.rank_with_prob(masked_string, options) | |
# >>> (['have', 'has'], [0.8899502754211426, 0.004103286191821098]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment