|
Algorithm 2 SE-KIA (online component) |
-
1:
Input: User query , keyword co-occurrence word graph , weight factor , POS weight table
-
2:
Output: Keyword weights
-
3:
Step 1: Static Weight Assignment
-
4:
for each keyword do
-
5:
Retrieve part-of-speech tag
-
6:
Assign static weight:
-
7:
end for
-
8:
Step 2: Dynamic Weight Adjustment
-
9:
Generate candidate pairs:
-
10:
for each pair do
-
11:
if exists in G then
-
12:
Retrieve precomputed relative importance
-
13:
if and then
-
14:
-
15:
else if and then
-
16:
-
17:
end if
-
18:
end if
-
19:
end for
-
20:
Step 3: New Queries Logging
-
21:
Insert q into log database
-
22:
Periodically (e.g., daily): extract new pairs from with frequency
-
23:
Update G with
-
24:
return
|