Research Article
Automated Text Analysis Based on Skip-Gram Model for Food Evaluation in Predicting Consumer Acceptance
Algorithm 2
Algorithm for relationship analysis.
Algorithm. Relationship_Analysis(cluster_corpus, taste_words, n) | Input: List cluster_corpus and taste_words of n integers. | //cluster_corpus have three types: “powder soup sauce” cluster words, “noodle” cluster words and | //“soup” cluster words and n is number of words in taste_words | Output: List Result of similarities between cluster corpus and taste words | // Result is a list with taste words and similarities of cluster words | Method: | Begin | cluster_vector ← VectorRepresentation(cluster_corpus) | // converting to representation vector | for ← 0 to | taste_vector ← word2vec(taste_words[i]) | similarity ← cosine_similarity(taste_vector, taste) //compute similarity | Result.insert(taste, similarity) | end | return Result | end |
|