Very nice and elegant.
You number the patterns from $2 so I assume that $1 would be the whole sentence, like \0 in a regular expression substitution?
In = I.replace(/'d\b/gi, " would");
In = I.replace(/'s\b/gi, " is");
You need to expand these two rules a bit as they are not nearly specific enough.
Apostrophe-S could denote genitive case far more often than it is a contraction of "where is" or "what is" or "<pronoun> is" etc wouldn't it? The number of cases where it is a contraction are small enough to enumerate. Likewise, apostrophe-D could equally be had or would but that's a bit more complicated to disambiguate.
Very nice and elegant.
More so, I think, thanks to you.
You number the patterns from $2 so I assume that $1 would be the whole sentence, like \0 in a regular expression substitution?
I was capturing the whole pattern, but there was really no need to, so I stopped capturing that. The patterns are now numbered from $1.
You need to expand these two rules a bit as they are not nearly specific enough.
These rules were not being reached in the plain text, so they were removed for now.
Apostrophe-S could denote genitive case far more often than it is a contraction of "where is" or "what is" or "<pronoun> is" etc wouldn't it? The number of cases where it is a contraction are small enough to enumerate. Likewise, apostrophe-D could equally be had or would but that's a bit more complicated to disambiguate.
The number of cases equals two. Only "DO NOT" and "CAN NOT" are reached in the plain text. So by handling these two cases, the genitive cases are no longer being treated as contractions, which is an improvement.
Thanks for your excellent suggestions, infurl.
°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø, ¸