title: Getting the closest string match (with possibly very different string sizes)
body: <p>I am looking for a way to find the closest string match between two strings that could eventually have a very different size.
  Let's say I have, on the one hand, a list of possible locations like:</p>
  
  <blockquote>
    <p>Yosemite National Park </p>
    
    <p>Yosemite Valley</p>
    
    <p>Yosemite National Park Lodge</p>
    
    <p>Yosemite National Park Visitor Center</p>
    
    <p>San Francisco </p>
    
    <p>Golden Gate Park San Francisco</p>
    
    <p>Paris </p>
    
    <p>New York </p>
    
    <p>Manhattan New York</p>
    
    <p>Hong Kong</p>
  </blockquote>
  
  <p>On the other hand, I have multiple sentences like: </p>
  
  <ol>
  <li>"I proposed to my wife on the 12th of November 1984, during a crazy
  downpour in the middle of Yosemite in California"</li>
  <li>"I love to walk my dog in Central Park, New York"</li>
  <li>"I love Hong Kong"</li>
  </ol>
  
  <p>Now say I would like to extract the location from these set of sentences I would I proceed to do that? I know about the <a href="https://stackoverflow.com/questions/5859561/getting-the-closest-string-match">Levenshtein distance algorithm</a> but I'm not quite sure it will work efficiently here, especially because I have many more locations and many more sentences to try and match. I guess what I would love to have is a matching score of some sort for each location so that I can pick the one with the highest score, but I have no idea on how to compute this score.</p>
  
  <p>Do you guys have any idea of how to do that? Or perhaps even an implementation or python package?</p>
  
  <p>Thanks in advance</p>