Research Article

Service Recommendation with High Accuracy and Diversity

Algorithm 2: Calculate TF-IDF weight vectors of web services.

Input:
 WSu1, WSu2,…, WSu(M-L): web services in set P.
 WS1, WS2,…, WSN: candidate web services.
Output:
: weight vectors of services in set P.
: weight vectors of candidate services.
1. Count ()
2. for to do
3. for to do//assume there are words in the corpus
4.  if
5.   then freq(, )
6.   Count
7.   Count
8.   Calculate according to equation (4)
9.  end if
10. end for
11.end for
12.
13.Calculate candidate services’ TF-IDF weight vectors
14.return,
Algorithm 2: Calculate TF-IDF weight vectors of web services.