In iOS there's a class named NSDataDetector
that, for example, let's you pass a text and it will detect if that text contains things like postal addresses, dates, links...
In my case, I'm interested in finding a similar tool for Android that let will detect an address inside a text. I've playing around with the Geocoder
, but it only works if you already know the address; otherwise, it won't serve the purpose.
An example of what I'm looking for might be:
Given:
This is just a sample text that contains a nice address: 123 W Main St, Imaginary City, IC, 12345
The tool would return just 123 W Main St, Imaginary City, IC, 12345
Keep in mind that the address might have different formats.
Thanks in advance!