Sort digits as number collation in server
First Claim
Patent Images
1. A computer-implemented sort order engine, comprising:
- a processor that executes the following computer-executable components stored in memory to sort text strings in accordance with a specified collation, including;
a normalization component that;
accesses a plurality of data strings, each data string including a sequence of characters, the characters selected from among numeric and alphabetic characters;
for each data string in the plurality of data strings;
parses the data string into a series of adjacent numeric tokens and alphabetic tokens, the numeric tokens including adjacent numeric characters and the alphabetic tokens including adjacent alphabetic characters;
for each numeric token in the data string;
count the number of significant digits in the numeric token, the count of the number of significant digits indicating the length of the numeric token, the count ignoring any leading zeroes of the numeric token; and
pre-pends a numeric value representing the count of the number of significant digit in the numeric token to the numeric token by inserting the numeric value into the data string prior and adjacent to the numeric token within the data string such that one or more of the numeric value and numeric token to sort the data string, wherein the numeric value sorts numeric token based on the length of the numeric token without having to re-parse the numeric token; and
a collation component that sorts the plurality of data strings in accordance with the specified collation based at least in part on the length of the numeric tokens included in the pre-pend numeric values.
2 Assignments
0 Petitions
Accused Products
Abstract
Systems and methods that supply a sort order for strings with defined digit and non-digit tokens, via employing a normalization procedure that assigns numeric values to the digit based tokens, and that further leverages on existing database collations. As such, plugging a particular collation into the sort engine determines a weight for the various characters relative to each other, and in conjunction with the normalization procedure, provides an intuitive sort order for the strings.
-
Citations
13 Claims
-
1. A computer-implemented sort order engine, comprising:
-
a processor that executes the following computer-executable components stored in memory to sort text strings in accordance with a specified collation, including; a normalization component that; accesses a plurality of data strings, each data string including a sequence of characters, the characters selected from among numeric and alphabetic characters; for each data string in the plurality of data strings; parses the data string into a series of adjacent numeric tokens and alphabetic tokens, the numeric tokens including adjacent numeric characters and the alphabetic tokens including adjacent alphabetic characters; for each numeric token in the data string; count the number of significant digits in the numeric token, the count of the number of significant digits indicating the length of the numeric token, the count ignoring any leading zeroes of the numeric token; and pre-pends a numeric value representing the count of the number of significant digit in the numeric token to the numeric token by inserting the numeric value into the data string prior and adjacent to the numeric token within the data string such that one or more of the numeric value and numeric token to sort the data string, wherein the numeric value sorts numeric token based on the length of the numeric token without having to re-parse the numeric token; and a collation component that sorts the plurality of data strings in accordance with the specified collation based at least in part on the length of the numeric tokens included in the pre-pend numeric values. - View Dependent Claims (2, 3)
-
-
4. At a computer system including a processor and system memory, the method for sorting text strings in accordance with a specified collation, the method comprising:
-
accesses a plurality of data strings, each data string including a sequence of characters, the characters selected from among numeric and alphabetic characters; for each data string in the plurality of data strings; parses the data string into a series of adjacent numeric tokens and alphabetic tokens, the numeric tokens including adjacent numeric characters and the alphabetic tokens including adjacent alphabetic characters; for each numeric token in the data string; the processor counting the number of significant digits in the numeric token, the count of the number of significant digits indicating the length of the numeric token, the count ignoring any leading zeroes of the numeric token; and pre-pends a numeric value representing the count of the number of significant digit in the numeric token to the numeric token by inserting the numeric value into the data string prior and adjacent to the numeric token within the data string such that one or more of the numeric value and numeric token to sort the data string, wherein the numeric value sorts numeric token based on the length of the numeric token without having to re-parse the numeric token; and sorting the plurality of data strings in accordance with the specified collation based at least in part on the length of the numeric tokens included in the pre-pend numeric values. - View Dependent Claims (5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A computer program product usable at a computer system, the computer program product for implementing a method for sorting text strings in accordance with a specified collation, the computer program product comprising one or more computer storage media having stored there on computer-executable instructions that, when executed at a processor, cause the computer system to perform the method, including the following:
-
accesses a plurality of data strings, each data string including a sequence of characters, the characters selected from among numeric and alphabetic characters; for each data string in the plurality of data strings; parse the data string into a series of adjacent numeric tokens and alphabetic tokens, the numeric tokens including adjacent numeric characters and the alphabetic tokens including adjacent alphabetic characters; for each numeric token in the data string; counting the number of significant digits in the numeric token, the count of the number of significant digits indicating the length of the numeric token, the count ignoring any leading zeroes of the numeric token; and pre-pending a numeric value representing the count of the number of significant digit in the numeric token to the numeric token by inserting the numeric value into the data string prior and adjacent to the numeric token within the data string such that one or more of the numeric value and numeric token to sort the data string, wherein the numeric value sorts numeric token based on the length of the numeric token without having to re-parse the numeric token; and sort the plurality of data strings in accordance with the specified collation based at least in part on the length of the numeric tokens included in the pre-pend numeric values.
-
Specification