Answer the question
In order to leave comments, you need to log in
How to make an index on a given text, and how to search for this index then?
Greetings.
I ask you to help in solving the problem (problem). Point the direction, help with wise advice.
There is a task:
- there is a list of correct program names (a la template, sample, standard). Names consist of 1-6 words
- there is a list of program names that employees wrote. Employees did not write according to the template, made mistakes in the spelling of the words themselves, called the programs something else. At the same time, the essence of the name was still preserved.
For example:
the standard "Programmule plus"
an employee wrote "Program for Documents Programmule"
As you can see, there is a lot of superfluous, but the essence is preserved.
I want to create an index from the directory of reference names and somehow look for matches with a user request in this index (either there is a match, or there is no user program in the dictionary).
I suppose that we are looking for the source lines by individual words and looking for intersections of matches. Or not?
Please tell me how an index is created, and how this index is searched (algorithm).
I don't know much about the subject base, so I ask you to explain in simple words.
I will write in Java.
Thanks for the answers :)
UPD:
I want to share with you how I made the index.
Your answers and comments helped me.
Answer the question
In order to leave comments, you need to log in
Then for a quick start, I suggest you use HashMap. As keys, use the keywords from the name of the programs, for example:
Map<String, List<Software>> dictionary = new HashMap();
List<Software> list = new ArrayList<Software>();
programs.add(new Software("Программуля плюс"));
programs.add(new Software("Программуля для детей"));
programs.add(new Software("Автобусы. Программуля"));
dictionary.put("Программуля", list);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question