[Solved] How can I do my data consistent in java [closed]


It looks like you’re not trying to make it “unique” but, like the title says “consistent.”

This is difficult to do. What you need to do is parse the data, allowing for different types of identifying strings. For example, for house, it looks like you want to accept "Ho. #", "h no.", and "h#".

Once you’ve parsed the data, you can store it in any fashion you want (probably in a database). Then you are free to output it in any format you wish (like your last example).

There is nothing built-in that will do this for you magically.

The pseudo-code would look something like this:

input = input.toLower()

house_ids = ['ho. #', 'h no.', 'h#']

p = start of string
While data left in string:
    if string_at(p) is one of house_ids:
        advance p
        house_num = number_at(p)
    // street, etc.

3

solved How can I do my data consistent in java [closed]