Neural Network Stanford parser word2vector format error during training

情到浓时终转凉″ 提交于 2020-01-13 05:32:30

问题


I am trying to train a model with Stanford neural network dependency parser for English. It does not accept a standard word2vector file with 100 dimensions. It generates an error message. I am using the embedded words as defined in this Web page: [https://drive.google.com/file/d/0B8nESzOdPhLsdWF2S1Ayb1RkTXc/view?usp=sharing][1] I have dowloaded the data as a text file in myPC. I am using the parameter -embeddingSize 100 but the parser generates an error message: Embedding File /../.../sskip.100.vectors: #Words=243004, dim=1 The dimension of embedding file does not match config.embeddingSize

I can see that each Word is defined by 100 values. Any suggestion about problems with this word embedding format for the Stanford Parser?

Here are the first words and the initial line:

243003 100
</s> 0.004003 0.004419 -0.003830 -0.003278 0.001367 0.003021 0.000941 0.000211 -0.003604 0.002218 -0.004356 0.001250 -0.000751 -0.000957 -0.003316 -0.001882 0.002579 0.003025 0.002969 0.001597 0.001545 -0.003803 -0.004096 0.004970 0.003801 0.003090 -0.000604 0.004016 -0.000495 0.000735 -0.000149 -0.002983 0.001312 -0.001337 -0.003825 0.004754 0.004379 -0.001095 -0.000226 0.000509 -0.003638 -0.004007 0.004555 0.000063 -0.002582 -0.003042 -0.003076 0.001697 0.000201 0.001331 -0.004214 -0.003808 -0.000130 0.001144 0.002550 -0.003170 0.004080 0.000927 0.001120 -0.000608 0.002986 -0.002288 -0.002097 0.002158 -0.000753 0.001031 0.001805 -0.004089 -0.001983 0.002914 0.004232 0.003932 -0.003047 -0.002108 -0.000909 0.002001 -0.003788 0.002998 0.002788 -0.001599 -0.001552 -0.002238 0.004229 0.003912 -0.001180 0.004215 0.004820 0.001815 0.004983 -0.003111 -0.001532 -0.002107 -0.002907 0.002815 0.001579 0.000425 -0.002194 0.001524 0.003059 0.000194 
the 0.314845 -0.594966 0.364453 -0.303990 -0.163298 -0.208138 -0.063397 -0.274273 0.008039 0.313427 0.077980 0.230821 -0.303666 0.069646 0.034396 0.713454 0.144248 -0.182218 0.363876 0.619664 -0.351316 0.002414 0.434149 -0.429740 0.368150 -0.709280 -0.076584 0.168682 -0.111134 0.291124 0.056759 0.236357 -0.216234 -0.151878 -0.429654 0.020701 0.152160 -0.012689 -0.365258 -0.284180 -0.031743 0.322464 -0.294811 0.017445 -0.004059 0.215779 -0.119879 -0.232236 -0.321151 0.301774 -0.126148 -0.517174 0.345968 0.640385 -0.217424 0.308738 0.219053 -0.115701 -0.205319 -0.211564 0.195052 -0.465845 0.079989 -0.314120 -0.489292 0.393189 0.506710 0.444550 0.090913 -0.041937 0.019073 -0.211669 -0.068794 -0.324646 0.286798 -0.096603 -0.458527 -0.017360 -0.027033 0.193178 0.239730 0.050892 0.067579 -0.175215 0.044952 0.132419 -0.129821 0.273940 0.560339 0.021715 0.215951 0.731709 0.132121 0.113550 0.430923 0.344183 -0.263545 0.435532 -0.201218 -0.027319 
, 0.061619 -0.565545 0.125936 -0.284422 -0.169127 0.460509 0.006625 -0.329331 0.336665 0.193879 -0.132434 0.249105 -0.175773 -0.082793 -0.508019 0.721060 0.760420 0.176019 0.246262 0.204314 -0.036362 0.074625 0.350433 -0.545271 0.286622 0.015969 0.181921 0.125430 0.076984 0.101759 -0.054494 -0.030594 -0.198813 0.228708 -0.216355 0.340003 0.244340 -0.195765 -0.119334 -0.120226 -0.318529 0.204634 0.185596 0.069793 0.452572 -0.086685 0.141807 -0.011995 -0.132059 -0.212667 -0.142585 -0.398395 -0.025111 0.381179 -0.108959 0.118045 0.097696 0.146426 -0.037016 -0.224785 -0.025545 -0.028420 0.267363 -0.368773 0.066806 0.377338 -0.069999 0.191271 0.208339 0.765346 -0.036333 0.458936 -0.107518 -0.250389 -0.237289 0.171875 0.037814 0.242127 0.013300 -0.237103 0.670932 0.376154 -0.036636 -0.018235 0.258066 -0.027170 -0.148790 0.426763 0.525802 0.158871 -0.257020 0.297436 0.124205 0.011005 0.495096 -0.158856 0.035228 0.189957 -0.267969 0.279380 
. -0.116517 -0.631137 0.172816 -0.262048 -0.040504 0.169117 -0.205499 -0.148350 0.189173 -0.031506 -0.269349 0.609523 0.305698 0.023472 -0.190445 0.771157 0.612304 -0.063000 0.169066 0.124187 -0.252965 0.417390 0.571047 -0.499795 0.302955 -0.171781 -0.112887 -0.118344 -0.068801 0.051599 0.114658 0.144728 -0.341774 0.481746 -0.240515 0.133912 0.308567 -0.004850 0.110450 -0.254397 -0.202240 0.070778 0.094780 -0.098785 0.370708 0.007306 -0.049338 0.102309 0.098400 -0.195322 0.121543 -0.620514 -0.073040 0.195811 -0.309233 -0.020104 0.643815 0.071323 -0.093095 -0.374297 0.072836 -0.204757 0.191280 -0.432853 0.101545 0.427208 0.164303 0.246313 0.311429 0.849791 0.004568 0.328126 -0.185645 -0.371651 -0.270725 -0.013400 0.010909 0.024112 -0.176938 -0.180654 0.428156 0.150460 -0.219369 -0.015102 0.349785 0.259967 -0.081237 0.262176 0.586780 0.224804 -0.204084 0.548801 0.081115 0.046538 0.352024 0.230098 -0.050318 0.615924 -0.423620 0.186570 

来源:https://stackoverflow.com/questions/34111411/neural-network-stanford-parser-word2vector-format-error-during-training

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!