Splitting a character string into keyword strings
View Patent ↗Systems and methods of the present invention provide for the word splitting and reliability score for an entered character string. A list of keywords may be extracted from the character string entered into a user interface on a client. These keywords may be compared to potential matches in a dictionary database and a reliability score for word splits and keywords strings may be compiled and displayed to the user. The client may also display the reliability score using a plurality of logical groupings within a reliability score process.
1. A method, comprising the steps of:
a) receiving, by a server computer communicatively coupled to a network, a character string from a client computer communicatively coupled to the network;
b) creating, by the server computer, a cached list of micro-dictionary keywords, further comprising the steps of:
i) generating, by the server computer, a substring length variable with a value of 3;
ii) generating, by the server computer, from the character string, at least one substring equal in length to the substring length variable;
iii) determining, by the server computer, whether the at least one substring is found in an electronic dictionary database;
iv) responsive to a determination that the at least one substring is found in the electronic dictionary database, adding, by the server computer, at least one micro-dictionary keyword, comprising the at least one substring, to the cached list
v) incrementing, by the server computer, the substring length variable by 1; and
vi) repeating, by the server computer, steps b) ii)-b) v) until the substring length variable equals a length of the character string;
c) for each at least one micro-dictionary keyword in the cached list, in descending order by number of characters:
i) storing, by the server computer, the micro-dictionary keyword in a temporary list
ii) identifying, by the server computer, within the character string, at least one contiguous string that is not the micro-dictionary keyword; and
iii) for each at least one contiguous string, and while characters remain in the character string:
1) determining, by the server computer, whether the contiguous string, or a smaller contiguous string within the contiguous string, comprises an additional micro-dictionary keyword; and
2) responsive to a determination that the contiguous string or the smaller contiguous string comprises the additional micro-dictionary keyword, storing, by the server computer, in the temporary list, the contiguous string or the smaller contiguous string;
d) calculating, by the server computer, a reliability score for a plurality of keyword strings comprising the temporary list for each at least one micro-dictionary keyword in the cached list; and
e) transmitting, by the server computer, the reliability score for each of the plurality of keyword strings to the client computer.
2. The method of claim 1 wherein, if a first plurality score for a first keyword string is the same as a second plurality score for a second keyword string, an n-gram score using an algorithm and a dataset determines relative usage of keywords together with common language.
3. The method of claim 2 wherein n=the number of words.
4. The method of claim 2 wherein the algorithm for the n-gram score is used as a secondary sort after the reliability score for each of the plurality of keyword strings is determined to determine the most reliability of a final keyword split.
5. The method of claim 1 further comprising the step of establishing, by the server computer, an inner loop through each of micro-dictionary keyword in the cached list, the inner loop comprising the steps of:
i) looping, by the server computer, through each micro-dictionary keyword, in descending order by number of characters; and
ii) for each micro-dictionary keyword in the inner loop, determining, by the server computer, if the micro-dictionary keyword is found in each of a plurality of smaller contiguous strings.
6. The method of claim 5 further comprising the step of, if the micro-dictionary keyword not found in the plurality of smaller contiguous strings:
i) determining, by the server computer, that the at least one contiguous string is not found in the cached list; and
ii) determining, by the server computer, if the next micro-dictionary keyword is found in the plurality of smaller contiguous strings.
7. The method of claim 6 further comprising the step of, for each at least one contiguous string not found in the cached list:
i) grouping the plurality of smaller contiguous strings not found in the micro-dictionary as words;
ii) storing the plurality of smaller contiguous strings grouped as one or more temporary words in the temporary list; and
iii) continuing an outer loop.
8. The method of claim 7 further comprising the steps of:
i) finding, by the server computer, the largest of the one or more temporary words; and
ii) returning, by the server computer, the largest of the one or more temporary words found from the temporary list to be stored in a keyword list with its beginning character position.
9. The method of claim 1 further comprising the step of, if characters remain in a current iteration of a micro-dictionary loop, finding, by the server computer, a next largest contiguous word.
10. The method of claim 9 further comprising the step of, if no characters remain in the current iteration of the micro-dictionary loop, incrementing, by the server computer, a loop count and continuing the micro-dictionary loop with a next dictionary word in the loop count as the first to be used.
11. The method of claim 1 further comprising the step of, on completing the micro-dictionary loop, removing, by the server computer, one or more duplicate words from the keyword list.
12. The method of claim 11 further comprising the step of re-ordering, by the server computer, the plurality of keyword strings by character position.
13. The method of claim 12 further comprising the step of returning, by the server computer, a plurality of keyword strings and reliability scores from each of the plurality of keyword strings.
14. The method of claim 1 wherein the reliability score is used in a context of a spellcheck program.
15. The method of claim 1 wherein the reliability score is used in a context of a search engine program.
16. The method of claim 1 wherein the reliability score is used in a context of a domain setup program.