Skip to content

Instantly share code, notes, and snippets.

@DanKaplanSES
Created June 28, 2020 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanKaplanSES/402e9175eabe729818ce1586c6d62ba4 to your computer and use it in GitHub Desktop.
Save DanKaplanSES/402e9175eabe729818ce1586c6d62ba4 to your computer and use it in GitHub Desktop.
"contraction <text> will":
R(Text("%(text)s'll ")),
"cap contraction <text> will":
R(Function(lambda text:Text(text.capitalize() + "'ll ").execute())),
"contraction <text> have":
R(Text("%(text)s've ")),
"cap contraction <text> have":
R(Function(lambda text:Text(text.capitalize() + "'ve ").execute())),
"contraction <text> are":
R(Text("%(text)s're ")),
"cap contraction <text> are":
R(Function(lambda text:Text(text.capitalize() + "'re ").execute())),
"contraction <text> is":
R(Text("%(text)s's ")),
"cap contraction <text> is":
R(Function(lambda text:Text(text.capitalize() + "'s ").execute())),
"contraction <text> not":
R(Text("%(text)s't ")),
"cap contraction <text> not":
R(Function(lambda text:Text(text.capitalize() + "'t ").execute())),
"contraction <text> (do|would)":
R(Text("%(text)s'd ")),
"cap contraction <text> (do|would)":
R(Function(lambda text:Text(text.capitalize() + "'d ").execute())),
@DanKaplanSES
Copy link
Author

That's cool, I didn't know I could do that.

"contraction <text> <continuation>":R(Text("%(text)s%(continuation)"))

Should this have an s before the end quote?

@mpourmpoulis
Copy link

Yes it does! sr for typo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment