twitter/twitter-text-java — pull request #31 by keitaf (2012-03-28 22:57:15+00:00)
Title: Modify extractHashtagsWithIndices() to not extract a hashtag if it's a part of URL.

The current extractHashtagsWithIndices() extracts hashtags which are part of URL. E.g., it extracts "#hashtag" from "http://twitter.com/#hashtag".

This fixes the bug by adding an option in extractHashtagsWithIndices() called checkUrlOverlap. If it's set as true (which is a default value), extractHashtagsWithIndices() checks if any extracted hashtag overlaps with any URL in the text, and removes overlapping one.