Like keyword extraction, keyword search uses the sameAlgorithmAnd the statistical model counts the strings in the input stream by terms or phrases. The difference is that it refers to an existing vocabulary, and the output statistical results are limited to the keywords in this vocabulary. Keyword extraction and keyword search can be used together. Keyword extraction is regularly used to generate a keyword vocabulary. You can also delete or add keywords in the vocabulary and use keyword search to generate the final statistical result.
In the previous chapter, we deleted the "model" in the statistical results from the statistical results. Then we can sort them out, delete duplicates, and add some keywords that have statistical value. Let's assume that we want to count which models lead to customer dissatisfaction and leave a comment, but we want to keep only the model name, rather than like the model XX-Z1, the model and Model names are connected together. The final content of the table [termresults] We obtained is as follows:
Term
------------
Dent
Door
Freezer
Ice
Ice Maker
Maker
XX-1
XX-YY3
XX-Z1
Create a new package named termlookupexample. The package content is similar to the preceding example. We only need to replace the term exetraction with the term lookup, and create a table [termreport] For the OLE destination target. Open the edit interface of term lookup, 1
Figure 1
- Reference Table: This label is used to set the reference table. Term lookup will generate statistical results based on the words in the table.
- Term lookup: here, the input string must be counted by referring to the field in the table.
- Advanced: determines whether the label is case sensitive.
The following figure shows the result of running the package. We can see that there are no statistics, but a brief description of the number of times each keyword appears in the input stream, no statistical results in all the text.
Term Frequency convcustsvcnote
------------------------------------------------------------------------
Freezer 1 ice maker in freezer stopped working model XX-YY3
Ice Maker 1 ice maker in freezer stopped working model XX-YY3
XX-YY3 1 ice maker in freezer stopped working model XX-YY3
Door 1 door to refrigerator is coming off model XX-1
XX-1 1 door to refrigerator is coming off model XX-1
Ice Maker 1 ice maker is making a funny noise XX-YY3
(Only first six rows of resultset are displayed)
To get the final result, add an aggregate transform between term lookup and ole db destination, ignore the convcustsvcnote column in aggregate transform, group by term column, and perform sum calculation on the frequency column. Connect aggregate transform and ole db transform.
Although this is a very simple example, it generates a statistical result from the text input stream in a short time.