The problem here is that there is no good length that we can use to get all the cases right.
www.city.amakusa.kumamoto.jp for example,
The right output we should get is
Where does this go? city.amakusa.kumamoto.jp
Note that just displaying
kumamoto.jp is incorrect here because it is as good as displaying
com.au where we don’t provide any indication of where the site is going.
Assuming we determine that 7 chars is a good length, the heuristic algorithm will only produce
kumamoto.jp which is not what we want. Just to get this case right, the
length that we use will have to be
17 chars excluding the periods and we have to start considering the number of periods in the domain. If we bump the number of chars too much, we’ll end up displaying the full domain like
community.seqta.com.au which brings us back to square one.