3 ms·
I like the idea this article proposes, but I believe the author and our commenters glance over some backend difficulties. Yes, there are exactly 50 states each
by stinky613 15y ago
I like the idea this article proposes, but I believe the author and our commenters glance over some backend difficulties. Yes, there are exactly 50 states each with precisely one two-letter abbreviation. How would you handle, say, "Boston, masachusetts" [sic]?
- spc476 15y agoI mentioned a method above (http://news.ycombinator.com/item?id=2825015 http://news.ycombinator.com/item?id=2825015) and since entering it, I've thought a bit more about the issue. Most instances will have only two words. If it's three or more and the last word isn't two characters, then if the second to last is one of "north", "south", "west", "new", "washington" or "puerto", then the last two words form the state and the rest is the city. And you can ignore any punctuation.