开发者

Address Parser for Ruby

开发者 https://www.devze.com 2023-01-06 15:24 出处:网络
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.

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&amp;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&#58;helpline&#64;jehall&#46;co&#46;uk?subject=Enquiry%20from%20Defence%20Suppliers%20Directory&amp;cc=defenceenquiries&#64;armedforces&#46;co&#46;uk">helpline&#64;jehall&#46;co&#46;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

0

精彩评论

暂无评论...
验证码 换一张
取 消