title: How to detect the difference between ' as used in an abbreviation and as quotation markers
body: <p>I'm attempting to parse blocks of text and need a way to detect the difference between apostrophes in different contexts. Possession and abbreviation in one group, quotations in the other.</p>
  
  <p>e.g. </p>
  
  <blockquote>
    <p>"I'm the cars' owner" -> ["I'm", "the", "cars'", "owner"]</p>
  </blockquote>
  
  <p>but</p>
  
  <blockquote>
    <p>"He said 'hello there' " -> ["He","said"," 'hello there' "]</p>
  </blockquote>
  
  <p>Detecting whitespace on either side won't help as things like " 'ello " and " cars' " would parse as one end of a quotation, same with matching pairs of apostrophes. I'm getting the feeling that there's no way of doing it other than an outrageously complicated NLP solution and I'm just going to have to ignore any apostrophes not occurring mid-word, which would be unfortunate.</p>
  
  <p>EDIT:</p>
  
  <p>Since writing I have realised this is impossible. Any regex-ish based parser would have to parse:</p>
  
  <blockquote>
    <p>'ello there my mates' dogs</p>
  </blockquote>
  
  <p>in 2 different ways, and could only do that with understanding of the rest of the sentence. Guess I'm for the inelegant solution of ignoring the least likely case and hoping it's rare enough to only cause infrequent anomalies.</p>