Address Parser for Ruby
Is anyone aware of an address parser plugin for Ruby?
I might have to use one of the paid webservices but thought there might be a plugin.
Another thou开发者_如何学运维ght is go down the NLP route where I could build up a database over time.
Does anybody use any NLP plugin for ruby?
I want to use it to logically parse and sanitise something like this from the HTML:
<address><strong>HALL (J&E) LTD</strong><br />Head Office<br />
Questor House<br />
191 Hawley Road<br />
Dartford<br />
Kent <br />
DA1 1PU</address>
<p class="tel"><strong>Tel:</strong> +44 (0)1322 223456</p>
<p class="fax"><strong>Fax:</strong> +44 (0)1322 291458</p>
<p><strong>Website:</strong> <a target="_blank" href="http://www.jehall.co.uk">www.jehall.co.uk</a></p>
<p><strong>Email:</strong> <a href="mailto:helpline@jehall.co.uk?subject=Enquiry%20from%20Defence%20Suppliers%20Directory&cc=defenceenquiries@armedforces.co.uk">helpline@jehall.co.uk</a></p>
</div>
Any suggestions gladly appreciated.
You might have some success with Googles geocoding service. This can return structured addresses. There are ruby gems for interfacing with Googles maps API
精彩评论