Research Article
Innovative Research on Collaborative Design of Blended English Teaching in Higher Vocational Colleges Based on Digital Technology
Algorithm 1
Recommendation algorithm.
| Public float repeat value (Document doc1, Document doc2) { | | Float keyword TFIDF = 0.0f; | | Float doc1 TFIDF = 0.0f; | | Float doc2 TFIDF = 0.0f; | | For (String word: doc1.getContentTerms().keySet()) { | | If (doc2.getContentTerms().containsKey (word)) { | | Keyword TFIDF += doc1.getContentTerms().get(word); | | } | | Doc1 TFIDF += doc1.getContentTerms().get(word); | | } | | For (String word: doc2.getContentTerms().keySet()) { | | Doc2 TFIDF += doc2.getContentTerms().get(word); | | } | | Return (keyword TFIDF/doc1 TFIDF)(keyword TFIDF/doc2 TFIDF); | | }. |
|