├── testsets ├── CA8 │ └── dataset_statistics.xlsx ├── README.md └── CA_translated │ └── ca_translated.txt ├── evaluation ├── ana_eval_dense.py └── ana_eval_sparse.py ├── LICENSE └── README.md /testsets/CA8/dataset_statistics.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/binhetech/Chinese-Word-Vectors/master/testsets/CA8/dataset_statistics.xlsx -------------------------------------------------------------------------------- /evaluation/ana_eval_dense.py: -------------------------------------------------------------------------------- 1 | # We reuse a fraction of code in http://bitbucket.org/omerlevy/hyperwords. 2 | # Using the numpy and similarity matrix largely speed up the evaluation process, 3 | # compared with evaluation scripts in word2vec and GloVe 4 | 5 | import numpy as np 6 | import argparse 7 | import random 8 | 9 | 10 | def read_vectors(path, topn): # read top n word vectors, i.e. top is 10000 11 | lines_num, dim = 0, 0 12 | vectors = {} 13 | iw = [] 14 | wi = {} 15 | with open(path, encoding='utf-8', errors='ignore') as f: 16 | first_line = True 17 | for line in f: 18 | if first_line: 19 | first_line = False 20 | dim = int(line.rstrip().split()[1]) 21 | continue 22 | lines_num += 1 23 | tokens = line.rstrip().split(' ') 24 | vectors[tokens[0]] = np.asarray([float(x) for x in tokens[1:]]) 25 | iw.append(tokens[0]) 26 | if topn != 0 and lines_num >= topn: 27 | break 28 | for i, w in enumerate(iw): 29 | wi[w] = i 30 | return vectors, iw, wi, dim 31 | 32 | 33 | def read_analogy(path, iw): 34 | analogy = {} 35 | analogy_type = "" 36 | with open(path) as f: 37 | for line in f: 38 | oov = 0 39 | if line.strip().split()[0] == ':': 40 | analogy_type = line.strip().split()[1] 41 | analogy[analogy_type] = {} 42 | analogy[analogy_type]["questions"] = [] 43 | analogy[analogy_type]["total"] = 0 44 | analogy[analogy_type]["seen"] = 0 45 | continue 46 | analogy_question = line.strip().split() 47 | for w in analogy_question[:3]: 48 | if w not in iw: 49 | oov = 1 50 | if oov == 1: 51 | analogy[analogy_type]["total"] += 1 52 | continue 53 | analogy[analogy_type]["total"] += 1 54 | analogy[analogy_type]["seen"] += 1 55 | analogy[analogy_type]["questions"].append(analogy_question) 56 | 57 | for t in analogy: 58 | analogy[t]['iw'] = [] 59 | analogy[t]['wi'] = {} 60 | for question in analogy[t]["questions"]: 61 | for w in question: 62 | if w not in analogy[t]['iw']: 63 | analogy[t]['iw'].append(w) 64 | for i, w in enumerate(analogy[t]['iw']): 65 | analogy[t]['wi'][w] = i 66 | return analogy 67 | 68 | 69 | def normalize(matrix): 70 | norm = np.sqrt(np.sum(matrix * matrix, axis=1)) 71 | matrix = matrix / norm[:, np.newaxis] 72 | return matrix 73 | 74 | 75 | def guess(sims, analogy, analogy_type, iw, wi, word_a, word_b, word_c): 76 | sim_a = sims[analogy[analogy_type]["wi"][word_a]] 77 | sim_b = sims[analogy[analogy_type]["wi"][word_b]] 78 | sim_c = sims[analogy[analogy_type]["wi"][word_c]] 79 | 80 | add_sim = -sim_a+sim_b+sim_c 81 | add_sim[wi[word_a]] = 0 82 | add_sim[wi[word_b]] = 0 83 | add_sim[wi[word_c]] = 0 84 | guess_add = iw[np.nanargmax(add_sim)] 85 | 86 | mul_sim = sim_b * sim_c * np.reciprocal(sim_a+0.01) 87 | mul_sim[wi[word_a]] = 0 88 | mul_sim[wi[word_b]] = 0 89 | mul_sim[wi[word_c]] = 0 90 | guess_mul = iw[np.nanargmax(mul_sim)] 91 | return guess_add, guess_mul 92 | 93 | 94 | def main(): 95 | vectors_path = "embedding_sample/dense_small.txt" 96 | analogy_path = "CA8/morphological.txt" 97 | topn = 0 98 | results = {} # Records the results 99 | myParser = argparse.ArgumentParser() 100 | myParser.add_argument('-v', '--vectors', type=str, help="Vectors path") 101 | myParser.add_argument('-a', '--analogy', type=str, help="Analogy benchmark path") 102 | myParser.add_argument('-t', '--topn', type=int, help="Read top n word vectors") 103 | args = myParser.parse_args() 104 | if args.vectors: 105 | vectors_path = args.vectors 106 | if args.analogy: 107 | analogy_path = args.analogy 108 | if args.topn: 109 | topn = args.topn 110 | 111 | vectors, iw, wi, dim = read_vectors(vectors_path, topn) # Read top n word vectors. Read all vectors when topn is 0 112 | analogy = read_analogy(analogy_path, iw) # Read analogy questions 113 | 114 | # Turn vectors into numpy format and normalize them 115 | matrix = np.zeros(shape=(len(iw), dim), dtype=np.float32) 116 | for i, word in enumerate(iw): 117 | matrix[i, :] = vectors[word] 118 | matrix = normalize(matrix) 119 | 120 | for analogy_type in analogy.keys(): # Calculate the accuracy for each relation type 121 | correct_add_num, correct_mul_num = 0, 0 122 | analogy_matrix = matrix[[wi[w] if w in wi else random.randint(0, len(wi)-1) for w in analogy[analogy_type]["iw"]]] 123 | sims = analogy_matrix.dot(matrix.T) 124 | sims = (sims + 1)/2 # Transform similarity scores to positive numbers (for mul evaluation) 125 | for question in analogy[analogy_type]["questions"]: # Loop for each analogy question 126 | word_a, word_b, word_c, word_d = question 127 | guess_add, guess_mul = guess(sims, analogy, analogy_type, iw, wi, word_a, word_b, word_c) 128 | if guess_add == word_d: 129 | correct_add_num += 1 130 | if guess_mul == word_d: 131 | correct_mul_num += 1 132 | cov = float(analogy[analogy_type]["seen"]) / analogy[analogy_type]["total"] 133 | if analogy[analogy_type]["seen"] == 0: 134 | acc_add = 0 135 | acc_mul = 0 136 | print(analogy_type + " add/mul: " + str(round(0.0, 3)) + "/" + str(round(0.0, 3))) 137 | else: 138 | acc_add = float(correct_add_num) / analogy[analogy_type]["seen"] 139 | acc_mul = float(correct_mul_num) / analogy[analogy_type]["seen"] 140 | print(analogy_type + " add/mul: " + str(round(acc_add, 3)) + "/" + str(round(acc_mul, 3))) 141 | # Store the results 142 | results[analogy_type] = {} 143 | results[analogy_type]["coverage"] = [cov, analogy[analogy_type]["seen"], analogy[analogy_type]["total"]] 144 | results[analogy_type]["accuracy_add"] = [acc_add, correct_add_num, analogy[analogy_type]["seen"]] 145 | results[analogy_type]["accuracy_mul"] = [acc_mul, correct_mul_num, analogy[analogy_type]["seen"]] 146 | 147 | correct_add_num, correct_mul_num, seen = 0, 0, 0 148 | for analogy_type in results: 149 | correct_add_num += results[analogy_type]["accuracy_add"][1] 150 | correct_mul_num += results[analogy_type]["accuracy_mul"][1] 151 | seen += results[analogy_type]["coverage"][1] 152 | 153 | # print results 154 | if seen == 0: 155 | print("Total accuracy (add): " + str(round(0.0, 3))) 156 | print("Total accuracy (mul): " + str(round(0.0, 3))) 157 | else: 158 | print("Total accuracy (add): " + str(round(float(correct_add_num)/seen, 3))) 159 | print("Total accuracy (mul): " + str(round(float(correct_mul_num)/seen, 3))) 160 | 161 | 162 | if __name__ == '__main__': 163 | main() 164 | -------------------------------------------------------------------------------- /evaluation/ana_eval_sparse.py: -------------------------------------------------------------------------------- 1 | # We reuse a fraction of code in http://bitbucket.org/omerlevy/hyperwords. 2 | # Using the numpy and similarity matrix largely speed up the evaluation process, 3 | # compared with evaluation scripts in word2vec and GloVe 4 | 5 | import numpy as np 6 | import argparse 7 | import random 8 | from scipy.sparse import dok_matrix, csr_matrix 9 | 10 | 11 | def load_matrix(f_path): 12 | with open(f_path, errors='ignore') as f: 13 | row, col, data, iw = [], [], [], [] 14 | first_line = True 15 | lines_num = 0 16 | for line in f: 17 | if first_line: 18 | first_line = False 19 | words_num = int(line.rstrip().split()[0]) 20 | dim = int(line.rstrip().split()[1]) 21 | continue 22 | line = line.rstrip().split(' ') 23 | word = line[0] 24 | iw.append(word) 25 | vector = line[1:] 26 | for v in vector: 27 | row.append(lines_num) 28 | col.append(int(v.split(":")[0])) 29 | data.append(float(v.split(":")[1])) 30 | lines_num += 1 31 | wi = {} 32 | for i in range(len(iw)): 33 | wi[iw[i]] = i 34 | row = np.array(row) 35 | col = np.array(col) 36 | data = np.array(data) 37 | matrix = csr_matrix((data, (row, col)), shape=(words_num, dim)) 38 | return matrix, iw, wi 39 | 40 | 41 | def load_vocabulary(path): 42 | with open(path) as f: 43 | vocab = [line.strip().split()[0] for line in f if len(line) > 0] 44 | return dict([(a, i) for i, a in enumerate(vocab)]), vocab 45 | 46 | 47 | def read_analogy(path, iw): 48 | analogy = {} 49 | analogy_type = "" 50 | with open(path) as f: 51 | for line in f: 52 | oov = 0 53 | if line.strip().split()[0] == ':': 54 | analogy_type = line.strip().split()[1] 55 | analogy[analogy_type] = {} 56 | analogy[analogy_type]["questions"] = [] 57 | analogy[analogy_type]["total"] = 0 58 | analogy[analogy_type]["seen"] = 0 59 | continue 60 | analogy_question = line.strip().split() 61 | for w in analogy_question[:3]: 62 | if w not in iw: 63 | oov = 1 64 | if oov == 1: 65 | analogy[analogy_type]["total"] += 1 66 | continue 67 | analogy[analogy_type]["total"] += 1 68 | analogy[analogy_type]["seen"] += 1 69 | analogy[analogy_type]["questions"].append(analogy_question) 70 | 71 | for t in analogy: 72 | analogy[t]['iw'] = [] 73 | analogy[t]['wi'] = {} 74 | for question in analogy[t]["questions"]: 75 | for w in question: 76 | if w not in analogy[t]['iw']: 77 | analogy[t]['iw'].append(w) 78 | for i, w in enumerate(analogy[t]['iw']): 79 | analogy[t]['wi'][w] = i 80 | return analogy 81 | 82 | 83 | def normalize(matrix): 84 | matrix2 = matrix.copy() 85 | matrix2.data **= 2 86 | norm = np.reciprocal(np.sqrt(np.array(matrix2.sum(axis=1))[:, 0])) 87 | normalizer = dok_matrix((len(norm), len(norm))) 88 | normalizer.setdiag(norm) 89 | matrix = normalizer.tocsr().dot(matrix) 90 | return matrix 91 | 92 | 93 | def guess(sims, analogy, analogy_type, iw, wi, word_a, word_b, word_c): 94 | sim_a = sims[analogy[analogy_type]["wi"][word_a]] 95 | sim_b = sims[analogy[analogy_type]["wi"][word_b]] 96 | sim_c = sims[analogy[analogy_type]["wi"][word_c]] 97 | 98 | add_sim = -sim_a+sim_b+sim_c 99 | add_sim[wi[word_a]] = 0 100 | add_sim[wi[word_b]] = 0 101 | add_sim[wi[word_c]] = 0 102 | guess_add = iw[np.nanargmax(add_sim)] 103 | 104 | mul_sim = sim_b * sim_c * np.reciprocal(sim_a+0.01) 105 | mul_sim[wi[word_a]] = 0 106 | mul_sim[wi[word_b]] = 0 107 | mul_sim[wi[word_c]] = 0 108 | guess_mul = iw[np.nanargmax(mul_sim)] 109 | return guess_add, guess_mul 110 | 111 | 112 | def main(): 113 | neg = 1 114 | vectors_path = "embedding_sample/sparse_small.txt" 115 | analogy_path = "CA8/morphological.txt" 116 | results = {} 117 | 118 | myParser = argparse.ArgumentParser() 119 | myParser.add_argument('-v', '--vectors', type=str, help="Vectors path") 120 | myParser.add_argument('-a', '--analogy', type=str, help="Analogy benchmark path") 121 | args = myParser.parse_args() 122 | if args.vectors: 123 | vectors_path = args.vectors 124 | if args.analogy: 125 | analogy_path = args.analogy 126 | 127 | matrix, iw, wi = load_matrix(vectors_path) # Read matrix into the memory 128 | matrix = normalize(matrix) 129 | analogy = read_analogy(analogy_path, iw) 130 | for analogy_type in analogy.keys(): # Calculate the accuracy for each relation type 131 | correct_add_num, correct_mul_num = 0, 0 132 | analogy_matrix = matrix[[wi[w] if w in wi else random.randint(0, len(wi)-1) for w in analogy[analogy_type]["iw"]]] 133 | sims = analogy_matrix.dot(matrix.T) 134 | sims = np.array(sims.todense()) 135 | for question in analogy[analogy_type]["questions"]: # Loop for each analogy question 136 | word_a, word_b, word_c, word_d = question 137 | guess_add, guess_mul = guess(sims, analogy, analogy_type, iw, wi, word_a, word_b, word_c) 138 | if guess_add == word_d: 139 | correct_add_num += 1 140 | if guess_mul == word_d: 141 | correct_mul_num += 1 142 | cov = float(analogy[analogy_type]["seen"]) / analogy[analogy_type]["total"] 143 | if analogy[analogy_type]["seen"] == 0: 144 | acc_add = 0 145 | acc_mul = 0 146 | print (analogy_type + " add/mul: " + str(round(0.0, 3)) + "/" + str(round(0.0, 3))) 147 | else: 148 | acc_add = float(correct_add_num) / analogy[analogy_type]["seen"] 149 | acc_mul = float(correct_mul_num) / analogy[analogy_type]["seen"] 150 | print (analogy_type + " add/mul: " + str(round(acc_add, 3)) + "/" + str(round(acc_mul, 3))) 151 | # Store the results 152 | results[analogy_type] = {} 153 | results[analogy_type]["coverage"] = [cov, analogy[analogy_type]["seen"], analogy[analogy_type]["total"]] 154 | results[analogy_type]["accuracy_add"] = [acc_add, correct_add_num, analogy[analogy_type]["seen"]] 155 | results[analogy_type]["accuracy_mul"] = [acc_mul, correct_mul_num, analogy[analogy_type]["seen"]] 156 | 157 | correct_add_num, correct_mul_num, seen = 0, 0, 0 158 | for analogy_type in results: 159 | correct_add_num += results[analogy_type]["accuracy_add"][1] 160 | correct_mul_num += results[analogy_type]["accuracy_mul"][1] 161 | seen += results[analogy_type]["coverage"][1] 162 | 163 | # print results 164 | print("Total accuracy (add): " + str(round(float(correct_add_num)/seen, 3))) 165 | print("Total accuracy (mul): " + str(round(float(correct_mul_num)/seen, 3))) 166 | 167 | 168 | if __name__ == '__main__': 169 | main() 170 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /testsets/README.md: -------------------------------------------------------------------------------- 1 | # Chinese Word Analogy Benchmarks 2 | The quality of word vectors is often evaluated by analogy question tasks. In this project, two benchmarks are exploited for evaluation. The first is CA-translated ([Chen et al., 2015](#reference)), where most analogy questions are directly translated from English benchmark. Although CA-translated has been widely used in many Chinese word embedding papers, it only contains questions of three semantic questions and covers 134 Chinese words. In contrast, CA8 ([Li et al., 2018](#reference)) is specifically designed for Chinese language. It contains 17813 analogy questions and covers comprehensive morphological and semantic relations. 3 | 4 | ## CA8 5 | 6 | CA8 incorporates comprehensive morphological and semantic relations in Chinese. Specifically, CA8-morphological (CA8-Mor) contains 10177 morphological questions, which are constructed based on two types of relations: reduplication and semi-affixation. CA8-semantic (CA8-Sem) contains 7636 semantic questions, which can be divided into 4 categories and 28 sub-categories. Detailed description is as follows: 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 |
Morphological Questions: Reduplication
CategorySub-categoryPOSMorphological FunctionExample
AAANounForm kinship terms爸 (dad) → 爸爸 (dad)
Yield every / each meaning天 (day) → 天天 (everyday)
MeasureYield every / each meaning个 (-) → 个个 (every/each)
VerbSignal doing something a little bit说 (say) → 说说 (say a little)
Signal things happen briefly看 (look) → 看看 (have a brief look)
AdjectiveIntensify the adjective大 (big) → 大大 (very big)
Transform it to adverbs慢 (slow) → 慢慢 (slowly)
A yi AVerbSignal trying to do something吃 (eat) → 吃一吃 (try to eat)
A lai A quVerbSignal doing something repeatedly飞 (fly) → 飞来飞去 (fly around)
ABAABBNounYield many / much meaning山水 (mountain and river) → 山山水水 (many mountains and rivers)
VerbIndicate a continuous action说笑 (laugh and chat) → 说说笑笑 (laugh and chat for a while)
AdjectiveIntensify the adjective清楚 (clear) → 清清楚楚 (very clear)
Yield the meaning of not uniform大小 (size) → 大大小小 (all sizes)
AdverbIntensify the adverb彻底 (completely) → 彻彻底底 (totally and completely)
A li A BAdjectiveOralize the adjective and yield derogatory meaning慌张 (flurried) → 慌里慌张 (anxious)
ABABVerbSignal doing something a little bit注意 (pay attention) → 注意注意 (pay a little attention)
AdjectiveIntensify the adjective雪白 (white) → 雪白雪白 (very white)
Transform it to a verb高兴 (happy) → 高兴高兴 (make someone happy)
113 | 114 | Affixation is a morphological process whereby a bound morpheme (an affix) is attached to roots or stems to form new language units. Chinese is a typical isolating language that has few affixes. [Liu et al. (2001)](#reference) points out that although affixes are rare in Chinese, there are some components behaving like affixes and can also be used as independent lexemes. They are called semi-affixes. We follow their work and adopt this concept. 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 |
Morphological Questions: Semi-affixation
CategorySemi-affixExample
Semi-prefix一 (one) → 第一 (first)
一 (one) → 初一 (the first day of a lunar month)
一 (one) → 十一 (eleven)
一 (one) → 周一 (Monday)
星期一 (one) → 星期一 (Monday)
虎 (tiger) → 老虎 (tiger)
草 (grass) → 小草 (grass)
海 (sea) → 大海 (large sea)
导体 (conductor) → 半导体 (semiconductor)
细胞 (cell) → 单细胞 (unicell)
链接 (link) → 超链接 (hyperlink)
大陆 (continent) → 次大陆 (subcontinent)
常规 (conventional) → 非常规 (unconventional)
次 (time) → 每次 (every time)
明星 (star) → 全明星 (all star)
君子 (gentlemen) → 伪君子 (hypocrites)
热带 (tropical zone) → 亚热带 (sub-tropical zone)
酒 (wine) → 洋酒 (foreign wine)
比分 (score) → 总比分 (total score)
物质 (matter) → 反常规 (antimatter)
总统 (president) → 副总统 (vice president)
Semi-suffix我 (I) → 我们 (we)
这 (here) → 这里 (here)
这 (this) → 这些 (these)
这 (this) → 这样 (such)
这 (this) → 这个 (this one)
这 (this) → 这边 (here)
这 (this) → 这种 (this kind)
这 (this) → 这次 (this time)
这 (this) → 这儿 (here)
东 (east) → 东部 (east)
心 (heart) → 心中 (in the heart)
山 (mountain) → 山上 (on the mountain)
前 (front) → 前面 (in the front)
强 (strong) → 强者 (the strong one)
科学 (science) → 科学家 (scientist)
胖 (fat) → 胖子 (a fat man)
木 (wood) → 木头 (wood)
木 (wood) → 木工 (carpentry)
木 (wood) → 木匠 (carpenter)
笑 (laugh) → 笑星 (comedian)
老 (old) → 老手 (old hand)
主义乐观 (optimistic) → 乐观主义 (optimism)
吝啬 (stingy) → 吝啬鬼 (miser)
中 (Chinese) → 中式 (Chinese style)
考古 (archaeology) → 考古队 (archaeological team)
黄 (yellow) → 黄色 (the yellow color)
地质 (geology) → 地质学 (discipline of geology)
宿命 (fate) → 宿命论 (fatalism)
汽车 (bus) → 汽车站 (bus station)
光谱 (spectrum) → 光谱仪 (spectrograph)
学术 (academic) → 学术界 (academia)
追星 (chasing a star) → 追星族 (fans)
赌 (gamble) → 赌棍 (gambler)
雨 (rain) → 雨灾 (rain disaster)
冷 (cold) → 冷气 (cold air)
酸 (acid) → 酸性 (acidic)
歌 (song) → 歌厅 (KTV)
复印 (copy) → 复印机 (copier)
说 (say) → 说法 (saying)
粤 (Yue) → 粤剧 (Cantonese Opera)
船 (ship) → 船长 (captain of a ship)
377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 |
Semantic Questions
CategorySub-categoryExample
Geographycountry - capital中国 (China) - 北京 (Beijing)
country - currency中国 (China) - 人民币 (Chinese yuan)
province - abbreviation广东 (Guangdong) - 粤 (Yue)
province - capital广东 (Guangdong) - 广州 (Guangzhou)
province - drama广东 (Guangdong) - 粤剧 (Cantonese Opera)
province - channel广东 (Guangdong) - 广东卫视 (Guangdong Satellite TV)
province - university浙江 (Zhejiang) - 浙江大学 (Zhejiang University)
city - university南京 (Nanjing) - 南京大学 (Nanjing University)
university - abbreviation师范大学 (Normal University) - 师大 (Normal University)
Historydynasty - emperor汉 (Han) - 刘邦 (Liu Bang)
dynasty - capital秦 (Qin) - 咸阳 (Xian Yang)
title - emperor汉高祖 (Emperor Gaozu of Han) - 刘邦 (Liu Bang)
celebrity - country屈原 (Qu Yuan) - 楚国 (Country Chu)
Naturenumber第一 (first) - 状元 (the first in an imperial examination)
time春节 (Spring Festival) - 正月 (the first month in a lunar year)
animal公鸡 (cock) - 母鸡 (hen)
plant杏树 (apricot tree) - 杏 (apricot)
ornament手指 (finger) - 戒指 (ring)
chemistry盐 (salt) - 氯化钠 (sodium chloride)
physics冰 (ice) - 水蒸气 (steam)
weather小满 (Grain Full) - 夏天 (summer)
reverse松 (loose) - 紧 (tight)
color海 (sea) - 蓝色 (blue)
Peoplecompany - founder阿里巴巴 (Alibaba) - 马云 (Ma Yun)
work - scientist地动仪 (seismograph) - 张衡 (Zhang Heng)
work - writer朝花夕拾 (Dawn Blossoms Plucked at Dusk) - 鲁迅 (Lu Xun)
family - member爷爷 (grandfather) - 孙子 (grandson)
student - degree小学 (elementary school) - 小学生 (schoolchild)
507 | 508 | ## Reference 509 | Shen Li, Zhe Zhao, Renfen Hu, Wensi Li, Tao Liu, Xiaoyong Du, Analogical Reasoning on Chinese Morphological and Semantic Relations, ACL 2018. 510 | 511 | Xinxiong Chen, Lei Xu, Zhiyuan Liu, Maosong Sun, and Huanbo Luan. 2015. Joint learning of character and word embeddings. In IJCAI. pages 1236–1242. 512 | 513 | Yuehua Liu, Wenyu Pan, and Wei Gu. 2001. Practical grammar of modern Chinese. The Commercial Press. 514 | -------------------------------------------------------------------------------- /testsets/CA_translated/ca_translated.txt: -------------------------------------------------------------------------------- 1 | : capital-common-countries 2 | 雅典 希腊 巴格达 伊拉克 3 | 雅典 希腊 曼谷 泰国 4 | 雅典 希腊 北京 中国 5 | 雅典 希腊 柏林 德国 6 | 雅典 希腊 伯尔尼 瑞士 7 | 雅典 希腊 开罗 埃及 8 | 雅典 希腊 堪培拉 澳大利亚 9 | 雅典 希腊 河内 越南 10 | 雅典 希腊 哈瓦那 古巴 11 | 雅典 希腊 赫尔辛基 芬兰 12 | 雅典 希腊 伊斯兰堡 巴基斯坦 13 | 雅典 希腊 喀布尔 阿富汗 14 | 雅典 希腊 伦敦 英国 15 | 雅典 希腊 马德里 西班牙 16 | 雅典 希腊 莫斯科 俄罗斯 17 | 雅典 希腊 奥斯陆 挪威 18 | 雅典 希腊 渥太华 加拿大 19 | 雅典 希腊 巴黎 法国 20 | 雅典 希腊 罗马 意大利 21 | 雅典 希腊 斯德哥尔摩 瑞典 22 | 雅典 希腊 德黑兰 伊朗 23 | 雅典 希腊 东京 日本 24 | 巴格达 伊拉克 曼谷 泰国 25 | 巴格达 伊拉克 北京 中国 26 | 巴格达 伊拉克 柏林 德国 27 | 巴格达 伊拉克 伯尔尼 瑞士 28 | 巴格达 伊拉克 开罗 埃及 29 | 巴格达 伊拉克 堪培拉 澳大利亚 30 | 巴格达 伊拉克 河内 越南 31 | 巴格达 伊拉克 哈瓦那 古巴 32 | 巴格达 伊拉克 赫尔辛基 芬兰 33 | 巴格达 伊拉克 伊斯兰堡 巴基斯坦 34 | 巴格达 伊拉克 喀布尔 阿富汗 35 | 巴格达 伊拉克 伦敦 英国 36 | 巴格达 伊拉克 马德里 西班牙 37 | 巴格达 伊拉克 莫斯科 俄罗斯 38 | 巴格达 伊拉克 奥斯陆 挪威 39 | 巴格达 伊拉克 渥太华 加拿大 40 | 巴格达 伊拉克 巴黎 法国 41 | 巴格达 伊拉克 罗马 意大利 42 | 巴格达 伊拉克 斯德哥尔摩 瑞典 43 | 巴格达 伊拉克 德黑兰 伊朗 44 | 巴格达 伊拉克 东京 日本 45 | 巴格达 伊拉克 雅典 希腊 46 | 曼谷 泰国 北京 中国 47 | 曼谷 泰国 柏林 德国 48 | 曼谷 泰国 伯尔尼 瑞士 49 | 曼谷 泰国 开罗 埃及 50 | 曼谷 泰国 堪培拉 澳大利亚 51 | 曼谷 泰国 河内 越南 52 | 曼谷 泰国 哈瓦那 古巴 53 | 曼谷 泰国 赫尔辛基 芬兰 54 | 曼谷 泰国 伊斯兰堡 巴基斯坦 55 | 曼谷 泰国 喀布尔 阿富汗 56 | 曼谷 泰国 伦敦 英国 57 | 曼谷 泰国 马德里 西班牙 58 | 曼谷 泰国 莫斯科 俄罗斯 59 | 曼谷 泰国 奥斯陆 挪威 60 | 曼谷 泰国 渥太华 加拿大 61 | 曼谷 泰国 巴黎 法国 62 | 曼谷 泰国 罗马 意大利 63 | 曼谷 泰国 斯德哥尔摩 瑞典 64 | 曼谷 泰国 德黑兰 伊朗 65 | 曼谷 泰国 东京 日本 66 | 曼谷 泰国 雅典 希腊 67 | 曼谷 泰国 巴格达 伊拉克 68 | 北京 中国 柏林 德国 69 | 北京 中国 伯尔尼 瑞士 70 | 北京 中国 开罗 埃及 71 | 北京 中国 堪培拉 澳大利亚 72 | 北京 中国 河内 越南 73 | 北京 中国 哈瓦那 古巴 74 | 北京 中国 赫尔辛基 芬兰 75 | 北京 中国 伊斯兰堡 巴基斯坦 76 | 北京 中国 喀布尔 阿富汗 77 | 北京 中国 伦敦 英国 78 | 北京 中国 马德里 西班牙 79 | 北京 中国 莫斯科 俄罗斯 80 | 北京 中国 奥斯陆 挪威 81 | 北京 中国 渥太华 加拿大 82 | 北京 中国 巴黎 法国 83 | 北京 中国 罗马 意大利 84 | 北京 中国 斯德哥尔摩 瑞典 85 | 北京 中国 德黑兰 伊朗 86 | 北京 中国 东京 日本 87 | 北京 中国 雅典 希腊 88 | 北京 中国 巴格达 伊拉克 89 | 北京 中国 曼谷 泰国 90 | 柏林 德国 伯尔尼 瑞士 91 | 柏林 德国 开罗 埃及 92 | 柏林 德国 堪培拉 澳大利亚 93 | 柏林 德国 河内 越南 94 | 柏林 德国 哈瓦那 古巴 95 | 柏林 德国 赫尔辛基 芬兰 96 | 柏林 德国 伊斯兰堡 巴基斯坦 97 | 柏林 德国 喀布尔 阿富汗 98 | 柏林 德国 伦敦 英国 99 | 柏林 德国 马德里 西班牙 100 | 柏林 德国 莫斯科 俄罗斯 101 | 柏林 德国 奥斯陆 挪威 102 | 柏林 德国 渥太华 加拿大 103 | 柏林 德国 巴黎 法国 104 | 柏林 德国 罗马 意大利 105 | 柏林 德国 斯德哥尔摩 瑞典 106 | 柏林 德国 德黑兰 伊朗 107 | 柏林 德国 东京 日本 108 | 柏林 德国 雅典 希腊 109 | 柏林 德国 巴格达 伊拉克 110 | 柏林 德国 曼谷 泰国 111 | 柏林 德国 北京 中国 112 | 伯尔尼 瑞士 开罗 埃及 113 | 伯尔尼 瑞士 堪培拉 澳大利亚 114 | 伯尔尼 瑞士 河内 越南 115 | 伯尔尼 瑞士 哈瓦那 古巴 116 | 伯尔尼 瑞士 赫尔辛基 芬兰 117 | 伯尔尼 瑞士 伊斯兰堡 巴基斯坦 118 | 伯尔尼 瑞士 喀布尔 阿富汗 119 | 伯尔尼 瑞士 伦敦 英国 120 | 伯尔尼 瑞士 马德里 西班牙 121 | 伯尔尼 瑞士 莫斯科 俄罗斯 122 | 伯尔尼 瑞士 奥斯陆 挪威 123 | 伯尔尼 瑞士 渥太华 加拿大 124 | 伯尔尼 瑞士 巴黎 法国 125 | 伯尔尼 瑞士 罗马 意大利 126 | 伯尔尼 瑞士 斯德哥尔摩 瑞典 127 | 伯尔尼 瑞士 德黑兰 伊朗 128 | 伯尔尼 瑞士 东京 日本 129 | 伯尔尼 瑞士 雅典 希腊 130 | 伯尔尼 瑞士 巴格达 伊拉克 131 | 伯尔尼 瑞士 曼谷 泰国 132 | 伯尔尼 瑞士 北京 中国 133 | 伯尔尼 瑞士 柏林 德国 134 | 开罗 埃及 堪培拉 澳大利亚 135 | 开罗 埃及 河内 越南 136 | 开罗 埃及 哈瓦那 古巴 137 | 开罗 埃及 赫尔辛基 芬兰 138 | 开罗 埃及 伊斯兰堡 巴基斯坦 139 | 开罗 埃及 喀布尔 阿富汗 140 | 开罗 埃及 伦敦 英国 141 | 开罗 埃及 马德里 西班牙 142 | 开罗 埃及 莫斯科 俄罗斯 143 | 开罗 埃及 奥斯陆 挪威 144 | 开罗 埃及 渥太华 加拿大 145 | 开罗 埃及 巴黎 法国 146 | 开罗 埃及 罗马 意大利 147 | 开罗 埃及 斯德哥尔摩 瑞典 148 | 开罗 埃及 德黑兰 伊朗 149 | 开罗 埃及 东京 日本 150 | 开罗 埃及 雅典 希腊 151 | 开罗 埃及 巴格达 伊拉克 152 | 开罗 埃及 曼谷 泰国 153 | 开罗 埃及 北京 中国 154 | 开罗 埃及 柏林 德国 155 | 开罗 埃及 伯尔尼 瑞士 156 | 堪培拉 澳大利亚 河内 越南 157 | 堪培拉 澳大利亚 哈瓦那 古巴 158 | 堪培拉 澳大利亚 赫尔辛基 芬兰 159 | 堪培拉 澳大利亚 伊斯兰堡 巴基斯坦 160 | 堪培拉 澳大利亚 喀布尔 阿富汗 161 | 堪培拉 澳大利亚 伦敦 英国 162 | 堪培拉 澳大利亚 马德里 西班牙 163 | 堪培拉 澳大利亚 莫斯科 俄罗斯 164 | 堪培拉 澳大利亚 奥斯陆 挪威 165 | 堪培拉 澳大利亚 渥太华 加拿大 166 | 堪培拉 澳大利亚 巴黎 法国 167 | 堪培拉 澳大利亚 罗马 意大利 168 | 堪培拉 澳大利亚 斯德哥尔摩 瑞典 169 | 堪培拉 澳大利亚 德黑兰 伊朗 170 | 堪培拉 澳大利亚 东京 日本 171 | 堪培拉 澳大利亚 雅典 希腊 172 | 堪培拉 澳大利亚 巴格达 伊拉克 173 | 堪培拉 澳大利亚 曼谷 泰国 174 | 堪培拉 澳大利亚 北京 中国 175 | 堪培拉 澳大利亚 柏林 德国 176 | 堪培拉 澳大利亚 伯尔尼 瑞士 177 | 堪培拉 澳大利亚 开罗 埃及 178 | 河内 越南 哈瓦那 古巴 179 | 河内 越南 赫尔辛基 芬兰 180 | 河内 越南 伊斯兰堡 巴基斯坦 181 | 河内 越南 喀布尔 阿富汗 182 | 河内 越南 伦敦 英国 183 | 河内 越南 马德里 西班牙 184 | 河内 越南 莫斯科 俄罗斯 185 | 河内 越南 奥斯陆 挪威 186 | 河内 越南 渥太华 加拿大 187 | 河内 越南 巴黎 法国 188 | 河内 越南 罗马 意大利 189 | 河内 越南 斯德哥尔摩 瑞典 190 | 河内 越南 德黑兰 伊朗 191 | 河内 越南 东京 日本 192 | 河内 越南 雅典 希腊 193 | 河内 越南 巴格达 伊拉克 194 | 河内 越南 曼谷 泰国 195 | 河内 越南 北京 中国 196 | 河内 越南 柏林 德国 197 | 河内 越南 伯尔尼 瑞士 198 | 河内 越南 开罗 埃及 199 | 河内 越南 堪培拉 澳大利亚 200 | 哈瓦那 古巴 赫尔辛基 芬兰 201 | 哈瓦那 古巴 伊斯兰堡 巴基斯坦 202 | 哈瓦那 古巴 喀布尔 阿富汗 203 | 哈瓦那 古巴 伦敦 英国 204 | 哈瓦那 古巴 马德里 西班牙 205 | 哈瓦那 古巴 莫斯科 俄罗斯 206 | 哈瓦那 古巴 奥斯陆 挪威 207 | 哈瓦那 古巴 渥太华 加拿大 208 | 哈瓦那 古巴 巴黎 法国 209 | 哈瓦那 古巴 罗马 意大利 210 | 哈瓦那 古巴 斯德哥尔摩 瑞典 211 | 哈瓦那 古巴 德黑兰 伊朗 212 | 哈瓦那 古巴 东京 日本 213 | 哈瓦那 古巴 雅典 希腊 214 | 哈瓦那 古巴 巴格达 伊拉克 215 | 哈瓦那 古巴 曼谷 泰国 216 | 哈瓦那 古巴 北京 中国 217 | 哈瓦那 古巴 柏林 德国 218 | 哈瓦那 古巴 伯尔尼 瑞士 219 | 哈瓦那 古巴 开罗 埃及 220 | 哈瓦那 古巴 堪培拉 澳大利亚 221 | 哈瓦那 古巴 河内 越南 222 | 赫尔辛基 芬兰 伊斯兰堡 巴基斯坦 223 | 赫尔辛基 芬兰 喀布尔 阿富汗 224 | 赫尔辛基 芬兰 伦敦 英国 225 | 赫尔辛基 芬兰 马德里 西班牙 226 | 赫尔辛基 芬兰 莫斯科 俄罗斯 227 | 赫尔辛基 芬兰 奥斯陆 挪威 228 | 赫尔辛基 芬兰 渥太华 加拿大 229 | 赫尔辛基 芬兰 巴黎 法国 230 | 赫尔辛基 芬兰 罗马 意大利 231 | 赫尔辛基 芬兰 斯德哥尔摩 瑞典 232 | 赫尔辛基 芬兰 德黑兰 伊朗 233 | 赫尔辛基 芬兰 东京 日本 234 | 赫尔辛基 芬兰 雅典 希腊 235 | 赫尔辛基 芬兰 巴格达 伊拉克 236 | 赫尔辛基 芬兰 曼谷 泰国 237 | 赫尔辛基 芬兰 北京 中国 238 | 赫尔辛基 芬兰 柏林 德国 239 | 赫尔辛基 芬兰 伯尔尼 瑞士 240 | 赫尔辛基 芬兰 开罗 埃及 241 | 赫尔辛基 芬兰 堪培拉 澳大利亚 242 | 赫尔辛基 芬兰 河内 越南 243 | 赫尔辛基 芬兰 哈瓦那 古巴 244 | 伊斯兰堡 巴基斯坦 喀布尔 阿富汗 245 | 伊斯兰堡 巴基斯坦 伦敦 英国 246 | 伊斯兰堡 巴基斯坦 马德里 西班牙 247 | 伊斯兰堡 巴基斯坦 莫斯科 俄罗斯 248 | 伊斯兰堡 巴基斯坦 奥斯陆 挪威 249 | 伊斯兰堡 巴基斯坦 渥太华 加拿大 250 | 伊斯兰堡 巴基斯坦 巴黎 法国 251 | 伊斯兰堡 巴基斯坦 罗马 意大利 252 | 伊斯兰堡 巴基斯坦 斯德哥尔摩 瑞典 253 | 伊斯兰堡 巴基斯坦 德黑兰 伊朗 254 | 伊斯兰堡 巴基斯坦 东京 日本 255 | 伊斯兰堡 巴基斯坦 雅典 希腊 256 | 伊斯兰堡 巴基斯坦 巴格达 伊拉克 257 | 伊斯兰堡 巴基斯坦 曼谷 泰国 258 | 伊斯兰堡 巴基斯坦 北京 中国 259 | 伊斯兰堡 巴基斯坦 柏林 德国 260 | 伊斯兰堡 巴基斯坦 伯尔尼 瑞士 261 | 伊斯兰堡 巴基斯坦 开罗 埃及 262 | 伊斯兰堡 巴基斯坦 堪培拉 澳大利亚 263 | 伊斯兰堡 巴基斯坦 河内 越南 264 | 伊斯兰堡 巴基斯坦 哈瓦那 古巴 265 | 伊斯兰堡 巴基斯坦 赫尔辛基 芬兰 266 | 喀布尔 阿富汗 伦敦 英国 267 | 喀布尔 阿富汗 马德里 西班牙 268 | 喀布尔 阿富汗 莫斯科 俄罗斯 269 | 喀布尔 阿富汗 奥斯陆 挪威 270 | 喀布尔 阿富汗 渥太华 加拿大 271 | 喀布尔 阿富汗 巴黎 法国 272 | 喀布尔 阿富汗 罗马 意大利 273 | 喀布尔 阿富汗 斯德哥尔摩 瑞典 274 | 喀布尔 阿富汗 德黑兰 伊朗 275 | 喀布尔 阿富汗 东京 日本 276 | 喀布尔 阿富汗 雅典 希腊 277 | 喀布尔 阿富汗 巴格达 伊拉克 278 | 喀布尔 阿富汗 曼谷 泰国 279 | 喀布尔 阿富汗 北京 中国 280 | 喀布尔 阿富汗 柏林 德国 281 | 喀布尔 阿富汗 伯尔尼 瑞士 282 | 喀布尔 阿富汗 开罗 埃及 283 | 喀布尔 阿富汗 堪培拉 澳大利亚 284 | 喀布尔 阿富汗 河内 越南 285 | 喀布尔 阿富汗 哈瓦那 古巴 286 | 喀布尔 阿富汗 赫尔辛基 芬兰 287 | 喀布尔 阿富汗 伊斯兰堡 巴基斯坦 288 | 伦敦 英国 马德里 西班牙 289 | 伦敦 英国 莫斯科 俄罗斯 290 | 伦敦 英国 奥斯陆 挪威 291 | 伦敦 英国 渥太华 加拿大 292 | 伦敦 英国 巴黎 法国 293 | 伦敦 英国 罗马 意大利 294 | 伦敦 英国 斯德哥尔摩 瑞典 295 | 伦敦 英国 德黑兰 伊朗 296 | 伦敦 英国 东京 日本 297 | 伦敦 英国 雅典 希腊 298 | 伦敦 英国 巴格达 伊拉克 299 | 伦敦 英国 曼谷 泰国 300 | 伦敦 英国 北京 中国 301 | 伦敦 英国 柏林 德国 302 | 伦敦 英国 伯尔尼 瑞士 303 | 伦敦 英国 开罗 埃及 304 | 伦敦 英国 堪培拉 澳大利亚 305 | 伦敦 英国 河内 越南 306 | 伦敦 英国 哈瓦那 古巴 307 | 伦敦 英国 赫尔辛基 芬兰 308 | 伦敦 英国 伊斯兰堡 巴基斯坦 309 | 伦敦 英国 喀布尔 阿富汗 310 | 马德里 西班牙 莫斯科 俄罗斯 311 | 马德里 西班牙 奥斯陆 挪威 312 | 马德里 西班牙 渥太华 加拿大 313 | 马德里 西班牙 巴黎 法国 314 | 马德里 西班牙 罗马 意大利 315 | 马德里 西班牙 斯德哥尔摩 瑞典 316 | 马德里 西班牙 德黑兰 伊朗 317 | 马德里 西班牙 东京 日本 318 | 马德里 西班牙 雅典 希腊 319 | 马德里 西班牙 巴格达 伊拉克 320 | 马德里 西班牙 曼谷 泰国 321 | 马德里 西班牙 北京 中国 322 | 马德里 西班牙 柏林 德国 323 | 马德里 西班牙 伯尔尼 瑞士 324 | 马德里 西班牙 开罗 埃及 325 | 马德里 西班牙 堪培拉 澳大利亚 326 | 马德里 西班牙 河内 越南 327 | 马德里 西班牙 哈瓦那 古巴 328 | 马德里 西班牙 赫尔辛基 芬兰 329 | 马德里 西班牙 伊斯兰堡 巴基斯坦 330 | 马德里 西班牙 喀布尔 阿富汗 331 | 马德里 西班牙 伦敦 英国 332 | 莫斯科 俄罗斯 奥斯陆 挪威 333 | 莫斯科 俄罗斯 渥太华 加拿大 334 | 莫斯科 俄罗斯 巴黎 法国 335 | 莫斯科 俄罗斯 罗马 意大利 336 | 莫斯科 俄罗斯 斯德哥尔摩 瑞典 337 | 莫斯科 俄罗斯 德黑兰 伊朗 338 | 莫斯科 俄罗斯 东京 日本 339 | 莫斯科 俄罗斯 雅典 希腊 340 | 莫斯科 俄罗斯 巴格达 伊拉克 341 | 莫斯科 俄罗斯 曼谷 泰国 342 | 莫斯科 俄罗斯 北京 中国 343 | 莫斯科 俄罗斯 柏林 德国 344 | 莫斯科 俄罗斯 伯尔尼 瑞士 345 | 莫斯科 俄罗斯 开罗 埃及 346 | 莫斯科 俄罗斯 堪培拉 澳大利亚 347 | 莫斯科 俄罗斯 河内 越南 348 | 莫斯科 俄罗斯 哈瓦那 古巴 349 | 莫斯科 俄罗斯 赫尔辛基 芬兰 350 | 莫斯科 俄罗斯 伊斯兰堡 巴基斯坦 351 | 莫斯科 俄罗斯 喀布尔 阿富汗 352 | 莫斯科 俄罗斯 伦敦 英国 353 | 莫斯科 俄罗斯 马德里 西班牙 354 | 奥斯陆 挪威 渥太华 加拿大 355 | 奥斯陆 挪威 巴黎 法国 356 | 奥斯陆 挪威 罗马 意大利 357 | 奥斯陆 挪威 斯德哥尔摩 瑞典 358 | 奥斯陆 挪威 德黑兰 伊朗 359 | 奥斯陆 挪威 东京 日本 360 | 奥斯陆 挪威 雅典 希腊 361 | 奥斯陆 挪威 巴格达 伊拉克 362 | 奥斯陆 挪威 曼谷 泰国 363 | 奥斯陆 挪威 北京 中国 364 | 奥斯陆 挪威 柏林 德国 365 | 奥斯陆 挪威 伯尔尼 瑞士 366 | 奥斯陆 挪威 开罗 埃及 367 | 奥斯陆 挪威 堪培拉 澳大利亚 368 | 奥斯陆 挪威 河内 越南 369 | 奥斯陆 挪威 哈瓦那 古巴 370 | 奥斯陆 挪威 赫尔辛基 芬兰 371 | 奥斯陆 挪威 伊斯兰堡 巴基斯坦 372 | 奥斯陆 挪威 喀布尔 阿富汗 373 | 奥斯陆 挪威 伦敦 英国 374 | 奥斯陆 挪威 马德里 西班牙 375 | 奥斯陆 挪威 莫斯科 俄罗斯 376 | 渥太华 加拿大 巴黎 法国 377 | 渥太华 加拿大 罗马 意大利 378 | 渥太华 加拿大 斯德哥尔摩 瑞典 379 | 渥太华 加拿大 德黑兰 伊朗 380 | 渥太华 加拿大 东京 日本 381 | 渥太华 加拿大 雅典 希腊 382 | 渥太华 加拿大 巴格达 伊拉克 383 | 渥太华 加拿大 曼谷 泰国 384 | 渥太华 加拿大 北京 中国 385 | 渥太华 加拿大 柏林 德国 386 | 渥太华 加拿大 伯尔尼 瑞士 387 | 渥太华 加拿大 开罗 埃及 388 | 渥太华 加拿大 堪培拉 澳大利亚 389 | 渥太华 加拿大 河内 越南 390 | 渥太华 加拿大 哈瓦那 古巴 391 | 渥太华 加拿大 赫尔辛基 芬兰 392 | 渥太华 加拿大 伊斯兰堡 巴基斯坦 393 | 渥太华 加拿大 喀布尔 阿富汗 394 | 渥太华 加拿大 伦敦 英国 395 | 渥太华 加拿大 马德里 西班牙 396 | 渥太华 加拿大 莫斯科 俄罗斯 397 | 渥太华 加拿大 奥斯陆 挪威 398 | 巴黎 法国 罗马 意大利 399 | 巴黎 法国 斯德哥尔摩 瑞典 400 | 巴黎 法国 德黑兰 伊朗 401 | 巴黎 法国 东京 日本 402 | 巴黎 法国 雅典 希腊 403 | 巴黎 法国 巴格达 伊拉克 404 | 巴黎 法国 曼谷 泰国 405 | 巴黎 法国 北京 中国 406 | 巴黎 法国 柏林 德国 407 | 巴黎 法国 伯尔尼 瑞士 408 | 巴黎 法国 开罗 埃及 409 | 巴黎 法国 堪培拉 澳大利亚 410 | 巴黎 法国 河内 越南 411 | 巴黎 法国 哈瓦那 古巴 412 | 巴黎 法国 赫尔辛基 芬兰 413 | 巴黎 法国 伊斯兰堡 巴基斯坦 414 | 巴黎 法国 喀布尔 阿富汗 415 | 巴黎 法国 伦敦 英国 416 | 巴黎 法国 马德里 西班牙 417 | 巴黎 法国 莫斯科 俄罗斯 418 | 巴黎 法国 奥斯陆 挪威 419 | 巴黎 法国 渥太华 加拿大 420 | 罗马 意大利 斯德哥尔摩 瑞典 421 | 罗马 意大利 德黑兰 伊朗 422 | 罗马 意大利 东京 日本 423 | 罗马 意大利 雅典 希腊 424 | 罗马 意大利 巴格达 伊拉克 425 | 罗马 意大利 曼谷 泰国 426 | 罗马 意大利 北京 中国 427 | 罗马 意大利 柏林 德国 428 | 罗马 意大利 伯尔尼 瑞士 429 | 罗马 意大利 开罗 埃及 430 | 罗马 意大利 堪培拉 澳大利亚 431 | 罗马 意大利 河内 越南 432 | 罗马 意大利 哈瓦那 古巴 433 | 罗马 意大利 赫尔辛基 芬兰 434 | 罗马 意大利 伊斯兰堡 巴基斯坦 435 | 罗马 意大利 喀布尔 阿富汗 436 | 罗马 意大利 伦敦 英国 437 | 罗马 意大利 马德里 西班牙 438 | 罗马 意大利 莫斯科 俄罗斯 439 | 罗马 意大利 奥斯陆 挪威 440 | 罗马 意大利 渥太华 加拿大 441 | 罗马 意大利 巴黎 法国 442 | 斯德哥尔摩 瑞典 德黑兰 伊朗 443 | 斯德哥尔摩 瑞典 东京 日本 444 | 斯德哥尔摩 瑞典 雅典 希腊 445 | 斯德哥尔摩 瑞典 巴格达 伊拉克 446 | 斯德哥尔摩 瑞典 曼谷 泰国 447 | 斯德哥尔摩 瑞典 北京 中国 448 | 斯德哥尔摩 瑞典 柏林 德国 449 | 斯德哥尔摩 瑞典 伯尔尼 瑞士 450 | 斯德哥尔摩 瑞典 开罗 埃及 451 | 斯德哥尔摩 瑞典 堪培拉 澳大利亚 452 | 斯德哥尔摩 瑞典 河内 越南 453 | 斯德哥尔摩 瑞典 哈瓦那 古巴 454 | 斯德哥尔摩 瑞典 赫尔辛基 芬兰 455 | 斯德哥尔摩 瑞典 伊斯兰堡 巴基斯坦 456 | 斯德哥尔摩 瑞典 喀布尔 阿富汗 457 | 斯德哥尔摩 瑞典 伦敦 英国 458 | 斯德哥尔摩 瑞典 马德里 西班牙 459 | 斯德哥尔摩 瑞典 莫斯科 俄罗斯 460 | 斯德哥尔摩 瑞典 奥斯陆 挪威 461 | 斯德哥尔摩 瑞典 渥太华 加拿大 462 | 斯德哥尔摩 瑞典 巴黎 法国 463 | 斯德哥尔摩 瑞典 罗马 意大利 464 | 德黑兰 伊朗 东京 日本 465 | 德黑兰 伊朗 雅典 希腊 466 | 德黑兰 伊朗 巴格达 伊拉克 467 | 德黑兰 伊朗 曼谷 泰国 468 | 德黑兰 伊朗 北京 中国 469 | 德黑兰 伊朗 柏林 德国 470 | 德黑兰 伊朗 伯尔尼 瑞士 471 | 德黑兰 伊朗 开罗 埃及 472 | 德黑兰 伊朗 堪培拉 澳大利亚 473 | 德黑兰 伊朗 河内 越南 474 | 德黑兰 伊朗 哈瓦那 古巴 475 | 德黑兰 伊朗 赫尔辛基 芬兰 476 | 德黑兰 伊朗 伊斯兰堡 巴基斯坦 477 | 德黑兰 伊朗 喀布尔 阿富汗 478 | 德黑兰 伊朗 伦敦 英国 479 | 德黑兰 伊朗 马德里 西班牙 480 | 德黑兰 伊朗 莫斯科 俄罗斯 481 | 德黑兰 伊朗 奥斯陆 挪威 482 | 德黑兰 伊朗 渥太华 加拿大 483 | 德黑兰 伊朗 巴黎 法国 484 | 德黑兰 伊朗 罗马 意大利 485 | 德黑兰 伊朗 斯德哥尔摩 瑞典 486 | 东京 日本 雅典 希腊 487 | 东京 日本 巴格达 伊拉克 488 | 东京 日本 曼谷 泰国 489 | 东京 日本 北京 中国 490 | 东京 日本 柏林 德国 491 | 东京 日本 伯尔尼 瑞士 492 | 东京 日本 开罗 埃及 493 | 东京 日本 堪培拉 澳大利亚 494 | 东京 日本 河内 越南 495 | 东京 日本 哈瓦那 古巴 496 | 东京 日本 赫尔辛基 芬兰 497 | 东京 日本 伊斯兰堡 巴基斯坦 498 | 东京 日本 喀布尔 阿富汗 499 | 东京 日本 伦敦 英国 500 | 东京 日本 马德里 西班牙 501 | 东京 日本 莫斯科 俄罗斯 502 | 东京 日本 奥斯陆 挪威 503 | 东京 日本 渥太华 加拿大 504 | 东京 日本 巴黎 法国 505 | 东京 日本 罗马 意大利 506 | 东京 日本 斯德哥尔摩 瑞典 507 | 东京 日本 德黑兰 伊朗 508 | : city-in-state 509 | 石家庄 河北 南昌 江西 510 | 石家庄 河北 海口 海南 511 | 石家庄 河北 兰州 甘肃 512 | 石家庄 河北 西宁 青海 513 | 太原 山西 南昌 江西 514 | 太原 山西 广州 广东 515 | 太原 山西 西宁 青海 516 | 沈阳 辽宁 哈尔滨 黑龙江 517 | 沈阳 辽宁 杭州 浙江 518 | 沈阳 辽宁 南昌 江西 519 | 沈阳 辽宁 贵阳 贵州 520 | 沈阳 辽宁 兰州 甘肃 521 | 沈阳 辽宁 南宁 广西 522 | 沈阳 辽宁 银川 宁夏 523 | 长春 吉林 石家庄 河北 524 | 长春 吉林 哈尔滨 黑龙江 525 | 长春 吉林 南京 江苏 526 | 长春 吉林 杭州 浙江 527 | 长春 吉林 合肥 安徽 528 | 长春 吉林 南昌 江西 529 | 长春 吉林 广州 广东 530 | 长春 吉林 贵阳 贵州 531 | 长春 吉林 西安 陕西 532 | 长春 吉林 呼和浩特 内蒙古 533 | 哈尔滨 黑龙江 南京 江苏 534 | 哈尔滨 黑龙江 南昌 江西 535 | 哈尔滨 黑龙江 贵阳 贵州 536 | 哈尔滨 黑龙江 昆明 云南 537 | 哈尔滨 黑龙江 南宁 广西 538 | 南京 江苏 杭州 浙江 539 | 南京 江苏 合肥 安徽 540 | 南京 江苏 福州 福建 541 | 南京 江苏 郑州 河南 542 | 南京 江苏 广州 广东 543 | 南京 江苏 成都 四川 544 | 南京 江苏 贵阳 贵州 545 | 南京 江苏 西安 陕西 546 | 南京 江苏 呼和浩特 内蒙古 547 | 杭州 浙江 广州 广东 548 | 杭州 浙江 海口 海南 549 | 杭州 浙江 西宁 青海 550 | 杭州 浙江 南宁 广西 551 | 合肥 安徽 太原 山西 552 | 合肥 安徽 沈阳 辽宁 553 | 合肥 安徽 长春 吉林 554 | 合肥 安徽 杭州 浙江 555 | 合肥 安徽 成都 四川 556 | 合肥 安徽 兰州 甘肃 557 | 福州 福建 石家庄 河北 558 | 福州 福建 南昌 江西 559 | 福州 福建 郑州 河南 560 | 福州 福建 贵阳 贵州 561 | 福州 福建 昆明 云南 562 | 福州 福建 乌鲁木齐 新疆 563 | 南昌 江西 长春 吉林 564 | 南昌 江西 福州 福建 565 | 南昌 江西 海口 海南 566 | 南昌 江西 银川 宁夏 567 | 济南 山东 太原 山西 568 | 济南 山东 杭州 浙江 569 | 济南 山东 合肥 安徽 570 | 济南 山东 长沙 湖南 571 | 济南 山东 海口 海南 572 | 济南 山东 贵阳 贵州 573 | 济南 山东 西安 陕西 574 | 郑州 河南 长春 吉林 575 | 郑州 河南 福州 福建 576 | 郑州 河南 武汉 湖北 577 | 郑州 河南 长沙 湖南 578 | 郑州 河南 成都 四川 579 | 郑州 河南 昆明 云南 580 | 郑州 河南 兰州 甘肃 581 | 郑州 河南 银川 宁夏 582 | 武汉 湖北 沈阳 辽宁 583 | 武汉 湖北 杭州 浙江 584 | 武汉 湖北 西安 陕西 585 | 武汉 湖北 兰州 甘肃 586 | 武汉 湖北 西宁 青海 587 | 武汉 湖北 拉萨 西藏 588 | 武汉 湖北 银川 宁夏 589 | 长沙 湖南 合肥 安徽 590 | 长沙 湖南 济南 山东 591 | 长沙 湖南 广州 广东 592 | 长沙 湖南 拉萨 西藏 593 | 广州 广东 石家庄 河北 594 | 广州 广东 沈阳 辽宁 595 | 广州 广东 南京 江苏 596 | 广州 广东 杭州 浙江 597 | 广州 广东 福州 福建 598 | 广州 广东 南昌 江西 599 | 广州 广东 济南 山东 600 | 广州 广东 拉萨 西藏 601 | 广州 广东 呼和浩特 内蒙古 602 | 海口 海南 南京 江苏 603 | 海口 海南 济南 山东 604 | 海口 海南 武汉 湖北 605 | 海口 海南 长沙 湖南 606 | 海口 海南 西安 陕西 607 | 成都 四川 太原 山西 608 | 成都 四川 哈尔滨 黑龙江 609 | 成都 四川 南京 江苏 610 | 成都 四川 杭州 浙江 611 | 成都 四川 长沙 湖南 612 | 成都 四川 兰州 甘肃 613 | 成都 四川 南宁 广西 614 | 成都 四川 呼和浩特 内蒙古 615 | 成都 四川 银川 宁夏 616 | 贵阳 贵州 石家庄 河北 617 | 贵阳 贵州 太原 山西 618 | 贵阳 贵州 哈尔滨 黑龙江 619 | 贵阳 贵州 南昌 江西 620 | 贵阳 贵州 济南 山东 621 | 贵阳 贵州 广州 广东 622 | 贵阳 贵州 西安 陕西 623 | 贵阳 贵州 拉萨 西藏 624 | 昆明 云南 长春 吉林 625 | 昆明 云南 杭州 浙江 626 | 昆明 云南 合肥 安徽 627 | 昆明 云南 济南 山东 628 | 昆明 云南 武汉 湖北 629 | 昆明 云南 广州 广东 630 | 昆明 云南 兰州 甘肃 631 | 昆明 云南 西宁 青海 632 | 昆明 云南 呼和浩特 内蒙古 633 | 昆明 云南 乌鲁木齐 新疆 634 | 西安 陕西 石家庄 河北 635 | 西安 陕西 哈尔滨 黑龙江 636 | 西安 陕西 南京 江苏 637 | 西安 陕西 武汉 湖北 638 | 西安 陕西 海口 海南 639 | 西安 陕西 贵阳 贵州 640 | 西安 陕西 呼和浩特 内蒙古 641 | 兰州 甘肃 武汉 湖北 642 | 兰州 甘肃 海口 海南 643 | 兰州 甘肃 西宁 青海 644 | 兰州 甘肃 拉萨 西藏 645 | 兰州 甘肃 南宁 广西 646 | 兰州 甘肃 呼和浩特 内蒙古 647 | 兰州 甘肃 银川 宁夏 648 | 西宁 青海 哈尔滨 黑龙江 649 | 西宁 青海 南京 江苏 650 | 西宁 青海 杭州 浙江 651 | 西宁 青海 济南 山东 652 | 西宁 青海 成都 四川 653 | 西宁 青海 贵阳 贵州 654 | 西宁 青海 南宁 广西 655 | 西宁 青海 银川 宁夏 656 | 拉萨 西藏 石家庄 河北 657 | 拉萨 西藏 哈尔滨 黑龙江 658 | 拉萨 西藏 福州 福建 659 | 拉萨 西藏 郑州 河南 660 | 拉萨 西藏 长沙 湖南 661 | 拉萨 西藏 贵阳 贵州 662 | 拉萨 西藏 西宁 青海 663 | 南宁 广西 杭州 浙江 664 | 南宁 广西 福州 福建 665 | 南宁 广西 南昌 江西 666 | 南宁 广西 成都 四川 667 | 南宁 广西 昆明 云南 668 | 呼和浩特 内蒙古 太原 山西 669 | 呼和浩特 内蒙古 昆明 云南 670 | 呼和浩特 内蒙古 西安 陕西 671 | 呼和浩特 内蒙古 兰州 甘肃 672 | 呼和浩特 内蒙古 拉萨 西藏 673 | 银川 宁夏 福州 福建 674 | 银川 宁夏 拉萨 西藏 675 | 乌鲁木齐 新疆 石家庄 河北 676 | 乌鲁木齐 新疆 沈阳 辽宁 677 | 乌鲁木齐 新疆 哈尔滨 黑龙江 678 | 乌鲁木齐 新疆 合肥 安徽 679 | 乌鲁木齐 新疆 广州 广东 680 | 乌鲁木齐 新疆 成都 四川 681 | 乌鲁木齐 新疆 西安 陕西 682 | 乌鲁木齐 新疆 兰州 甘肃 683 | 乌鲁木齐 新疆 南宁 广西 684 | : family 685 | 男孩 女孩 兄弟 姐妹 686 | 男孩 女孩 爸爸 妈妈 687 | 男孩 女孩 父亲 母亲 688 | 男孩 女孩 祖父 祖母 689 | 男孩 女孩 爷爷 奶奶 690 | 男孩 女孩 孙子 孙女 691 | 男孩 女孩 新郎 新娘 692 | 男孩 女孩 丈夫 妻子 693 | 男孩 女孩 国王 王后 694 | 男孩 女孩 男人 女人 695 | 男孩 女孩 侄子 侄女 696 | 男孩 女孩 王子 公主 697 | 男孩 女孩 儿子 女儿 698 | 男孩 女孩 继父 继母 699 | 男孩 女孩 继子 继女 700 | 男孩 女孩 叔叔 阿姨 701 | 兄弟 姐妹 爸爸 妈妈 702 | 兄弟 姐妹 父亲 母亲 703 | 兄弟 姐妹 祖父 祖母 704 | 兄弟 姐妹 爷爷 奶奶 705 | 兄弟 姐妹 孙子 孙女 706 | 兄弟 姐妹 新郎 新娘 707 | 兄弟 姐妹 丈夫 妻子 708 | 兄弟 姐妹 国王 王后 709 | 兄弟 姐妹 男人 女人 710 | 兄弟 姐妹 侄子 侄女 711 | 兄弟 姐妹 王子 公主 712 | 兄弟 姐妹 儿子 女儿 713 | 兄弟 姐妹 继父 继母 714 | 兄弟 姐妹 继子 继女 715 | 兄弟 姐妹 叔叔 阿姨 716 | 兄弟 姐妹 男孩 女孩 717 | 爸爸 妈妈 父亲 母亲 718 | 爸爸 妈妈 祖父 祖母 719 | 爸爸 妈妈 爷爷 奶奶 720 | 爸爸 妈妈 孙子 孙女 721 | 爸爸 妈妈 新郎 新娘 722 | 爸爸 妈妈 丈夫 妻子 723 | 爸爸 妈妈 国王 王后 724 | 爸爸 妈妈 男人 女人 725 | 爸爸 妈妈 侄子 侄女 726 | 爸爸 妈妈 王子 公主 727 | 爸爸 妈妈 儿子 女儿 728 | 爸爸 妈妈 继父 继母 729 | 爸爸 妈妈 继子 继女 730 | 爸爸 妈妈 叔叔 阿姨 731 | 爸爸 妈妈 男孩 女孩 732 | 爸爸 妈妈 兄弟 姐妹 733 | 父亲 母亲 祖父 祖母 734 | 父亲 母亲 爷爷 奶奶 735 | 父亲 母亲 孙子 孙女 736 | 父亲 母亲 新郎 新娘 737 | 父亲 母亲 丈夫 妻子 738 | 父亲 母亲 国王 王后 739 | 父亲 母亲 男人 女人 740 | 父亲 母亲 侄子 侄女 741 | 父亲 母亲 王子 公主 742 | 父亲 母亲 儿子 女儿 743 | 父亲 母亲 继父 继母 744 | 父亲 母亲 继子 继女 745 | 父亲 母亲 叔叔 阿姨 746 | 父亲 母亲 男孩 女孩 747 | 父亲 母亲 兄弟 姐妹 748 | 父亲 母亲 爸爸 妈妈 749 | 祖父 祖母 爷爷 奶奶 750 | 祖父 祖母 孙子 孙女 751 | 祖父 祖母 新郎 新娘 752 | 祖父 祖母 丈夫 妻子 753 | 祖父 祖母 国王 王后 754 | 祖父 祖母 男人 女人 755 | 祖父 祖母 侄子 侄女 756 | 祖父 祖母 王子 公主 757 | 祖父 祖母 儿子 女儿 758 | 祖父 祖母 继父 继母 759 | 祖父 祖母 继子 继女 760 | 祖父 祖母 叔叔 阿姨 761 | 祖父 祖母 男孩 女孩 762 | 祖父 祖母 兄弟 姐妹 763 | 祖父 祖母 爸爸 妈妈 764 | 祖父 祖母 父亲 母亲 765 | 爷爷 奶奶 孙子 孙女 766 | 爷爷 奶奶 新郎 新娘 767 | 爷爷 奶奶 丈夫 妻子 768 | 爷爷 奶奶 国王 王后 769 | 爷爷 奶奶 男人 女人 770 | 爷爷 奶奶 侄子 侄女 771 | 爷爷 奶奶 王子 公主 772 | 爷爷 奶奶 儿子 女儿 773 | 爷爷 奶奶 继父 继母 774 | 爷爷 奶奶 继子 继女 775 | 爷爷 奶奶 叔叔 阿姨 776 | 爷爷 奶奶 男孩 女孩 777 | 爷爷 奶奶 兄弟 姐妹 778 | 爷爷 奶奶 爸爸 妈妈 779 | 爷爷 奶奶 父亲 母亲 780 | 爷爷 奶奶 祖父 祖母 781 | 孙子 孙女 新郎 新娘 782 | 孙子 孙女 丈夫 妻子 783 | 孙子 孙女 国王 王后 784 | 孙子 孙女 男人 女人 785 | 孙子 孙女 侄子 侄女 786 | 孙子 孙女 王子 公主 787 | 孙子 孙女 儿子 女儿 788 | 孙子 孙女 继父 继母 789 | 孙子 孙女 继子 继女 790 | 孙子 孙女 叔叔 阿姨 791 | 孙子 孙女 男孩 女孩 792 | 孙子 孙女 兄弟 姐妹 793 | 孙子 孙女 爸爸 妈妈 794 | 孙子 孙女 父亲 母亲 795 | 孙子 孙女 祖父 祖母 796 | 孙子 孙女 爷爷 奶奶 797 | 新郎 新娘 丈夫 妻子 798 | 新郎 新娘 国王 王后 799 | 新郎 新娘 男人 女人 800 | 新郎 新娘 侄子 侄女 801 | 新郎 新娘 王子 公主 802 | 新郎 新娘 儿子 女儿 803 | 新郎 新娘 继父 继母 804 | 新郎 新娘 继子 继女 805 | 新郎 新娘 叔叔 阿姨 806 | 新郎 新娘 男孩 女孩 807 | 新郎 新娘 兄弟 姐妹 808 | 新郎 新娘 爸爸 妈妈 809 | 新郎 新娘 父亲 母亲 810 | 新郎 新娘 祖父 祖母 811 | 新郎 新娘 爷爷 奶奶 812 | 新郎 新娘 孙子 孙女 813 | 丈夫 妻子 国王 王后 814 | 丈夫 妻子 男人 女人 815 | 丈夫 妻子 侄子 侄女 816 | 丈夫 妻子 王子 公主 817 | 丈夫 妻子 儿子 女儿 818 | 丈夫 妻子 继父 继母 819 | 丈夫 妻子 继子 继女 820 | 丈夫 妻子 叔叔 阿姨 821 | 丈夫 妻子 男孩 女孩 822 | 丈夫 妻子 兄弟 姐妹 823 | 丈夫 妻子 爸爸 妈妈 824 | 丈夫 妻子 父亲 母亲 825 | 丈夫 妻子 祖父 祖母 826 | 丈夫 妻子 爷爷 奶奶 827 | 丈夫 妻子 孙子 孙女 828 | 丈夫 妻子 新郎 新娘 829 | 国王 王后 男人 女人 830 | 国王 王后 侄子 侄女 831 | 国王 王后 王子 公主 832 | 国王 王后 儿子 女儿 833 | 国王 王后 继父 继母 834 | 国王 王后 继子 继女 835 | 国王 王后 叔叔 阿姨 836 | 国王 王后 男孩 女孩 837 | 国王 王后 兄弟 姐妹 838 | 国王 王后 爸爸 妈妈 839 | 国王 王后 父亲 母亲 840 | 国王 王后 祖父 祖母 841 | 国王 王后 爷爷 奶奶 842 | 国王 王后 孙子 孙女 843 | 国王 王后 新郎 新娘 844 | 国王 王后 丈夫 妻子 845 | 男人 女人 侄子 侄女 846 | 男人 女人 王子 公主 847 | 男人 女人 儿子 女儿 848 | 男人 女人 继父 继母 849 | 男人 女人 继子 继女 850 | 男人 女人 叔叔 阿姨 851 | 男人 女人 男孩 女孩 852 | 男人 女人 兄弟 姐妹 853 | 男人 女人 爸爸 妈妈 854 | 男人 女人 父亲 母亲 855 | 男人 女人 祖父 祖母 856 | 男人 女人 爷爷 奶奶 857 | 男人 女人 孙子 孙女 858 | 男人 女人 新郎 新娘 859 | 男人 女人 丈夫 妻子 860 | 男人 女人 国王 王后 861 | 侄子 侄女 王子 公主 862 | 侄子 侄女 儿子 女儿 863 | 侄子 侄女 继父 继母 864 | 侄子 侄女 继子 继女 865 | 侄子 侄女 叔叔 阿姨 866 | 侄子 侄女 男孩 女孩 867 | 侄子 侄女 兄弟 姐妹 868 | 侄子 侄女 爸爸 妈妈 869 | 侄子 侄女 父亲 母亲 870 | 侄子 侄女 祖父 祖母 871 | 侄子 侄女 爷爷 奶奶 872 | 侄子 侄女 孙子 孙女 873 | 侄子 侄女 新郎 新娘 874 | 侄子 侄女 丈夫 妻子 875 | 侄子 侄女 国王 王后 876 | 侄子 侄女 男人 女人 877 | 王子 公主 儿子 女儿 878 | 王子 公主 继父 继母 879 | 王子 公主 继子 继女 880 | 王子 公主 叔叔 阿姨 881 | 王子 公主 男孩 女孩 882 | 王子 公主 兄弟 姐妹 883 | 王子 公主 爸爸 妈妈 884 | 王子 公主 父亲 母亲 885 | 王子 公主 祖父 祖母 886 | 王子 公主 爷爷 奶奶 887 | 王子 公主 孙子 孙女 888 | 王子 公主 新郎 新娘 889 | 王子 公主 丈夫 妻子 890 | 王子 公主 国王 王后 891 | 王子 公主 男人 女人 892 | 王子 公主 侄子 侄女 893 | 儿子 女儿 继父 继母 894 | 儿子 女儿 继子 继女 895 | 儿子 女儿 叔叔 阿姨 896 | 儿子 女儿 男孩 女孩 897 | 儿子 女儿 兄弟 姐妹 898 | 儿子 女儿 爸爸 妈妈 899 | 儿子 女儿 父亲 母亲 900 | 儿子 女儿 祖父 祖母 901 | 儿子 女儿 爷爷 奶奶 902 | 儿子 女儿 孙子 孙女 903 | 儿子 女儿 新郎 新娘 904 | 儿子 女儿 丈夫 妻子 905 | 儿子 女儿 国王 王后 906 | 儿子 女儿 男人 女人 907 | 儿子 女儿 侄子 侄女 908 | 儿子 女儿 王子 公主 909 | 继父 继母 继子 继女 910 | 继父 继母 叔叔 阿姨 911 | 继父 继母 男孩 女孩 912 | 继父 继母 兄弟 姐妹 913 | 继父 继母 爸爸 妈妈 914 | 继父 继母 父亲 母亲 915 | 继父 继母 祖父 祖母 916 | 继父 继母 爷爷 奶奶 917 | 继父 继母 孙子 孙女 918 | 继父 继母 新郎 新娘 919 | 继父 继母 丈夫 妻子 920 | 继父 继母 国王 王后 921 | 继父 继母 男人 女人 922 | 继父 继母 侄子 侄女 923 | 继父 继母 王子 公主 924 | 继父 继母 儿子 女儿 925 | 继子 继女 叔叔 阿姨 926 | 继子 继女 男孩 女孩 927 | 继子 继女 兄弟 姐妹 928 | 继子 继女 爸爸 妈妈 929 | 继子 继女 父亲 母亲 930 | 继子 继女 祖父 祖母 931 | 继子 继女 爷爷 奶奶 932 | 继子 继女 孙子 孙女 933 | 继子 继女 新郎 新娘 934 | 继子 继女 丈夫 妻子 935 | 继子 继女 国王 王后 936 | 继子 继女 男人 女人 937 | 继子 继女 侄子 侄女 938 | 继子 继女 王子 公主 939 | 继子 继女 儿子 女儿 940 | 继子 继女 继父 继母 941 | 叔叔 阿姨 男孩 女孩 942 | 叔叔 阿姨 兄弟 姐妹 943 | 叔叔 阿姨 爸爸 妈妈 944 | 叔叔 阿姨 父亲 母亲 945 | 叔叔 阿姨 祖父 祖母 946 | 叔叔 阿姨 爷爷 奶奶 947 | 叔叔 阿姨 孙子 孙女 948 | 叔叔 阿姨 新郎 新娘 949 | 叔叔 阿姨 丈夫 妻子 950 | 叔叔 阿姨 国王 王后 951 | 叔叔 阿姨 男人 女人 952 | 叔叔 阿姨 侄子 侄女 953 | 叔叔 阿姨 王子 公主 954 | 叔叔 阿姨 儿子 女儿 955 | 叔叔 阿姨 继父 继母 956 | 叔叔 阿姨 继子 继女 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chinese Word Vectors 中文词向量 2 | This project provides 100+ Chinese Word Vectors (embeddings) trained with different **representations** (dense and sparse), **context features** (word, ngram, character, and more), and **corpora**. One can easily obtain pre-trained vectors with different properties and use them for downstream tasks. 3 | 4 | Moreover, we provide a Chinese analogical reasoning dataset **CA8** and an evaluation toolkit for users to evaluate the quality of their word vectors. 5 | 6 | ## Reference 7 | Please cite the paper, if using these embeddings and CA8 dataset. 8 | 9 | Shen Li, Zhe Zhao, Renfen Hu, Wensi Li, Tao Liu, Xiaoyong Du, Analogical Reasoning on Chinese Morphological and Semantic Relations, ACL 2018. 10 | 11 | ``` 12 | @InProceedings{P18-2023, 13 | author = "Li, Shen 14 | and Zhao, Zhe 15 | and Hu, Renfen 16 | and Li, Wensi 17 | and Liu, Tao 18 | and Du, Xiaoyong", 19 | title = "Analogical Reasoning on Chinese Morphological and Semantic Relations", 20 | booktitle = "Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)", 21 | year = "2018", 22 | publisher = "Association for Computational Linguistics", 23 | pages = "138--143", 24 | location = "Melbourne, Australia", 25 | url = "http://aclweb.org/anthology/P18-2023" 26 | } 27 | ``` 28 | 29 |   30 | 31 | A detailed analysis of the relation between the intrinsic and extrinsic evaluations of Chinese word embeddings is shown in the paper: 32 | 33 | Yuanyuan Qiu, Hongzheng Li, Shen Li, Yingdi Jiang, Renfen Hu, Lijiao Yang. Revisiting Correlations between Intrinsic and Extrinsic Evaluations of Word Embeddings. Chinese Computational Linguistics and Natural Language Processing Based on Naturally Annotated Big Data. Springer, Cham, 2018. 209-221. (CCL & NLP-NABD 2018 Best Paper) 34 | 35 | ``` 36 | @incollection{qiu2018revisiting, 37 | title={Revisiting Correlations between Intrinsic and Extrinsic Evaluations of Word Embeddings}, 38 | author={Qiu, Yuanyuan and Li, Hongzheng and Li, Shen and Jiang, Yingdi and Hu, Renfen and Yang, Lijiao}, 39 | booktitle={Chinese Computational Linguistics and Natural Language Processing Based on Naturally Annotated Big Data}, 40 | pages={209--221}, 41 | year={2018}, 42 | publisher={Springer} 43 | } 44 | ``` 45 | 46 | ## Format 47 | The pre-trained vector files are in text format. Each line contains a word and its vector. Each value is separated by space. The first line records the meta information: the first number indicates the number of words in the file and the second indicates the dimension size. 48 | 49 | Besides dense word vectors (trained with SGNS), we also provide sparse vectors (trained with PPMI). They are in the same format with liblinear, where the number before " : " denotes dimension index and the number after the " : " denotes the value. 50 | 51 | ## Pre-trained Chinese Word Vectors 52 | 53 | ### Basic Settings 54 | 55 | 56 | 57 | 58 |     59 |     60 |     61 |     62 |     63 | 64 | 65 | 66 |     67 |     68 |     69 |     70 |     71 | 72 |
Window SizeDynamic WindowSub-samplingLow-Frequency WordIterationNegative Sampling*
5Yes1e-51055
73 | 74 | \*Only for SGNS. 75 | 76 | ### Various Domains 77 | 78 | Chinese Word Vectors trained with different representations, context features, and corpora. 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 163 | 167 | 171 | 175 | 176 |
Word2vec / Skip-Gram with Negative Sampling (SGNS)
CorpusContext Features
WordWord + NgramWord + CharacterWord + Character + Ngram
Baidu Encyclopedia 百度百科300d300d300d300d / PWD: 5555
Wikipedia_zh 中文维基百科300d300d300d300d
People's Daily News 人民日报300d300d300d300d
Sogou News 搜狗新闻300d300d300d300d
Financial News 金融新闻300d300d300d300d
Zhihu_QA 知乎问答 300d300d300d300d
Weibo 微博300d300d300d300d
Literature 文学作品300d300d / PWD: z5b4300d300d / PWD: yenb
Complete Library in Four Sections
四库全书*
300d300dNANNAN
Mixed-large 综合
Baidu Netdisk / Google Drive
160 | 300d
161 | 300d 162 |
164 | 300d
165 | 300d 166 |
168 | 300d
169 | 300d 170 |
172 | 300d
173 | 300d 174 |
177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 |
Positive Pointwise Mutual Information (PPMI)
CorpusContext Features
WordWord + NgramWord + CharacterWord + Character + Ngram
Baidu Encyclopedia 百度百科SparseSparseSparseSparse
Wikipedia_zh 中文维基百科SparseSparseSparseSparse
People's Daily News 人民日报SparseSparseSparseSparse
Sogou News 搜狗新闻SparseSparseSparseSparse
Financial News 金融新闻SparseSparseSparseSparse
Zhihu_QA 知乎问答 SparseSparseSparseSparse
Weibo 微博SparseSparseSparseSparse
Literature 文学作品SparseSparseSparseSparse
Complete Library in Four Sections
四库全书*
SparseSparseNANNAN
Mixed-large 综合SparseSparseSparseSparse
264 | 265 | \*Character embeddings are provided, since most of Hanzi are words in the archaic Chinese. 266 | 267 | ### Various Co-occurrence Information 268 | 269 | We release word vectors upon different co-occurrence statistics. Target and context vectors are often called input and output vectors in some related papers. 270 | 271 | In this part, one can obtain vectors of arbitrary linguistic units beyond word. For example, character vectors is in the context vectors of word-character. 272 | 273 | All vectors are trained by SGNS on Baidu Encyclopedia. 274 | 275 | 276 | 277 | 278 |     279 |     280 |     281 | 282 | 283 | 284 | 285 | 286 |     287 | 288 | 289 | 290 | 291 |     292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 |     309 |     310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 |     333 |     334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 |     345 |     346 | 347 | 348 | 349 | 350 | 351 |     352 |     353 | 354 | 355 | 356 | 357 | 358 |     359 | 360 | 361 |
FeatureCo-occurrence TypeTarget Word VectorsContext Word Vectors
WordWord → Word300d300d
NgramWord → Ngram (1-2)300d300d
Word → Ngram (1-3)300d300d
Ngram (1-2) → Ngram (1-2)300d300d
CharacterWord → Character (1)300d300d
Word → Character (1-2)300d300d
Word → Character (1-4)300d300d
RadicalRadical300d300d
PositionWord → Word (left/right)300d300d
Word → Word (distance)300d300d
GlobalWord → Text300d300d
Syntactic FeatureWord → POS300d300d
Word → Dependency300d300d
362 | 363 | ## Representations 364 | Existing word representation methods fall into one of the two classes, **dense** and **sparse** represnetations. SGNS model (a model in word2vec toolkit) and PPMI model are respectively typical methods of these two classes. SGNS model trains low-dimensional real (dense) vectors through a shallow neural network. It is also called neural embedding method. PPMI model is a sparse bag-of-feature representation weighted by positive-pointwise-mutual-information (PPMI) weighting scheme. 365 | 366 | ## Context Features 367 | Three context features: **word**, **ngram**, and **character** are commonly used in the word embedding literature. Most word representation methods essentially exploit word-word co-occurrence statistics, namely using word as context feature **(word feature)**. Inspired by language modeling problem, we introduce ngram feature into the context. Both word-word and word-ngram co-occurrence statistics are used for training **(ngram feature)**. For Chinese, characters (Hanzi) often convey strong semantics. To this end, we consider using word-word and word-character co-occurrence statistics for learning word vectors. The length of character-level ngrams ranges from 1 to 4 **(character feature)**. 368 | 369 | Besides word, ngram, and character, there are other features which have substantial influence on properties of word vectors. For example, using entire text as context feature could introduce more topic information into word vectors; using dependency parse as context feature could add syntactic constraint to word vectors. 17 co-occurrence types are considered in this project. 370 | 371 | ## Corpus 372 | We made great efforts to collect corpus across various domains. All text data are preprocessed by removing html and xml tags. Only the plain text are kept and [HanLP(v_1.5.3)](https://github.com/hankcs/HanLP) is used for word segmentation. In addition, traditional Chinese characters are converted into simplified characters with [Open Chinese Convert (OpenCC)](https://github.com/BYVoid/OpenCC). The detailed corpora information is listed as follows: 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 |
CorpusSizeTokensVocabulary SizeDescription
Baidu Encyclopedia
百度百科
4.1G745M5422KChinese Encyclopedia data from
https://baike.baidu.com/
Wikipedia_zh
中文维基百科
1.3G223M2129KChinese Wikipedia data from
https://dumps.wikimedia.org/
People's Daily News
人民日报
3.9G668M1664KNews data from People's Daily(1946-2017)
http://data.people.com.cn/
Sogou News
搜狗新闻
3.7G649M1226KNews data provided by Sogou labs
http://www.sogou.com/labs/
Financial News
金融新闻
6.2G1055M2785KFinancial news collected from multiple news websites
Zhihu_QA
知乎问答
2.1G384M1117KChinese QA data from
https://www.zhihu.com/
Weibo
微博
0.73G136M850KChinese microblog data provided by NLPIR Lab
http://www.nlpir.org/wordpress/download/weibo.7z
Literature
文学作品
0.93G177M702K8599 modern Chinese literature works
Mixed-large
综合
22.6G4037M10653KWe build the large corpus by merging the above corpora.
Complete Library in Four Sections
四库全书
1.5G714M21.8KThe largest collection of texts in pre-modern China.
453 | 454 | All words are concerned, including low frequency words. 455 | 456 | ## Toolkits 457 | All word vectors are trained by [ngram2vec](https://github.com/zhezhaoa/ngram2vec/) toolkit. Ngram2vec toolkit is a superset of [word2vec](https://github.com/svn2github/word2vec) and [fasttext](https://github.com/facebookresearch/fastText) toolkit, where arbitrary context features and models are supported. 458 | 459 | ## Chinese Word Analogy Benchmarks 460 | The quality of word vectors is often evaluated by analogy question tasks. In this project, two benchmarks are exploited for evaluation. The first is CA-translated, where most analogy questions are directly translated from English benchmark. Although CA-translated has been widely used in many Chinese word embedding papers, it only contains questions of three semantic questions and covers 134 Chinese words. In contrast, CA8 is specifically designed for Chinese language. It contains 17813 analogy questions and covers comprehensive morphological and semantic relations. The CA-translated, CA8, and their detailed descriptions are provided in [**testsets**](https://github.com/Embedding/Chinese-Word-Vectors/tree/master/testsets) folder. 461 | 462 | ## Evaluation Toolkit 463 | We present an evaluation toolkit in [**evaluation**](https://github.com/Embedding/Chinese-Word-Vectors/tree/master/evaluation) folder. 464 | 465 | Run the following codes to evaluate dense vectors. 466 | ``` 467 | $ python ana_eval_dense.py -v -a CA8/morphological.txt 468 | $ python ana_eval_dense.py -v -a CA8/semantic.txt 469 | ``` 470 | Run the following codes to evaluate sparse vectors. 471 | ``` 472 | $ python ana_eval_sparse.py -v -a CA8/morphological.txt 473 | $ python ana_eval_sparse.py -v -a CA8/semantic.txt 474 | ``` 475 | --------------------------------------------------------------------------------