Adaptive textual system for associating descriptive text with varying data6401105Abstract An interpretive text system implemented in a host computer system. The host computer system, which may include multiple computers coupled together, includes one or more processors, memory, a fixed disk storage device and an interface to a communication link. The communications link provides a communication medium by which users can access the host computer from remote locations. The host computer includes interpretive text logic, which preferably is implemented in software running on the processor(s), that automatically generates a textual explanation of a set of variable data in response to user input. For example, the user may wish to see an explanation of a set of financial technical data regarding a particular security. The interpretive text logic automatically customizes a textual explanation for that particular security and provides the explanation to the user. Claims What is claimed is: Description CROSS-REFERENCE TO RELATED APPLICATIONS
TABLE I
INDICATOR DEGREE SUMMARY
Degree Description Percentage Rank
+3 Superb 98-100
+2 Great 91-97
+1 Good 71-90
0 Fair 31-70
-1 Mediocre 11-30
-2 Poor 4-10
-3 Terrible 1-3
The seven degrees are integers ranging from -3 to +3. A degree of +3, for example, is assigned to an indicator that has a value of 98-100 indicating that this indicator is "superb" for the associated security. As shown, a +2 degree is assigned to an indicator whose value is in the range 91-97 indicating a "great" characterization of the security. A +1 degree (range from 71-90) indicates "good" performance. For indicator whose values are in the range of 31-70, a 0 degree is assigned indicating a "fair" performance. The -1, -2, and -3 degrees reflect "mediocre," "poor," and "terrible" performances, respectively, in the ranges indicated. The percentage ranks in Table I are exemplary only and can be set differently for different indicators. Further, some indicators are not easily reduced to conveniently bounded ranges. Price, for example, has a lower limit of 0, bus has no upper bound. Additionally, any number of indicator degrees greater than one can be used as desired. The Degval file shown in FIGS. 4A-4H encodes the information shown above in Table I by including a list of indicator degrees 174 associated with each indicator name. Further, for each indicator degree 174, the range of values 176 defining each degree is specified. The range of indicator values defining the various degrees are referred to as "boundary" values or "boundary conditions." The range of indicator data values 176 includes a lower limit 178 and an upper limit 180. It should be noted that only five of the seven indicator degrees provided in Table I are explicitly included in the Degval file for each indicator. The five degrees 174 are +2, +1, 0, -1, and -2. The remaining two degrees, +3 and -3, are not explicitly included in Degval because the interpretive text logic 104 (FIG. 1) can easily determine that an indicator whose data value is greater than the upper limit 180 for the +2 degree should be assigned a degree of +3. Similarly, any indicator value less than the lower limit 178 for the -2 degree should be assigned a -3 degree. Accordingly, the Degval file is smaller (i.e., fewer bytes of information) than would otherwise result if all seven degrees and associated indicator data value ranges 176 were explicitly included in the file. Referring now to FIGS. 5A-5E, another input file to the interpretive text system 100 is "Textitem." This file contains two or more plain English sentences from which the interpretive text logic 104 selects to automatically generate the interpretive text to provide to the user. The English sentences contained in Textitem are referred to throughout this disclosure as "text items." The text items shown in FIGS. 5A-5E reflect only a subset of all of the text items in the Textitem file in accordance with the preferred embodiment; FIGS. 5A-5E do not include a complete listing of all of the text items in Textitem. Text items can be complete sentences or fragments of sentences. The interpretive text logic 104 generated the exemplary interpretive text 160 of FIG. 3 by selecting appropriate sentences from the Textitem file based generally on the relative values of the various indicator degrees associated with Sears. The selection process will be described in greater detail below. As shown, the Textitem file comprises a number of combinations of indicator names and indicator degrees ("indicator-degree combinations") and associated text items, such as indicator-degree combinations 184 and associated text items 186, 188, and 190 shown in FIG. 5A. All indicator-degree combinations in Textitem preferably are identified with a pair of asterisks (the symbol "*") before and after each combination. One of the indicator-degree combinations 184 in FIG. 5A includes the indicator "WWN_Momentum_Rank" and degree -3. A "terrible" rating for the WWN_Momentum_Rank generally indicates something that may be useful to an investor when making an investment decision or reviewing the status of a particular security. A plain English explanation of what a WWN_Momentum_Rank of -3 generally indicates is provided in each of the three text items 186, 188, 190 that follow the indicator-degree combination 184. Each text item 186-190 preferably provides the same information in different prose. When the interpretive text logic 104 (FIG. 1) is to select a text item associated with a WWN_Momentum_Rank of -3, the interpretive text logic 104 can select any one of the three text items 186-190. The interpretive text logic 104, for instance, may randomly select one of the three text items 186-190, rotate the order of selection among the three text items or select one of the three text items 186-190 in any other suitable fashion. By providing more than one text item for each indicator-degree combination and selecting different text items each time one of the text items is needed, the resulting interpretive text, such as interpretive text 160 shown in FIG. 3, advantageously appears to have been generated by a human, not a computer. It should be noted also that the Textitem file need not have multiple text items for any particular indicator-degree combination 184. Thus, if desired, only one text item could be associated with an indicator-degree combination 184. Furthermore, if multiple text items are associated with an indicator-degree combination, any number of text items can be provided for the indicator-degree combination. For example, in FIG. 5B, the "Analyst_Rank +3 AND Fundamental_Rank -2" indicator-degree combination 194, which as noted below comprises a pair of indicator-degree combinations, has two text items 196 and 198 associated with it. Considerable information can be gleaned from an analysis of the relevant indicators and their degrees. Much useful information can be discerned by comparing various indicator-degree combinations. For example, the "Analyst_Rank +3 AND Fundamental_Rank -2" indicator-degree combination 194 in FIG. 5B comprises a pair of indicator-degree combinations--one of the pair includes Analyst_Rank +3 and the other of the pair includes Fundamental_Rank -2. The combination of an Analyst_Rank of +3 in conjunction with a Fundamental_Rank of -2 indicates something about a security for which these indicators have the degrees indicated. That "something" is described in the plain English text items 196 and 198 following the indicator-degree combination pair 194. Thus, when Analyst_Rank is +3 and the Fundamental_Rank is -2 for a security, the interpretive text logic 104 preferably selects either text items 196 or 198 to provide to the user. Pairs of indicator-degree combinations can be combined in any manner such as through the use of the word "AND" or "OR" or any other suitable joining word or words. Although indicator-degree combination pair 194 in FIG. 5B includes two indicator-degree combinations, any number of indicator-degree combinations could also be included. The indicator-degree character strings 184, 194 in FIG. 5 are referred to throughout this disclosure as "indicator-degree combinations" with the understanding that each combination may include any number, including one, of indicator-degree strings. The exemplary Degval file shown in FIGS. 4A-4H includes 61 indicators. With 61 indicators each having potentially seven degrees, there are millions of ways in which to combine the various indicator-degree combinations (e.g., Analyst_Rank +3 AND Fundamental_Rank -2; Analyst_Rank +2 AND Fundamental_Rank 0, etc.). However, relatively few of the total possible indicator-degree combinations actually provide any relevant information about a particular security. Thus, in accordance with the preferred embodiment, only text items for information bearing indicator-degree combinations are included in the Textitem input file. Further, some combinations of indicator-degree combinations may provide more pertinent information than other combinations. Accordingly, if desired, the number of text items in Textitem can be reduced even further by only including the more pertinent indicator-degree combinations. For example, a degree of 0 means that the associated indicator has a "fair" rating. Any information associated with degree 0 may not be nearly as interesting to a lay investor as information associated with a degree of +3, +2, -2, or -3. Thus, if desired textual information can be omitted from Textitem for less pertinent indicator-degree combinations. As the interpretive text logic 104 examines various indicator-degree combinations for a particular security and selects appropriate text items, the selected text items will be provided to the user in a suitable order to give the interpretive text, such as interpretive text 160 in FIG. 3 the appearance of having been authored by a human. Some of the criteria for ordering the selected text items are provided in the Order input file shown in FIG. 6. The Order input file and the ordering process will be described more fully below. Referring now to FIGS. 1 and 7, the interpretive text system. 100 (FIG. 1) preferably performs an initialization process 200 (FIG. 7). In accordance with the preferred embodiment, the interpretive text logic 104 is implemented in software that runs on the processor 108 and the three input files shown in FIGS. 4-6, Degval, Textitem and Order, are stored on the fixed disk storage device 110. During initialization, which may occur at any desired time such as during initial system setup or when the input files are updated, the host computer 102 preferably executes the steps 202, 204, 206, 208 and 210 included in the initialization process 200. The steps 202-210, however, need not occur in the specific order shown in FIG. 7; the order of the initialization steps can be varied as desired. Steps 202, 204, 206, and 208 involve scanning the three input files (Degval, Textitem, Order) and "parsing" the files into various data structures stored in memory 106. Parsing an input file means to "break apart" the file and copy components of the file to the various data structures. The various data structures are described in detail in FIGS. 8-12 and 14 and the associated text below. Parsing the input files into data structures stored in memory permits the host computer 102 to access subsequently the information more rapidly than obtaining the information from the files directly as needed. Step 202 in initialization process 200 will now be described with respect to FIG. 8. In step 202 the host computer 102 (FIG. 1) parses the Degval input file by copying information from Degval into the DEG.VAL.TREE data structure shown in FIG. 8. The DEG.VAL.TREE data structure preferably is a binary tree structure known to those of ordinary skill in the art. As is commonly known, binary tree data structures have "nodes." Each node may be assigned a character string label identifying the node. Various data, addresses, or other types of information can be stored in memory assigned to, or otherwise associated with, each node. The nodes in DEG.VAL.TREE are identified by reference numeral 220. Each node 220 includes a node identifier 222 which preferably is, or it is indicative of, an indicator name from the Degval input file. Four bytes of memory preferably are made available for storing the node identifier 222. A set of boundary values 224 are stored in memory associated with each node identifier 222. The boundary values 224 are, or are indicative of, the boundary values 176 from the Degval input file (FIG. 4A). As such, the boundary values 224 define or specify the various degrees for the associated indicator stored in DEG.VAL.TREE as node identifiers 222. The boundary values 224 include "+2 low boundary," "+2 high boundary," "+1 low boundary," "+1 high boundary," "0 low boundary," "0 high boundary," "-1 low boundary," "-1 high boundary," "-2 low boundary," and "-2 high boundary." Preferably, 40 bytes of storage are provided for storing each set of boundary values 224; four bytes are allocated for each boundary value in the set. When the Degval parsing step 202 is performed during the initialization process 200, the host computer 102 scans the Degval input file for the asterisk symbols ("*") which identify the indicator names 170. As each indicator name string is read from Degval, the host computer 102 preferably adds a node 220 to DEG.VAL.TREE as shown in FIG. 8. The nodes 220 preferably are sorted in alphabetical order according to node identifier 222 (i.e., indicator name). After a node identifier 222 is written to DEG.VAL.TREE, the associated boundary values are stored in DEG.VAL.TREE as well. Parsing the Degval input file into the DEG.VAL.TREE binary tree data structure in memory 106 in this manner advantageously permits the host computer 102 to search quickly the boundary values 224 by indicator name 222 to determine the appropriate degree for a given indicator value. The Textitem file parsing step 204 from FIG. 7 will now be described with reference to FIGS. 9-13. FIGS. 9-12 include various data structures that are loaded with information when the Textitem file is parsed. The preferable size (in bytes) of the various fields of each data structure is shown in FIGS. 9-12, although the field sizes can be varied. FIGS. 13A and 13B include a suitable method of loading the data structures shown in FIGS. 9-12. The contents of the data structures will be discussed first followed by an explanation of how the data structures are used. Referring first to FIG. 9, the Text Item Index Buffer (TEXT.ITEM.INDEX.BUFFER) 231 is a buffer that includes a block 230 of varying size for each "linkset." A linkset refers to one or more indicator-degree combinations linked together. It should be understood that a linkset can include a single indicator-degree combination and as such, a single indicator-degree combination in a linkset is not linked to another indicator-degree combination. Linksets will be described further with regard to FIG. 12. The TEXT.ITEM.INDEX.BUFFER buffer 231 generally includes a plurality of blocks 230. Each block 230 includes a one byte value 232 which represents the number of text item addresses 234 associated with that block. The text items are stored in text item buffer (TEXT.ITEM.BUFFER) 237 which is shown in FIG. 10 as a series of character strings 238. Each character string preferably contains one text item from the Textitem input file and has an associated address (not shown). The addresses of the text item character strings 238, stored in TEXT.ITEM.BUFFER 237 are the addresses stored in the blocks 230 in the TEXT.ITEM.INDEX.BUFFER buffer 231. Referring now to FIGS. 11 and 12, an indicator degree index tree (IND.DEGREE.INDEX.TREE) 241 and a linkset "contig" (LINKSET CONTIG) 251 data structures are shown in accordance with the preferred embodiment. A "contig," an abbreviation for "contiguous," is an area of memory that is physically contiguous (i.e., byte n+1 immediately follows byte n). The IND.DEGREE.INDEX.TREE 241 is a binary tree that includes one or more nodes 240 with each node containing an indicator-degree string 242 (e.g., "Analyst_Rank +3") and a one byte value 244 specifying the number of linkset addresses 246 in the node. Each linkset address 246 is the address of a linkset block 250 (FIG. 12). Referring to FIG. 12, LINKSET.CONTIG 251 contains one or more blocks 250 of variable length for each linkset of indicator-degree pairs (e.g., "Analyst_Rank +3 AND Fundamental_Rank -2"). A linkset thus refers to one or more indicator-degree strings from IND.DEG.INDEX.TREE 241. Each block 250 includes a value 252 that specifies, or is otherwise used to determine, the number of IND.DEG.INDEX.TREE indicator-degree string addresses 260 contained in the block 250. Each indicator-degree string address block 250 points to a node 240 in IND.DEG.INDEX.TREE that has an indicator-degree string 242 represented in the linkset. For example, a linkset representing the indicator-degree combination pair "Analyst_Rank +3 AND Fundamental_Rank -2" will have two node addresses 260. One address points to the IND.DEG.INDEX.TREE node containing the indicator-degree string "Analyst_Rank +3." The other address points to the IND.DEG.INDEX.TREE node containing "Fundamental_Rank -2." Each block 250 also includes a number of additional 4-byte values 254, 256, and 258. Value 254 preferably is an offset value to a flag in the Linkset Used Flag Port Array (LINKSET.USED.FLAG.PARRAY) buffer 332, discussed below with respect to FIGS. 15 and 17. Value 256 is an address to a block 230 in TEXT.ITEM.INDEX.BUFFER (FIG. 9) and value 258 is an address to a sublinkset block in the sublinkset information buffer (SUBLINKSET.INFO.BUFFER) shown in FIG. 25. Referring now to FIGS. 13A and 13B, a preferred embodiment of the Textitem parsing step 204 (FIG. 7) is shown. FIGS. 13A and 13B should be examined with reference to the following explanation and the data structures of FIGS. 9-12. In step 270, the host computer 102 reads an indicator name and degree from the Textitem file. The host computer 102 determines in decision step 274 whether the indicator name read from Textitem is valid. This step preferably is performed by determining whether the indicator name is a member of the DEG.VAL.TREE binary tree described above with respect to FIG. 8. If the indicator name is not a member of DEG.VAL.TREE, the indicator name and degree and all text items from the Textitem input file that are associated with the indicator name are ignored and the program control loops back to step 270 in which the next indicator name and degree values are read from Textitem. If the indicator name is found in DEG.VAL.TREE, however, then in decision step 282, the degree is examined to determine whether it is a valid value. In the context of the preferred embodiment, allowable degrees are integers in the range of +3 to -3 (i.e. +3, +2, +1, 0, -1, -2, -3). If the degree value is invalid, control passes to step 270 and the next indicator name and degree values are read. If the degree and indicator names are valid, in step 290, the valid indicator name and degree read from Textitem are concatenated, or otherwise combined, to form a single indicator-degree string. In step 294, the host computer 102 then adds a node 240 to the IND.DEG.INDEX.TREE binary tree unless the node is already present (duplicative nodes preferably are not generated). Step 294 includes storing the concatenated indicator-degree string as value 242 in IND.DEG.INDEX.TREE. In decision step 298, the host computer 102 determines whether more indicator names and associated degrees are present in Textitem and, if so, loops back to step 270 to repeat the process. Once all of the indicator names and degrees in Textitem have been processed, as determined by decision step 298, program control passes to step 302 in FIG. 13B in which the host computer 102 opens a linkset block 250 in LINKSET.CONTIG into which the relevant data shown in FIG. 12 will be stored. Further, in block 230 of TEXT.ITEM.INDEX.BUFFER (FIG. 9) is opened by the host computer 102 in step 306 into which the addresses 234 are written. The text items, the addresses of which are written into TEXT.ITEM.INDEX.BUFFER, are stored in TEXT.ITEM.BUFFER (FIG. 10) in step 310. At this point, IND.DEG.INDEX.TREE 241 includes a node 240 for each unique indicator-degree combination. Each of these nodes 240 has a unique address. LINKSET.CONTIG has a linkset for each set or pair of indicator-degree combinations. Each linkset has a unique address. Each linkset also contains the IND.DEG.INDEX.TREE node addresses that represent the indicator-degree combinations associated with the link set. Similarly, each node 240 in IND.DEG.INDEX.TREE has the address of all of the linksets for which the indicator-degree combination represented by the node is a member. This type of cross-referencing system permits quick and easy searches for all indicator-degree combinations that contain a particular indicator name as will be explained below. Referring to FIG. 7, in step 208 the Textitem input file again is scanned this time for replacement "tokens." A replacement token is a symbol in a text item that should be replaced with an appropriate character string indicated by the particular symbol. For example, referring to FIGS. 5D and 5E, various replacement tokens 192 are shown. In accordance with the preferred embodiment, a replacement token is identified with the symbol "&&" preceding a reference label. The replacement token "&&CURRENTQUOTE" indicates that the current price quote for the associated security (i.e., the security being analyzed for the user) should be substituted into that text item in place of the replacement token. By way of additional examples, "&&TICKER" refers to the ticker symbol for the associated security and "&&DAILYOPEN" refers to the daily opening price quote for the security. Using replacement tokens permits generic text items to be written that can apply to any security at any time. Any security specific information, such as current price, ticker symbol, or the opening day's price quote, can easily incorporated into the interpretive text during generation of the text. The host computer 102 in initialization step 208 checks the Textitem input file for replacement tokens. The host computer preferably scans the Textitem input file for replacement tokens, preferably identified with the symbol "&&.". When the host computer 102 encounters a replacement token, it adds a node to a Replacement Text Tree (REPLACEMENT.TEXT.TREE) binary tree data structure as shown in FIG. 14. Each node 320 includes a replacement token 322 and an associated replacement character string 324. The character string 324 can be any suitable length, but preferably is up to 30 characters in length. Referring still to FIG. 7, the host computer preferably identifies "sublinksets" in step 210. Sublinksets are linksets in which every indicator-degree combination string is included in another single linkset. For example, the Analyst_Rank +2 text will repeat part of the contents of the Analyst_Rank +2 AND Fundamental_Rank -1 text. Thus, Analyst_Rank +2 is a sublinkset of Analyst Rank +2 and Fundamental_Rank -1 text. Sublinkset information is written into the SUBLINKSET.INFO.BUFFER shown in FIG. 25. This buffer includes a block for each linkset in LINKSET.CONTIG. Each block includes a value 550 specifying the number of sublinkset address offsets 554 that follow. Each sublinkset address offset 554 is used to calculate, or otherwise identify, a linkset address in LINKSET.PCONTIG that is a subset of the linkset associated with this block. By searching the SUBLINKSET.INFO.BUFFER, the host computer 102 can find sublinksets of a given linkset and eliminate the corresponding text item from being included in the interpretive text output. FIG. 15 depicts the general relationship between the various data structures described above. The TEXT.ITEM.INDEX.BUFFER 231, TEXT.ITEM.BUFFER 237, IND.DEG.INDEX.TREE 241, and LINKSET.CONTIG 251 have been described with reference to FIGS. 9, 10, 11, and 12, respectively. The Current Index Degree Port Array (CURRENT.IND.DEGREE.PARRAY) 330 is an array comprising the actual (i.e., up-to-date) indicator degrees for a security specified by a user (e.g., Analyst_Rank=87). The CURRENT.IND.DEG.PARRAY 330 may be programmed by a systems programmed or the user to include any desired set of indicators. Referring to FIG. 2, when the user enters a security symbol in input box 140 to begin the generation of interpretive text, the host computer preferably accesses a database (not shown) that maintains current values for the various indicators specified in CURRENT.IND.DEG.PARRAY 330. The host computer 102 retrieves the up-to-date values for the indicators of the user-specified security, converts each indicator value to a degree using DEG.VAL.TREE (FIG. 8), and writes the resulting indicator-degree combinations into the CURRENT.IND.DEGREE.PARRAY 330 in the format shown in FIG. 16. The first entry 340 includes the number of indicator-degree strings (e.g., Analyst_Rank +3) included in the set of indicator-degree strings 342. Thus, CURRENT.IND.DEG.PARRAY 330 includes the up-to-date degrees for the indicators on which the interpretive text will be based. Referring again to FIG. 15, the linkset used flag port array (LINKSET.USED.FLAG.PARRAY) 332 includes a flag for each linkset in LINKSET.CONTIG 251. The preferred configuration for the LINKSET.USED.FLAG.PARRAY 332 is shown in FIG. 17. Each flag preferably is a one-byte value 336 that is set to a value of true or false, or functionally equivalent representations, to indicate whether the associated linkset has already been used in the current cycle as explained below. Using the up-to-date indicator-degree strings from CURRENT.IND.DEG.PARRAY 330, the host computer, as explained below, generates interpretive text by selecting appropriate text items from TEXT.ITEM.BUFFER 237. Once text items from the TEXT.ITEM.BUFFER 237 have been selected, the host computer 102 writes those text items to the output linkset port array (OUTPUT.LINKSET.PARRAY) 334. From there, the various text items are further processed before being provided to the user in the form of interpretive text, such as interpretive text 160 (FIG. 3). FIG. 18 shows a preferred method 400 for generating the interpretive text in response to a user specifying a particular security. Method 400 preferably is performed by the host computer 102 after the initialization process 200 (FIG. 7) is completed and, as such, method 400, if implemented in software, is referred to as a "runtime routine." Runtime routine 400 will now be described with reference to FIGS. 8-12 and 14-17. It is assumed that for runtime routine 400 a list of indicators has already been chosen for generating the interpretive text. This list will include the indicators that the interpretive text logic 104 will examine when selecting text items from the TEXT.ITEM.BUFFER 237. Choosing the indicators can be by any suitable method such as hard coding the selected indicators into the runtime routine 400 or permitting the user to specify which indicators should be used by the interpretive text logic 104 to generate interpretive text. In step 402, the host computer 102 determines whether the indicators previously chosen to be used in generating the interpretive text are valid or acceptable indicators. This step preferably is performed by comparing each indicator string in the previously chosen list to the indicator strings 222 (FIG. 8) in DEG.VAL.TREE parsed from the Degval input file. If a previously chosen indicator is not found in DEG.VAL.TREE, then that indicator will be ignored by the runtime routine 400. In the next step, step. 404, the runtime routine. 400 sets or initializes the replacement strings in the REPLACEMENT.TEXT.TREE (FIG. 14). Some replacement tokens are global and refreshed every time (e.g., "&&TICKER," the company ticker symbol). Other replacement tokens are specific to certain text items or linksets and are only refreshed when, and if, needed. An example of such a token is "&&P/E" which is the company's price-to-earnings ratio. In step 406, the host computer 102 obtains the current values for each of the valid, chosen indicators from any suitable source of such information and converts the indicator names and associated values to indicator-degree combinations using the boundary values 224 included in DEG.VAL.TREE (FIG. 8). The resulting indicator-degree combinations then are written into the CURRENT.IND.DEG.PARRAY 330 (FIG. 16). In step 410, the host computer 102 reads the indicator-degree combinations from CURRENT.IND.DEG.PARRAY 330 and searches for every applicable text item. FIG. 19 includes a preferred flowchart for step 410 and will be discussed shortly. Once the host computer selects the applicable text items, those text items are then "winnowed" and sorted in step 414. Winnowing refers to scanning the selected group of text items and eliminating any unnecessary, redundant, or otherwise undesirable text items. Sorting refers to placing the resulting text items in a desired order for presentation on the user computer's display 126 (FIG. 1). Finally, in step 418 the host computer 102 uses the final set of ordered text items preferably to generate HyperText Markup Language ("HTML") code, or other suitable code or format, compatible with the user computer's browser 122. The user computer's browser 122 shows the interpretive text on the display 126 in accordance with commonly known techniques. Referring now to FIG. 19, a preferred embodiment of step 410 is shown for searching the relevant data structures to select the appropriate text items from TEXT.ITEM.BUFFER 237 (FIG. 15). In step 424, the host computer 102 preferably sets all of the flags in LINKSET.USED.FLAG.PARRAY to "false" indicating that none of the linksets has been used to select a text item. In step 428, the next available indicator-degree combination from CURRENT.IND.DEG.PARRAY 330 is retrieved. Then, in step 432 the IND.DEG.INDEX.TREE 241 is searched for the retrieved indicator-degree combination. If no node is found in IND.DEG.INDEX.TREE 241 that matches the indicator-degree combination retrieved from CURRENT.IND.DEG.PARRAY 330 (decision step 434), control passes back to step 428 in which the next indicator-degree string is retrieved from CURRENT.IND.DEG.PARRAY 330. If, however, a node with a matching indicator-degree combination is found, then in step 436 preferably all of the linksets in LINKSET.CONTIG pointed to by the linkset address pointers in that node are examined for pointers to other nodes in IND.DEG.INDEX.TREE. then, using the indicator-degree strings 242 at such other nodes, the host computer 102 determines if those indicator-degree combinations are members of CURRENT.IND.DEG.PARRAY 330. In this manner, the host computer 102 identifies every linkset in which all indicator-degree combinations are present in CURRENT.IND.DEG.PARRAY 330. By way of an example, in FIG. 20 the CURRENT.IND.DEG.PARRAY 330 includes the indicator-degree combinations "Analyst_Rank +3," "Fundamental_Rank -2," and others. The host computer 102 examines the first entry in CURRENT.IND.DEG.PARRAY 330 ("Analyst_Rank +3") and then determines whether a node exists in IND.DEG.INDEX.TREE 241 having an indicator-degree string 242 (FIG. 11) that matches Analyst_Rank +3. In this example, node 1 is just such a node. Node 1 includes linkset pointer addresses to linkset 1 and linkset 2 of LINKSET.CONTIG 251. Both of these linksets include the Analyst_Rank +3 indicator-degree combination as a member of a pair of indicator-degree combinations. Linkset 1 includes the pair "Analyst_Rank +3 AND Fundamental_Rank -2" and linkset 2 includes the pair "Analyst_Rank +3 AND Insider_Rank 0." The host computer 102 then must determine whether the other members of these pairs, i.e., "Fundamental_Rank -2" and "Insider_Rank 0," are also members of the current set of indicator-degree entries in CURRENT.IND.DEG.PARRAY 330. If so, then the host computer will retrieve a text item from TEXT.ITEM.BUFFER associated with the linkset. If not, no text item is selected. The host computer 102 determines whether "Fundamental_Rank. -2" and "Insider_Rank 0" are in CURRENT.IND.DEG.PARRAY 330 by examining the node in IND.DEG.INDEX.TREE pointed to by the node pointer addresses in linksets 1 and 2. Linkset 1, for example, has a pointer address to node 2 because "Fundamental_Rank -2" is associated with node 2. The host computer 102 then retrieves the node 2 indicator-degree string ("Fundamental_Rank -2") and searches CURRENT.IND.DEG.PARRAY 330 for a matching entry. In this case, "Fundamental_Rank -2" is a member of CURRENT.IND.DEG.PARRAY 330 and thus, the host computer 102 then proceeds to retrieve a text item from TEXT.ITEM.BUFFER associated with linkset 1 as described below. This process is repeated until all of the entries in CURRENT.IND.DEG.PARRAY 330 have been analyzed. To speed up the interpretive text generation process, interpretive text logic 104 preferably minimizes or avoids redundant searching and text item selection. That is, once the interpretive text logic 104 starts with "Analyst_Rank +3" in CURRENT.IND.DEG.PARRAY 330 and then determines that "Analyst_Rank +3 AND Fundamental_Rank -2" is true for the specified security, the interpretive text logic 104 preferably does not select a redundant text item using "Fundamental_Rank -2," the next entry in CURRENT.IND.DEG.PARRAY 330. To avoid such unnecessary searching and text item selecting, once the interpretive text logic 104 determines that "Analyst_Rank +3 AND Fundamental_Rank -2" is true the first time and selects the associated text item, the interpretive text logic 104 in step 448 (FIG. 19) sets a flag in LINKSET.USED.FLAG.PARRAY 332 associated with linkset 1. Then, when the interpretive text logic 104 reads "Fundamental_Rank -2" from CURRENT.IND.DEG.PARRAY 330 for processing, it will determine whether that flag is already set as true in step 444 and, if so, will not proceed with searching for and selecting an associated text item, which has already been selected anyway. In this manner, the host computer identifies all linksets that are true for the current indicator-degree values for the selected security. The linkset of addresses of some or all text items from TEXT.ITEM.BUFFER associated with these linksets are written to OUTPUT.LINKSET.PARRAY 334 in step 448. Thus, OUTPUT.LINKSET.PARRAY 334 preferably includes a list of addresses of the text items to be combined together as the interpretive text. At this point, the text items written to OUTPUT.LINKSET.PARRAY 334 must be winnowed and sorted as noted above with regard to step 414 of FIG. 18. Referring now to FIG. 21, a preferred winnowing and sorting method 414 is shown comprising steps 502, 506, 510, 514, and 518, although other methods for winnowing and/or sorting are also possible. Further, the order of the steps can be varied from that shown. It may desired to begin each interpretive text passage with an introductory sentence or paragraph. One way to force a predetermined text item to always be first is execute or call the runtime routine 400 (FIG. 18) multiple times as indicated by step 502. The first time the runtime routine is called, the only indicators written into CURRENT.IND.DEG.PARRAY 330 preferably relate to the desired introductory sentence or paragraph, or other desired text item. The second time the runtime routine is called, all of the relevant indicators for generating the interpretive text are written into CURRENT.IND.DEG.PARRAY 330. In step 506, various "order blocks" are defined to reorder the linkset addresses in OUTPUT.LINKSET.PARRAY. Step 506 is performed by the interpretive text logic 104 preferably using the Node Set Order Contig (NODESET.ORDER.CONTIG), the Output Linkset Port Contig (OUTPUT.LINKSET.PCONTIG), and Output Order Block Port Contig (OUTPUT.ORDER.BLOCK.PCONTIG) data structures shown in FIGS. 22-24, respectively. Referring to FIG. 22, NODESET.ORDER.CONTIG is a contig containing a block of information of varying length for each entry in the Order input file (FIG. 6). Each block in NODESET.ORDER.CONTIG specifies the order in which certain linkset and their corresponding text items preferably occur in the interpretive text output. Four bytes preferably are used to store the number of order blocks in this contig. Each order block includes the information shown in FIG. 22. Specifically, each order block includes the number of nodesets in the order block followed by the nodeset data. Each nodeset data includes one byte (not specifically shown) containing the number of node addresses in the order block followed by four bytes for each nodeset address. Referring to FIG. 23, the OUTPUT.LINKSET.PCONTIG data structure is a port contig that stores the addresses of the linksets from LINKSET.CONTIG that have been flagged in LINKSET.USED.FLAG.PARRAY 332 (FIG. 15) as relevant to the current interpretive text output. An initial byte includes the number of linkset addresses in this port contig. Additionally or alternatively, OUTPUT.LINKSET.PCONTIG may include the addresses of the order blocks in OUTPUT.ORDER.BLOCK.PCONTIG that are relevant to the current interpretive text output. Referring to FIG. 24, OUTPUT.ORDER.BLOCK.PCONTIG is a contig that holds blocks 544 of linkset addresses that are relevant to the current output and should be output in a certain order. Value 540 specifies the number of order blocks 544 that follow. The address information in the order blocks 544 is derived from the NODESET.ORDER.CONTIG which is programmed using the indicator order information from the Order input file. Referring again to FIG. 21, once the order blocks have been placed in the correct order in step 506, sublinksets are removed in step 510. As noted previously, sublinksets identified in SUBLINKSET.INFO.BUFFER (FIG. 25) are linksets that are members of other linksets, and as such, can be eliminated as redundant. Accordingly, the host computer 102 searches the SUBLINKSET.INFO.BUFFER to identify applicable sublinksets and then eliminates those sublinksets from OUTPUT.LINKSET.PARRAY. Referring still to FIG. 21, the sorting and winnowing method 414 referably also prioritizes the output order by degree as indicated by step 514. In some situations, the more interesting text items may relate to indicator-degree combinations that have an indicator at or near the extremes (i.e., +3, +2, -2, -3). Thus, the text items associated with such extreme indicator degrees may be included in the interpretive text output ahead of other text items. Finally, in step 518 interpretive text logic 104 can cut short the number of text items included in the interpretive text output at a predetermined number of text items. Referring again to FIG. 18, in step 416 the host computer preferably inserts replacement strings in accordance with the replacement tokens. This step may be carried out by searching through the selected text items for replacement tokens which preferably are identified by the symbol "&&." The host computer 102 then searches for a node identified. by the replacement token string in REPLACEMENT.TEXT.TREE (FIG. 14). If the corresponding node in REPLACEMENT.TEXT.TREE has a replacement character string 324, the replacement token is replaced with the replacement character string 324. If there is no replacement string or if the replacement token is not in REPLACEMENT.TEXT.TREE, then the replacement token is left in the interpretive text. In addition to the winnowing and sorting method described above, there are many other winnowing and/or sorting techniques that could be used as well. Referring to FIG. 26, for example, an alternative sorting method 414A is shown comprising steps 602-622. In step 602, an indicator is selected from the first linkset in the output set of linksets. Using that indicator, all other linksets are searched for the indicator in step 606. In step 610, all other linksets containing the indicator are repositioned to follow the first linkset. Using the first linkset and the newly repositioned linksets from step 610, another indicator is chosen from the first linkset (step 614) and steps 606, 610, and 614 are repeated until only two linksets remain to be examined (step 618). Finally, steps 602-618 are repeated (step 622) on the remaining linksets not yet examined until only two linksets remain unmoved. This sorting process 414A generally places the selected text items in an order according to context. That is, text items related to the same indicator generally are grouped together in the interpretive text output. The present invention has been described in relation to particular embodiments which are intended in all respects to be illustrative rather than restrictive. Alternative embodiments will become apparent to those skilled in the art to which the present invention pertains without departing from its spirit and scope.
|
Same subclass Same class Consider this |
||||||||||
