{"id":56960,"date":"2025-08-15T01:54:44","date_gmt":"2025-08-14T17:54:44","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/56960.html"},"modified":"2025-08-15T01:54:44","modified_gmt":"2025-08-14T17:54:44","slug":"nlp%e8%87%aa%e7%84%b6%e8%af%ad%e8%a8%80%e5%a4%84%e7%90%86-fasttext%e5%b7%a5%e5%85%b7%e4%b8%8e%e8%bf%81%e7%a7%bb%e5%ad%a6%e4%b9%a0%e5%9f%ba%e7%a1%80%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/56960.html","title":{"rendered":"NLP\u81ea\u7136\u8bed\u8a00\u5904\u7406: FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3"},"content":{"rendered":"<h2>FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3<\/h2>\n<h3>\u4e00\u3001\u77e5\u8bc6\u6846\u67b6\u603b\u89c8<\/h3>\n<ul>\n<li>FastText\u5de5\u5177\u6838\u5fc3\u529f\u80fd\u4e0e\u5e94\u7528\u573a\u666f<\/li>\n<li>FastText\u6a21\u578b\u67b6\u6784\u4e0e\u5de5\u4f5c\u539f\u7406<\/li>\n<li>\u5c42\u6b21Softmax\u52a0\u901f\u673a\u5236<\/li>\n<li>\u54c8\u592b\u66fc\u6811\u6982\u5ff5\u4e0e\u6784\u5efa\u65b9\u6cd5<\/li>\n<\/ul>\n<h3>\u4e8c\u3001FastText\u5de5\u5177\u6838\u5fc3\u89e3\u6790<\/h3>\n<h4>2.1 \u529f\u80fd\u5b9a\u4f4d<\/h4>\n<ul>\n<li>\u53cc\u91cd\u6838\u5fc3\u529f\u80fd\n<ul>\n<li>\u6587\u672c\u5206\u7c7b&#xff1a;\u53ef\u76f4\u63a5\u7528\u4e8e\u6587\u672c\u5206\u7c7b\u4efb\u52a1&#xff0c;\u5feb\u901f\u751f\u6210\u6a21\u578b\u7ed3\u679c<\/li>\n<li>\u8bcd\u5411\u91cf\u8bad\u7ec3&#xff1a;\u7b2c\u4e8c\u7ae0\u6587\u672c\u9884\u5904\u7406\u4e2d\u5df2\u4f7f\u7528\u5176\u8fdb\u884cword2vec\u8bcd\u5411\u91cf\u8bad\u7ec3<\/li>\n<\/ul>\n<\/li>\n<li>\u57fa\u7ebf\u6a21\u578b\u4ef7\u503c\n<ul>\n<li>\u5b9a\u4e49&#xff1a;\u4f5c\u4e3a\u57fa\u51c6\u6a21\u578b&#xff08;baseline&#xff09;&#xff0c;\u4e3a\u540e\u7eed\u6a21\u578b\u9009\u578b\u63d0\u4f9b\u53c2\u8003\u6807\u51c6<\/li>\n<li>\u5e94\u7528\u573a\u666f&#xff1a;\u5f53\u9762\u4e34\u6a21\u578b\u9009\u578b\u56f0\u5883&#xff08;\u5982RNN\u3001LSTM\u3001SOM\u3001Bert\u7b49\u9009\u62e9&#xff09;\u65f6&#xff0c;\u53ef\u5148\u901a\u8fc7FastText\u5feb\u901f\u83b7\u5f97\u57fa\u51c6\u51c6\u786e\u7387&#xff08;\u598280%&#xff09;&#xff0c;\u540e\u7eed\u6a21\u578b\u6027\u80fd\u4e0d\u5f97\u4f4e\u4e8e\u6b64\u6807\u51c6<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>2.2 \u6280\u672f\u4f18\u52bf<\/h4>\n<table>\n<tr>\u4f18\u52bf\u7279\u70b9\u5b9e\u73b0\u539f\u7406<\/tr>\n<tbody>\n<tr>\n<td>\u9ad8\u901f\u8bad\u7ec3\u4e0e\u9884\u6d4b<\/td>\n<td>\u5185\u90e8\u7f51\u7edc\u7ed3\u6784\u7b80\u5355&#xff0c;\u51cf\u5c11\u8ba1\u7b97\u590d\u6742\u5ea6<\/td>\n<\/tr>\n<tr>\n<td>\u9ad8\u7cbe\u5ea6\u4fdd\u6301<\/td>\n<td>1. \u8bad\u7ec3\u8bcd\u5411\u91cf\u65f6\u91c7\u7528\u5c42\u6b21Softmax\u7ed3\u67842. \u5f15\u5165ngram\u7279\u5f81\u5f25\u8865\u6a21\u578b\u7f3a\u9677<\/td>\n<\/tr>\n<tr>\n<td>\u6613\u7528\u6027\u5f3a<\/td>\n<td>\u5df2\u5b8c\u6210\u5b89\u88c5&#xff0c;\u4e14\u5728\u524d\u671f\u5b66\u4e60\u4e2d\u5df2\u5b9e\u8df5\u5e94\u7528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e09\u3001FastText\u6a21\u578b\u67b6\u6784<\/h3>\n<h4>3.1 \u6574\u4f53\u7ed3\u6784<\/h4>\n<ul>\n<li>\u4e0eword2vec\u7684CBOW\u6a21\u578b\u7c7b\u4f3c&#xff0c;\u533a\u522b\u5728\u4e8e&#xff1a;\n<ul>\n<li>FastText&#xff1a;\u9884\u6d4b\u6587\u672c\u6807\u7b7e<\/li>\n<li>CBOW\u6a21\u578b&#xff1a;\u9884\u6d4b\u4e2d\u95f4\u8bcd<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09\u5c42\u67b6\u6784&#xff1a;\u8f93\u5165\u5c42 \u2192 \u9690\u85cf\u5c42 \u2192 \u8f93\u51fa\u5c42<\/li>\n<\/ul>\n<h4>3.2 \u5404\u5c42\u5de5\u4f5c\u6d41\u7a0b<\/h4>\n<p>#mermaid-svg-FAlyuCl79ZiaI8GZ {font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-FAlyuCl79ZiaI8GZ .error-icon{fill:#552222;}#mermaid-svg-FAlyuCl79ZiaI8GZ .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-FAlyuCl79ZiaI8GZ .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-FAlyuCl79ZiaI8GZ .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-FAlyuCl79ZiaI8GZ .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-FAlyuCl79ZiaI8GZ .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-FAlyuCl79ZiaI8GZ .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-FAlyuCl79ZiaI8GZ .marker{fill:#333333;stroke:#333333;}#mermaid-svg-FAlyuCl79ZiaI8GZ .marker.cross{stroke:#333333;}#mermaid-svg-FAlyuCl79ZiaI8GZ svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-FAlyuCl79ZiaI8GZ .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-FAlyuCl79ZiaI8GZ .cluster-label text{fill:#333;}#mermaid-svg-FAlyuCl79ZiaI8GZ .cluster-label span{color:#333;}#mermaid-svg-FAlyuCl79ZiaI8GZ .label text,#mermaid-svg-FAlyuCl79ZiaI8GZ span{fill:#333;color:#333;}#mermaid-svg-FAlyuCl79ZiaI8GZ .node rect,#mermaid-svg-FAlyuCl79ZiaI8GZ .node circle,#mermaid-svg-FAlyuCl79ZiaI8GZ .node ellipse,#mermaid-svg-FAlyuCl79ZiaI8GZ .node polygon,#mermaid-svg-FAlyuCl79ZiaI8GZ .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-FAlyuCl79ZiaI8GZ .node .label{text-align:center;}#mermaid-svg-FAlyuCl79ZiaI8GZ .node.clickable{cursor:pointer;}#mermaid-svg-FAlyuCl79ZiaI8GZ .arrowheadPath{fill:#333333;}#mermaid-svg-FAlyuCl79ZiaI8GZ .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-FAlyuCl79ZiaI8GZ .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-FAlyuCl79ZiaI8GZ .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-FAlyuCl79ZiaI8GZ .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-FAlyuCl79ZiaI8GZ .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-FAlyuCl79ZiaI8GZ .cluster text{fill:#333;}#mermaid-svg-FAlyuCl79ZiaI8GZ .cluster span{color:#333;}#mermaid-svg-FAlyuCl79ZiaI8GZ div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-FAlyuCl79ZiaI8GZ :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<span id=\"L-L-A-B\" class=\"edgeLabel L-LS-A&#039; L-LE-B\">word embedding&#043;ngram\u7279\u5f81<\/span><span id=\"L-L-B-C\" class=\"edgeLabel L-LS-B&#039; L-LE-C\">\u5411\u91cf\u6c42\u548c\u5e73\u5747<\/span><span id=\"L-L-C-D\" class=\"edgeLabel L-LS-C&#039; L-LE-D\">\u5168\u8fde\u63a5\u5c42<\/span>\u8f93\u5165\u5c42\u9690\u85cf\u5c42\u6837\u672c\u8bed\u4e49\u5411\u91cf\u8f93\u51fa\u5c42\u5206\u7c7b\u7ed3\u679c<\/p>\n<ul>\n<li>\u8f93\u5165\u5c42&#xff1a;\u5bf9\u8bcd\u6c47\u8fdb\u884cword embedding\u5904\u7406&#xff0c;\u82e5\u6709\u989d\u5916\u7279\u5f81\u5219\u4e00\u5e76\u878d\u5165<\/li>\n<li>\u9690\u85cf\u5c42&#xff1a;<span class=\"token comment\"># \u4f2a\u4ee3\u7801&#xff1a;\u8ba1\u7b97\u6837\u672c\u5e73\u5747\u5411\u91cf<\/span><br \/>\n<span class=\"token keyword\">def<\/span> <span class=\"token function\">get_sample_vector<\/span><span class=\"token punctuation\">(<\/span>word_vectors<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token comment\"># word_vectors\u4e3a[\u5355\u8bcd\u6570, \u5411\u91cf\u7ef4\u5ea6]\u7684\u77e9\u9635<\/span><br \/>\n    sum_vector <span class=\"token operator\">&#061;<\/span> np<span class=\"token punctuation\">.<\/span><span class=\"token builtin\">sum<\/span><span class=\"token punctuation\">(<\/span>word_vectors<span class=\"token punctuation\">,<\/span> axis<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6309\u5217\u6c42\u548c<\/span><br \/>\n    avg_vector <span class=\"token operator\">&#061;<\/span> sum_vector <span class=\"token operator\">\/<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>word_vectors<span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6c42\u5e73\u5747<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> avg_vector  <span class=\"token comment\"># \u5f97\u5230[1, \u5411\u91cf\u7ef4\u5ea6]\u7684\u6837\u672c\u5411\u91cf<\/span><\/p>\n<\/li>\n<li>\u8f93\u51fa\u5c42&#xff1a;\u5c06\u5e73\u5747\u5411\u91cf\u901a\u8fc7\u5168\u8fde\u63a5\u5c42\u6620\u5c04\u5230\u7c7b\u522b\u7a7a\u95f4&#xff0c;\u9009\u53d6\u6700\u5927\u6982\u7387\u7c7b\u522b\u4f5c\u4e3a\u9884\u6d4b\u7ed3\u679c<\/li>\n<\/ul>\n<h3>\u56db\u3001\u5c42\u6b21Softmax\u52a0\u901f\u673a\u5236<\/h3>\n<h4>4.1 \u89e3\u51b3\u7684\u6838\u5fc3\u95ee\u9898<\/h4>\n<ul>\n<li>\u4f20\u7edfSoftmax\u5728\u591a\u7c7b\u522b\u573a\u666f&#xff08;\u59824\u4e07\u8bcd\u6c47\u5206\u7c7b&#xff09;\u4e2d\u5b58\u5728\u8ba1\u7b97\u74f6\u9888&#xff1a;\n<ul>\n<li>\u9700\u8ba1\u7b97\u6240\u6709\u7c7b\u522b\u7684\u6982\u7387\u503c<\/li>\n<li>\u53c2\u6570\u91cf\u4e0e\u8ba1\u7b97\u91cf\u968f\u7c7b\u522b\u6570\u5448\u7ebf\u6027\u589e\u957f<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>4.2 \u5b9e\u73b0\u539f\u7406<\/h4>\n<ul>\n<li>\u91c7\u7528\u4e8c\u53c9\u6811\u7ed3\u6784\u5c06\u591a\u5206\u7c7b\u8f6c\u5316\u4e3a\u4e00\u7cfb\u5217\u4e8c\u5206\u7c7b<\/li>\n<li>\u6bcf\u4e2a\u7c7b\u522b\u5bf9\u5e94\u6811\u7684\u4e00\u4e2a\u53f6\u5b50\u8282\u70b9<\/li>\n<li>\u901a\u8fc7\u8def\u5f84\u4e0a\u7684\u4e00\u7cfb\u5217\u4e8c\u5206\u7c7b\u51b3\u7b56\u8ba1\u7b97\u6700\u7ec8\u6982\u7387<\/li>\n<\/ul>\n<h3>\u4e94\u3001\u54c8\u592b\u66fc\u6811\u57fa\u7840<\/h3>\n<h4>5.1 \u6838\u5fc3\u5b9a\u4e49<\/h4>\n<ul>\n<li>\u6700\u4f18\u4e8c\u53c9\u6811&#xff1a;\u4f7f\u6240\u6709\u53f6\u5b50\u8282\u70b9\u7684\u5e26\u6743\u8def\u5f84\u957f\u5ea6\u4e4b\u548c&#xff08;WPL&#xff09;\u6700\u5c0f\u7684\u4e8c\u53c9\u6811<\/li>\n<li>\u5e26\u6743\u8def\u5f84\u957f\u5ea6&#xff08;WPL&#xff09;\u8ba1\u7b97\u516c\u5f0f&#xff1a;WPL &#061; \u03a3(\u53f6\u5b50\u8282\u70b9\u6743\u503c \u00d7 \u6839\u8282\u70b9\u5230\u8be5\u8282\u70b9\u7684\u8def\u5f84\u957f\u5ea6)\n<\/li>\n<\/ul>\n<h4>5.2 \u5173\u952e\u6982\u5ff5<\/h4>\n<table>\n<tr>\u672f\u8bed\u5b9a\u4e49<\/tr>\n<tbody>\n<tr>\n<td>\u4e8c\u53c9\u6811<\/td>\n<td>\u6bcf\u4e2a\u8282\u70b9\u6700\u591a\u6709\u4e24\u4e2a\u5b50\u6811&#xff08;\u5de6\u5b50\u6811\u3001\u53f3\u5b50\u6811&#xff09;\u7684\u6709\u5e8f\u6811<\/td>\n<\/tr>\n<tr>\n<td>\u53f6\u5b50\u8282\u70b9<\/td>\n<td>\u6ca1\u6709\u5b50\u8282\u70b9\u7684\u8282\u70b9<\/td>\n<\/tr>\n<tr>\n<td>\u8282\u70b9\u6743\u503c<\/td>\n<td>\u8d4b\u4e88\u8282\u70b9\u7684\u6709\u5b9e\u9645\u610f\u4e49\u7684\u6570\u503c<\/td>\n<\/tr>\n<tr>\n<td>\u8def\u5f84\u957f\u5ea6<\/td>\n<td>\u4ece\u6839\u8282\u70b9\u5230\u76ee\u6807\u8282\u70b9\u7ecf\u8fc7\u7684\u5206\u652f\u6570<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5.3 \u6784\u5efa\u6b65\u9aa4<\/h4>\n<li>\u521d\u59cb\u5316&#xff1a;\u5c06n\u4e2a\u6743\u503c\u89c6\u4e3an\u68f5\u5355\u8282\u70b9\u6811<\/li>\n<li>\u5408\u5e76&#xff1a;\u6bcf\u6b21\u9009\u62e9\u4e24\u4e2a\u6743\u503c\u6700\u5c0f\u7684\u6811\u5408\u5e76\u4e3a\u65b0\u6811&#xff0c;\u65b0\u6811\u6839\u8282\u70b9\u6743\u503c\u4e3a\u4e24\u5b50\u6811\u6743\u503c\u4e4b\u548c<\/li>\n<li>\u91cd\u590d&#xff1a;\u76f4\u81f3\u6240\u6709\u8282\u70b9\u5408\u5e76\u4e3a\u4e00\u68f5\u6811<\/li>\n<p><span class=\"token comment\"># \u4f2a\u4ee3\u7801&#xff1a;\u54c8\u592b\u66fc\u6811\u6784\u5efa&#xff08;\u7b80\u5316\u7248&#xff09;<\/span><br \/>\n<span class=\"token keyword\">def<\/span> <span class=\"token function\">build_huffman_tree<\/span><span class=\"token punctuation\">(<\/span>weights<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">while<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>weights<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&gt;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token comment\"># \u6392\u5e8f\u83b7\u53d6\u6700\u5c0f\u7684\u4e24\u4e2a\u6743\u503c<\/span><br \/>\n        weights<span class=\"token punctuation\">.<\/span>sort<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        w1 <span class=\"token operator\">&#061;<\/span> weights<span class=\"token punctuation\">.<\/span>pop<span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        w2 <span class=\"token operator\">&#061;<\/span> weights<span class=\"token punctuation\">.<\/span>pop<span class=\"token punctuation\">(<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token comment\"># \u5408\u5e76\u4e3a\u65b0\u6811<\/span><br \/>\n        new_weight <span class=\"token operator\">&#061;<\/span> w1 <span class=\"token operator\">&#043;<\/span> w2<br \/>\n        weights<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span>new_weight<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> weights<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span>  <span class=\"token comment\"># \u8fd4\u56de\u6839\u8282\u70b9\u6743\u503c<\/span><\/p>\n<h3>\u516d\u3001\u91cd\u70b9\u603b\u7ed3<\/h3>\n<li>FastText\u662f\u8fc1\u79fb\u5b66\u4e60\u4e2d\u7684\u91cd\u8981\u5de5\u5177&#xff0c;\u517c\u5177\u8bcd\u5411\u91cf\u8bad\u7ec3\u4e0e\u6587\u672c\u5206\u7c7b\u529f\u80fd<\/li>\n<li>\u5c42\u6b21Softmax\u901a\u8fc7\u54c8\u592b\u66fc\u6811\u5c06\u591a\u5206\u7c7b\u8f6c\u5316\u4e3a\u4e8c\u5206\u7c7b\u5e8f\u5217&#xff0c;\u5927\u5e45\u63d0\u5347\u8ba1\u7b97\u6548\u7387<\/li>\n<li>\u54c8\u592b\u66fc\u6811\u7684\u5e26\u6743\u8def\u5f84\u957f\u5ea6\u6700\u5c0f\u7279\u6027\u662f\u5b9e\u73b0\u9ad8\u6548\u8ba1\u7b97\u7684\u6838\u5fc3\u4fdd\u969c<\/li>\n<li>\u638c\u63e1FastText\u7684\u57fa\u7ebf\u6a21\u578b\u7528\u6cd5&#xff0c;\u53ef\u5feb\u901f\u5f00\u5c55\u6587\u672c\u5206\u7c7b\u9879\u76ee\u7684\u521d\u671f\u9a8c\u8bc1<\/li>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb554\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf12\u6b21\u3002\u6700\u4f18\u4e8c\u53c9\u6811\uff1a\u4f7f\u6240\u6709\u53f6\u5b50\u8282\u70b9\u7684\u5e26\u6743\u8def\u5f84\u957f\u5ea6\u4e4b\u548c\uff08WPL\uff09\u6700\u5c0f\u7684\u4e8c\u53c9\u6811\u5e26\u6743\u8def\u5f84\u957f\u5ea6\uff08WPL\uff09\u8ba1\u7b97\u516c\u5f0f\uff1aWPL = \u03a3(\u53f6\u5b50\u8282\u70b9\u6743\u503c \u00d7 \u6839\u8282\u70b9\u5230\u8be5\u8282\u70b9\u7684\u8def\u5f84\u957f\u5ea6)FastText\u662f\u8fc1\u79fb\u5b66\u4e60\u4e2d\u7684\u91cd\u8981\u5de5\u5177\uff0c\u517c\u5177\u8bcd\u5411\u91cf\u8bad\u7ec3\u4e0e\u6587\u672c\u5206\u7c7b\u529f\u80fd\u5c42\u6b21Softmax\u901a\u8fc7\u54c8\u592b\u66fc\u6811\u5c06\u591a\u5206\u7c7b\u8f6c\u5316\u4e3a\u4e8c\u5206\u7c7b\u5e8f\u5217\uff0c\u5927\u5e45\u63d0\u5347\u8ba1\u7b97\u6548\u7387\u54c8\u592b\u66fc\u6811\u7684\u5e26\u6743\u8def\u5f84\u957f\u5ea6\u6700\u5c0f\u7279\u6027\u662f\u5b9e\u73b0\u9ad8\u6548\u8ba1\u7b97\u7684\u6838\u5fc3\u4fdd\u969c\u638c\u63e1FastText\u7684\u57fa\u7ebf\u6a21\u578b\u7528\u6cd5\uff0c\u53ef\u5feb\u901f\u5f00\u5c55\u6587\u672c\u5206\u7c7b\u9879\u76ee\u7684\u521d\u671f\u9a8c\u8bc1\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[50,224,2755],"topic":[],"class_list":["post-56960","post","type-post","status-publish","format-standard","hentry","category-server","tag-50","tag-224","tag-2755"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>NLP\u81ea\u7136\u8bed\u8a00\u5904\u7406: FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/56960.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NLP\u81ea\u7136\u8bed\u8a00\u5904\u7406: FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb554\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf12\u6b21\u3002\u6700\u4f18\u4e8c\u53c9\u6811\uff1a\u4f7f\u6240\u6709\u53f6\u5b50\u8282\u70b9\u7684\u5e26\u6743\u8def\u5f84\u957f\u5ea6\u4e4b\u548c\uff08WPL\uff09\u6700\u5c0f\u7684\u4e8c\u53c9\u6811\u5e26\u6743\u8def\u5f84\u957f\u5ea6\uff08WPL\uff09\u8ba1\u7b97\u516c\u5f0f\uff1aWPL = \u03a3(\u53f6\u5b50\u8282\u70b9\u6743\u503c \u00d7 \u6839\u8282\u70b9\u5230\u8be5\u8282\u70b9\u7684\u8def\u5f84\u957f\u5ea6)FastText\u662f\u8fc1\u79fb\u5b66\u4e60\u4e2d\u7684\u91cd\u8981\u5de5\u5177\uff0c\u517c\u5177\u8bcd\u5411\u91cf\u8bad\u7ec3\u4e0e\u6587\u672c\u5206\u7c7b\u529f\u80fd\u5c42\u6b21Softmax\u901a\u8fc7\u54c8\u592b\u66fc\u6811\u5c06\u591a\u5206\u7c7b\u8f6c\u5316\u4e3a\u4e8c\u5206\u7c7b\u5e8f\u5217\uff0c\u5927\u5e45\u63d0\u5347\u8ba1\u7b97\u6548\u7387\u54c8\u592b\u66fc\u6811\u7684\u5e26\u6743\u8def\u5f84\u957f\u5ea6\u6700\u5c0f\u7279\u6027\u662f\u5b9e\u73b0\u9ad8\u6548\u8ba1\u7b97\u7684\u6838\u5fc3\u4fdd\u969c\u638c\u63e1FastText\u7684\u57fa\u7ebf\u6a21\u578b\u7528\u6cd5\uff0c\u53ef\u5feb\u901f\u5f00\u5c55\u6587\u672c\u5206\u7c7b\u9879\u76ee\u7684\u521d\u671f\u9a8c\u8bc1\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/56960.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-14T17:54:44+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/56960.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/56960.html\",\"name\":\"NLP\u81ea\u7136\u8bed\u8a00\u5904\u7406: FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-14T17:54:44+00:00\",\"dateModified\":\"2025-08-14T17:54:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/56960.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/56960.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/56960.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NLP\u81ea\u7136\u8bed\u8a00\u5904\u7406: FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"NLP\u81ea\u7136\u8bed\u8a00\u5904\u7406: FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/56960.html","og_locale":"zh_CN","og_type":"article","og_title":"NLP\u81ea\u7136\u8bed\u8a00\u5904\u7406: FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb554\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf12\u6b21\u3002\u6700\u4f18\u4e8c\u53c9\u6811\uff1a\u4f7f\u6240\u6709\u53f6\u5b50\u8282\u70b9\u7684\u5e26\u6743\u8def\u5f84\u957f\u5ea6\u4e4b\u548c\uff08WPL\uff09\u6700\u5c0f\u7684\u4e8c\u53c9\u6811\u5e26\u6743\u8def\u5f84\u957f\u5ea6\uff08WPL\uff09\u8ba1\u7b97\u516c\u5f0f\uff1aWPL = \u03a3(\u53f6\u5b50\u8282\u70b9\u6743\u503c \u00d7 \u6839\u8282\u70b9\u5230\u8be5\u8282\u70b9\u7684\u8def\u5f84\u957f\u5ea6)FastText\u662f\u8fc1\u79fb\u5b66\u4e60\u4e2d\u7684\u91cd\u8981\u5de5\u5177\uff0c\u517c\u5177\u8bcd\u5411\u91cf\u8bad\u7ec3\u4e0e\u6587\u672c\u5206\u7c7b\u529f\u80fd\u5c42\u6b21Softmax\u901a\u8fc7\u54c8\u592b\u66fc\u6811\u5c06\u591a\u5206\u7c7b\u8f6c\u5316\u4e3a\u4e8c\u5206\u7c7b\u5e8f\u5217\uff0c\u5927\u5e45\u63d0\u5347\u8ba1\u7b97\u6548\u7387\u54c8\u592b\u66fc\u6811\u7684\u5e26\u6743\u8def\u5f84\u957f\u5ea6\u6700\u5c0f\u7279\u6027\u662f\u5b9e\u73b0\u9ad8\u6548\u8ba1\u7b97\u7684\u6838\u5fc3\u4fdd\u969c\u638c\u63e1FastText\u7684\u57fa\u7ebf\u6a21\u578b\u7528\u6cd5\uff0c\u53ef\u5feb\u901f\u5f00\u5c55\u6587\u672c\u5206\u7c7b\u9879\u76ee\u7684\u521d\u671f\u9a8c\u8bc1\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/56960.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-14T17:54:44+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/56960.html","url":"https:\/\/www.wsisp.com\/helps\/56960.html","name":"NLP\u81ea\u7136\u8bed\u8a00\u5904\u7406: FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-14T17:54:44+00:00","dateModified":"2025-08-14T17:54:44+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/56960.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/56960.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/56960.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"NLP\u81ea\u7136\u8bed\u8a00\u5904\u7406: FastText\u5de5\u5177\u4e0e\u8fc1\u79fb\u5b66\u4e60\u57fa\u7840\u8be6\u89e3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/56960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=56960"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/56960\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=56960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=56960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=56960"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=56960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}