Identifying software and version range in a sentence I have sentences similar to the following format 


  This vulnerability happened in Firefox 1.x before 1.8, Safari
  2.x before 2.8.


Given the above sentence, I want to extract a dictionary

{Firefox: 1.0-1.8, Safari: 2.0-2.8}


Problem is how should I identify the version range with the software they belong to, using NLP techniques?
If all your sentences are in the following format(atleast that what I assume), you can parse it with regex instead.

`([A-Z][a-z]+)\s+(\d+\.\d+)(?:\s+before\s+)(\d+\.\d+)`


Using this pattern with the given sentence finds all the software and the versions in it. re.findall(pattern, sentence) will give you a list of tuples like this
[('Firefox', '2.4', '2.5'), ('Safari', '6.0', '6.8')]