contractions
contractions copied to clipboard
Words that shouldn't be fixed
I think that you should check if the word is inside of a quotation before fixing it.
For example:
>>> import contractions
>>> contractions.fix("you're happy now")
'you are happy now' # works fine
>>> contractions.fix('I like the letter "u"')
'I like the letter "you"' # "u" should stay "u"
I like it.. what would be other examples? This might be the only one?
I like it.. what would be other examples? This might be the only one?
Maybe something like:
When Josh got interviewed about his new song, he got asked the meaning of the sentence:
"You're never gonna believe this"
He couldn't answer at the time.
Yes that's a dumb example but I mean, quotes shouldn't change because they need to give the exact meaning the writer wanted to give
I like it.. what would be other examples? This might be the only one?
Maybe something like:
When Josh got interviewed about his new song, he got asked the meaning of the sentence: "You're never gonna believe this" He couldn't answer at the time.Yes that's a dumb example but I mean, quotes shouldn't change because they need to give the exact meaning the writer wanted to give
Difficult to know which quotes belong to each other though...
Example: "what to" "replace here"
Difficult to know which quotes belong to each other though...
Example: "what to" "replace here"
I mean, maybe by counting the number of "?
I don't know it was an idea but you could let the user do it by himself and don't change anything
Difficult to know which quotes belong to each other though... Example: "what to" "replace here"
I mean, maybe by counting the number of
"?I don't know it was an idea but you could let the user do it by himself and don't change anything
Yea I think unfortunately this is not easy to get right I feel. Also the algorithm doesn't lend itself well for it. It would be only good for fixed-length string patterns. So in that sense, "u" could work, but anything beyond that is not really possible.