{"id":9314,"date":"2022-07-05T17:44:24","date_gmt":"2022-07-05T09:44:24","guid":{"rendered":"http:\/\/www.szryc.com\/?p=9314"},"modified":"2022-07-05T17:44:24","modified_gmt":"2022-07-05T09:44:24","slug":"eda%e4%b8%8e%e4%bb%a3%e7%a0%81%e5%ae%9e%e7%8e%b0%e6%96%b9%e6%a1%88%e5%8f%8a%e7%9b%b8%e5%85%b3%e5%ae%9e%e9%aa%8c%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=9314","title":{"rendered":"EDA\u4e0e\u4ee3\u7801\u5b9e\u73b0\u65b9\u6848\u53ca\u76f8\u5173\u5b9e\u9a8c\u8bbe\u8ba1"},"content":{"rendered":"
\u3000\u6570\u636e\u589e\u5f3a\u53ef\u4ee5\u7b97\u4f5c\u662f\u505a\u6df1\u5ea6\u5b66\u4e60<\/u>\u7b97\u6cd5\u7684\u4e00\u4e2a\u5c0ftrick\u3002\u8be5\u4ecb\u7ecd\u4e3b\u8981\u51fa\u81ea\u8bba\u6587\uff1aEDA<\/u>\uff1a Easy Data Augmenta<\/u>TI<\/u>on\u00a0Te<\/u>chniques for BoosTIng Perf<\/u>ormance on Text ClassificaTIon Tasks\uff3b1\uff3d<\/p>\n
\u3000\u3000\u8bba\u6587\u4e2d\u7684\u4e2d\u6587\u6587\u672c\u5206\u7c7b\u6570\u636e\u589e\u5f3a\u7684\u4ee3\u7801\u5b9e\u73b0\u53ef\u53c2\u8003EDA_NLP_for_Chinese\uff3b2\uff3d\uff0c\u5f53\u7136\u5728\u5b9e\u9645\u4f7f\u7528\u4e2d\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u60c5\u51b5\u518d\u505a\u4fee\u6539\u3002\u6587\u4e2d\u4ecb\u7ecd\u7684\u4ee3\u7801\u662f\u6211\u4e2a\u4eba\u5bf9\u8be5\u6e90\u7801\u7684\u6839\u636e\u6211\u4e2a\u4eba\u4e66\u5199\u4e60\u60ef\u8fdb\u884c\u7684\u4fee\u6539\u3002<\/p>\n
\u3000\u3000\u8bba\u6587\u7b80\u4ecb\u4e3b\u8981\u5185\u5bb9<\/strong><\/p>\n \u3000\u3000\u8fd9\u7bc7\u8bba\u6587\u4e2d\u4f5c\u8005<\/u>\u63d0\u51fa\u6240\u8c13\u7684\u7b80\u5355\u6570\u636e\u589e\u5f3a\uff08Easy Data AugmentaTIon\uff0c EDA\uff09\uff0c\u5305\u62ec\u4e86\u56db\u79cd\u65b9\u6cd5\uff1a\u300c\u540c\u4e49\u8bcd\u66ff\u6362\u3001\u968f\u673a\u63d2\u5165\u3001\u968f\u673a\u4ea4\u6362\u3001\u968f\u673a\u5220\u9664\u300d\u3002\u4f5c\u8005\u4f7f\u7528\u4e86CNN\u548cRNN\u5206\u522b\u5728\u4e94\u79cd\u4e0d\u540c\u7684\u6587\u672c\u5206\u7c7b\u4efb\u52a1\u4e2d\u505a\u4e86\u5b9e\u9a8c\uff0c\u5b9e\u9a8c\u8868\u660e\uff0cEDA\u63d0\u5347\u4e86\u5206\u7c7b\u6548\u679c\u3002\u4f5c\u8005\u4e5f\u8868\u793a\uff0c\u5e73\u5747\u60c5\u51b5\u4e0b\uff0c\u4ec5\u4f7f\u752850%\u7684\u539f\u59cb\u6570\u636e\uff0c\u518d\u4f7f\u7528EDA\u8fdb\u884c\u6570\u636e\u589e\u5f3a\uff0c\u80fd\u53d6\u5f97\u548c\u4f7f\u7528\u6240\u6709\u6570\u636e\u60c5\u51b5\u4e0b\u8bad\u7ec3\u5f97\u5230\u7684\u51c6\u786e\u7387\u3002<\/p>\n \u3000\u3000\u6587\u4e2d\u4f5c\u8005\u63d0\u51fa\u300c\u901a\u7528\u7684\u300dNLP\u6570\u636e\u589e\u5f3a\u6280\u672f\uff0c\u547d\u540d\u4e3aEDA\u3002\u540c\u65f6\u4f5c\u8005\u8868\u793a\uff0c\u4ed6\u4eec\u662f\u7b2c\u4e00\u4e2a\u7ed9\u6570\u636e\u589e\u5f3a\u5f15\u5165\u6587\u672c\u7f16\u8f91\u6280\u672f\u7684\u4eba\u3002EDA\u7684\u63d0\u51fa\u4e5f\u662f\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u53d7\u8ba1\u7b97\u673a<\/u>\u89c6\u89c9\u4e0a\u589e\u5f3a\u6280\u672f\u7684\u542f\u53d1\u800c\u5f97\u5230\u3002\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecdEDA\u7684\u56db\u4e2a\u65b9\u6cd5\uff1a<\/p>\n \u3000\u3000\u5bf9\u4e8e\u8bad\u7ec3\u96c6\u4e2d\u7684\u6bcf\u4e2a\u53e5\u5b50\uff0c\u6267\u884c\u4e0b\u5217\u64cd\u4f5c\uff1a<\/p>\n \u3000\u3000\u540c\u4e49\u8bcd\u66ff\u6362\uff08Synonym Replacement\uff0c SR\uff09\uff1a\u4ece\u53e5\u5b50\u4e2d\u968f\u673a\u9009\u53d6n\u4e2a\u4e0d\u5c5e\u4e8e\u505c\u7528\u8bcd\u96c6\u7684\u5355\u8bcd\uff0c\u5e76\u968f\u673a\u9009\u62e9\u5176\u540c\u4e49\u8bcd\u66ff\u6362\u5b83\u4eec\uff1b<\/p>\n \u3000\u3000\u968f\u673a\u63d2\u5165\uff08Random Insertion\uff0c RI\uff09\uff1a\u968f\u673a\u7684\u627e\u51fa\u53e5\u4e2d\u67d0\u4e2a\u4e0d\u5c5e\u4e8e\u505c\u7528\u8bcd\u96c6\u7684\u8bcd\uff0c\u5e76\u6c42\u51fa\u5176\u968f\u673a\u7684\u540c\u4e49\u8bcd\uff0c\u5c06\u8be5\u540c\u4e49\u8bcd\u63d2\u5165\u53e5\u5b50\u7684\u4e00\u4e2a\u968f\u673a\u4f4d\u7f6e\u3002\u91cd\u590dn\u6b21\uff1b<\/p>\n \u3000\u3000\u968f\u673a\u4ea4\u6362\uff08Random Swap\uff0c\u00a0RS<\/u>\uff09\uff1a\u968f\u673a\u7684\u9009\u62e9\u53e5\u4e2d\u4e24\u4e2a\u5355\u8bcd\u5e76\u4ea4\u6362\u5b83\u4eec\u7684\u4f4d\u7f6e\u3002\u91cd\u590dn\u6b21\uff1b<\/p>\n \u3000\u3000\u968f\u673a\u5220\u9664\uff08Random Deletion\uff0c RD\uff09\uff1a\u4ee5 \u7684\u6982\u7387\uff0c\u968f\u673a\u7684\u79fb\u9664\u53e5\u4e2d\u7684\u6bcf\u4e2a\u5355\u8bcd\uff1b<\/p>\n \u3000\u3000\u8fd9\u4e9b\u65b9\u6cd5\u91cc\uff0c\u53ea\u6709SR\u66fe\u7ecf\u88ab\u4eba\u7814\u7a76\u8fc7\uff0c\u5176\u4ed6\u4e09\u79cd\u65b9\u6cd5\u90fd\u662f\u672c\u6587\u4f5c\u8005\u9996\u6b21\u63d0\u51fa\u3002<\/p>\n \u3000\u3000\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u957f\u53e5\u5b50\u76f8\u5bf9\u4e8e\u77ed\u53e5\u5b50\uff0c\u5b58\u5728\u4e00\u4e2a\u7279\u6027\uff1a\u957f\u53e5\u6bd4\u77ed\u53e5\u6709\u66f4\u591a\u7684\u5355\u8bcd\uff0c\u56e0\u6b64\u957f\u53e5\u5728\u4fdd\u6301\u539f\u6709\u7684\u7c7b\u522b\u6807\u7b7e\u7684\u60c5\u51b5\u4e0b\uff0c\u80fd\u5438\u6536\u66f4\u591a\u7684\u566a\u58f0\u3002\u4e3a\u4e86\u5145\u5206\u5229\u7528\u8fd9\u4e2a\u7279\u6027\uff0c\u4f5c\u8005\u63d0\u51fa\u4e00\u4e2a\u65b9\u6cd5\uff1a\u57fa\u4e8e\u53e5\u5b50\u957f\u5ea6\u6765\u53d8\u5316\u6539\u53d8\u7684\u5355\u8bcd\u6570\uff0c\u6362\u53e5\u8bdd\u8bf4\uff0c\u5c31\u662f\u4e0d\u540c\u7684\u53e5\u957f\uff0c\u56e0\u589e\u5f3a\u800c\u6539\u53d8\u7684\u5355\u8bcd\u6570\u53ef\u80fd\u4e0d\u540c\u3002\u5177\u4f53\u5b9e\u73b0\uff1a\u5bf9\u4e8eSR\u3001RI\u3001RS\uff0c\u9075\u5faa\u516c\u5f0f\uff1a = * \uff0c \u8868\u793a\u53e5\u957f\uff0c \u8868\u793a\u4e00\u4e2a\u53e5\u5b50\u4e2d\u9700\u8981\u6539\u53d8\u7684\u5355\u8bcd\u6570\u7684\u6bd4\u4f8b\u3002\u5728RD\u4e2d\uff0c\u8ba9 \u548c \u76f8\u7b49\u3002\u53e6\u5916\uff0c\u6bcf\u4e2a\u539f\u59cb\u53e5\u5b50\uff0c\u751f\u6210 \u4e2a\u589e\u5f3a\u7684\u53e5\u5b50\u3002<\/p>\n \u3000\u3000\u76f8\u5173\u5b9e\u9a8c<\/strong><\/p>\n \u3000\u3000\u5b9e\u9a8c\u8bbe\u7f6e\u4f5c\u8005\u4f7f\u7528\u4e865\u4e2a\u4e0d\u540c\u7684Benchmark\u6570\u636e\u96c6\uff0c\u5c31\u6709\u4e865\u79cd\u6587\u672c\u5206\u7c7b\u4efb\u52a1\uff0c\u4f7f\u7528\u4e86\u4e24\u4e2astate-of-the-art\u6587\u672c\u5206\u7c7b\u7684\u6a21\u578b\uff1aLSTM-RNN\uff3b3\uff3d\u548cCNNs\uff3b4\uff3d\u3002\u5e76\u5c06\u6709\u65e0EDA\u4f5c\u4e3a\u5bf9\u6bd4\uff0c\u540c\u65f6\u56e0\u4e3a\u6b32\u5f97\u5230EDA\u5728\u5c0f\u6570\u636e\u96c6\u4e0a\u7684\u5b9e\u9a8c\u6548\u679c\uff0c\u5c06\u8bad\u7ec3\u6570\u636e\u96c6\u5927\u5c0f\u5206\u4e3a500\u30012000\u30015000\u3001\u5b8c\u6574\u8fd94\u4e2a\u91cf\u7ea7\u3002\u6bcf\u4e2a\u8bad\u7ec3\u6548\u679c\u662f\u57285\u4e2a\u6587\u672c\u5206\u7c7b\u4efb\u52a1\u4e0a\u7684\u6548\u679c\u5747\u503c\u3002<\/p>\n \u3000\u3000\u5b9e\u9a8c\u7ed3\u679c\u5728\u5b8c\u6574\u7684\u6570\u636e\u96c6\u4e0a\uff0c\u5e73\u5747\u6027\u80fd\u63d0\u53470.8%\uff1b\u5728\u5927\u5c0f\u4e3a500\u7684\u8bad\u7ec3\u96c6\u4e0a\uff0c\u63d0\u53473.0%\u3002\u5177\u4f53\u89c1\u5982\u4e0b\uff1a<\/p>\n \u3000\u3000\u4f5c\u8005\u6307\u51fa\uff0cEDA\u5728\u5c0f\u8bad\u7ec3\u96c6\u4e0a\u6709\u66f4\u597d\u7684\u6027\u80fd\u6548\u679c\u3002\u82e5\u4f7f\u7528\u5b8c\u6574\u7684\u8bad\u7ec3\u96c6\u6570\u636e\uff0c\u4e0d\u4f7f\u7528EDA\u7684\u60c5\u51b5\u4e0b\uff0c\u6700\u4f73\u7684\u5e73\u5747\u51c6\u786e\u7387\u8fbe\u523088.3%\u3002\u82e5\u4f7f\u752850%\u7684\u8bad\u7ec3\u96c6\u6570\u636e\u5e76\u4e14\u4f7f\u7528EDA\u7684\u60c5\u51b5\u4e0b\uff0c\u6700\u4f73\u7684\u5e73\u5747\u51c6\u786e\u7387\u8fbe\u523088.6%\uff0c\u8d85\u8fc7\u524d\u8ff0\u60c5\u51b5\u3002<\/p>\n \u3000\u3000\u95ee\u9898\u603b\u7ed3\u95ee\u98981\uff1a\u82e5\u53e5\u5b50\u4e2d\u6709\u591a\u4e2a\u5355\u8bcd\u88ab\u6539\u53d8\u4e86\uff0c\u90a3\u4e48\u53e5\u5b50\u7684\u539f\u59cb\u6807\u7b7e\u7c7b\u522b\u662f\u5426\u8fd8\u4f1a\u6709\u6548\uff1f<\/p>\n \u3000\u3000\u4f5c\u8005\u505a\u4e86\u5b9e\u9a8c\uff1a\u9996\u5148\uff0c\u4f7f\u7528RNN\u5728\u4e00\u672a\u4f7f\u7528EDA\u8fc7\u7684\u6570\u636e\u96c6\u4e0a\u8fdb\u884c\u8bad\u7ec3\uff1b\u7136\u540e\uff0c\u5bf9\u6d4b\u8bd5<\/u>\u96c6\u8fdb\u884cEDA\u6269\u589e\uff0c\u6bcf\u4e2a\u539f\u59cb\u53e5\u5b50\u6269\u589e\u51fa9\u4e2a\u589e\u5f3a\u7684\u53e5\u5b50\uff0c\u5c06\u8fd9\u4e9b\u53e5\u5b50\u4f5c\u4e3a\u6d4b\u8bd5\u96c6\u8f93\u5165\u5230RNN\u4e2d\uff1b\u6700\u540e\uff0c\u4ece\u6700\u540e\u4e00\u4e2a\u5168\u8fde\u63a5\u5c42\u53d6\u51fa\u8f93\u51fa\u5411\u91cf\u3002\u5e94\u7528t-SNE\u6280\u672f\uff0c\u5c06\u8fd9\u4e9b\u5411\u91cf\u4ee5\u4e8c\u7ef4\u7684\u5f62\u5f0f\u8868\u793a\u51fa\u6765\u3002\u5b9e\u9a8c\u7ed3\u679c\u5c31\u662f\uff0c\u589e\u5f3a\u53e5\u5b50\u7684\u9690\u85cf\u7a7a\u95f4\u8868\u5f81\u7d27\u7d27\u73af\u7ed5\u5728\u8fd9\u4e9b\u539f\u59cb\u53e5\u5b50\u7684\u5468\u56f4\u3002\u4f5c\u8005\u7684\u7ed3\u8bba\u662f\uff0c\u53e5\u5b50\u4e2d\u6709\u591a\u4e2a\u5355\u8bcd\u88ab\u6539\u53d8\u4e86\uff0c\u90a3\u4e48\u53e5\u5b50\u7684\u539f\u59cb\u6807\u7b7e\u7c7b\u522b\u5c31\u53ef\u80fd\u65e0\u6548\u4e86\u3002<\/p>\n \u3000\u3000\u5bf9\u4e8eEDA\u4e2d\u7684\u6bcf\u4e2a\u65b9\u6cd5\uff0c\u5355\u72ec\u63d0\u5347\u7684\u6548\u679c\u5982\u4f55\uff1f<\/strong><\/p>\n \u3000\u3000\u4f5c\u8005\u505a\u5b9e\u9a8c\u5f97\u51fa\u7684\u7ed3\u8bba\u662f\uff0c\u5bf9\u4e8e\u6bcf\u4e2a\u65b9\u6cd5\u5728\u5c0f\u6570\u636e\u96c6\u4e0a\u53d6\u5f97\u7684\u6548\u679c\u66f4\u660e\u663e\u3002 \u5982\u679c\u592a\u5927\u7684\u8bdd\uff0c\u751a\u81f3\u4f1a\u964d\u4f4e\u6a21\u578b\u8868\u73b0\u6548\u679c\uff0c=0.1\u4f3c\u4e4e\u662f\u6700\u4f73\u503c\u3002<\/p>\n \u3000\u3000\u5982\u4f55\u9009\u53d6\u5408\u9002\u7684\u589e\u5f3a\u8bed\u53e5\u4e2a\u6570\uff1f<\/strong><\/p>\n \u3000\u3000\u5728\u8f83\u5c0f\u7684\u6570\u636e\u96c6\u4e0a\uff0c\u6a21\u578b\u5bb9\u6613\u8fc7\u62df\u5408\uff0c\u56e0\u6b64\u751f\u6210\u591a\u4e00\u70b9\u7684\u8bed\u6599\u80fd\u53d6\u5f97\u8f83\u597d\u7684\u6548\u679c\u3002\u5bf9\u4e8e\u8f83\u5927\u7684\u6570\u636e\u96c6\uff0c\u6bcf\u53e5\u8bdd\u751f\u6210\u8d85\u8fc74\u4e2a\u53e5\u5b50\u5bf9\u4e8e\u6a21\u578b\u7684\u6548\u679c\u63d0\u5347\u5c31\u6ca1\u6709\u592a\u5927\u5e2e\u52a9\u3002\u56e0\u6b64\uff0c\u4f5c\u8005\u63a8\u8350\u5b9e\u9645\u4f7f\u7528\u4e2d\u7684\u4e00\u4e9b\u53c2\u6570\u9009\u53d6\u5982\u4e0b\u8868\u6240\u793a\uff0c\u5176\u4e2d\uff0c \uff1a\u6bcf\u4e2a\u539f\u59cb\u8bed\u53e5\u7684\u589e\u5f3a\u8bed\u53e5\u4e2a\u6570\uff1b\uff1a\u8bad\u7ec3\u96c6\u5927\u5c0f<\/p>\n \u3000\u3000EDA\u63d0\u9ad8\u6587\u672c\u5206\u7c7b\u7684\u6548\u679c\u7684\u539f\u7406\u662f\u4ec0\u4e48\uff1f<\/strong><\/p>\n \u3000\u3000\u751f\u6210\u7c7b\u4f3c\u4e8e\u539f\u59cb\u6570\u636e\u7684\u589e\u5f3a\u6570\u636e\u4f1a\u5f15\u5165\u4e00\u5b9a\u7a0b\u5ea6\u7684\u566a\u58f0\uff0c\u6709\u52a9\u4e8e\u9632\u6b62\u8fc7\u62df\u5408\uff1b<\/p>\n \u3000\u3000\u4f7f\u7528EDA\u53ef\u4ee5\u901a\u8fc7\u540c\u4e49\u8bcd\u66ff\u6362\u548c\u968f\u673a\u63d2\u5165\u64cd\u4f5c\u5f15\u5165\u65b0\u7684\u8bcd\u6c47\uff0c\u5141\u8bb8\u6a21\u578b\u6cdb\u5316\u5230\u90a3\u4e9b\u5728\u6d4b\u8bd5\u96c6\u4e2d\u4f46\u4e0d\u5728\u8bad\u7ec3\u96c6\u4e2d\u7684\u5355\u8bcd\uff1b<\/p>\n \u3000\u3000\u4e3a\u4ec0\u4e48\u4f7f\u7528EDA\u800c\u4e0d\u4f7f\u7528\u8bed\u5883\u589e\u5f3a\u3001\u566a\u58f0\u3001GAN\u548c\u53cd\u5411\u7ffb\u8bd1\uff1f<\/strong><\/p>\n \u3000\u3000\u4e0a\u8ff0\u7684\u5176\u5b83\u589e\u5f3a\u6280\u672f\u4f5c\u8005\u90fd\u5e0c\u671b\u4f60\u4f7f\u7528\uff0c\u5b83\u4eec\u786e\u5b9e\u5728\u4e00\u4e9b\u60c5\u51b5\u4e0b\u53d6\u5f97\u6bd4EDA\u8f83\u597d\u7684\u6027\u80fd\uff0c\u4f46\u662f\uff0c\u7531\u4e8e\u9700\u8981\u4e00\u4e2a\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff0c\u8fd9\u4e9b\u6280\u672f\u5f80\u5f80\u5728\u5176\u53d6\u5f97\u7684\u6548\u679c\u9762\u524d\uff0c\u4ed8\u51fa\u7684\u5b9e\u73b0\u4ee3\u4ef7\u66f4\u9ad8\u3002\u800cEDA\u7684\u76ee\u6807\u5728\u4e8e\uff0c\u4f7f\u7528\u7b80\u5355\u65b9\u4fbf\u7684\u6280\u672f\u5c31\u80fd\u53d6\u5f97\u76f8\u63a5\u8fd1\u7684\u7ed3\u679c\u3002<\/p>\n \u3000\u3000EDA\u662f\u5426\u6709\u53ef\u80fd\u4f1a\u964d\u4f4e\u6a21\u578b\u7684\u6027\u80fd\uff1f<\/strong><\/p>\n \u3000\u3000\u786e\u5b9e\u6709\u53ef\u80fd\u3002\u539f\u56e0\u5728\u4e8e\uff0cEDA\u6709\u53ef\u80fd\u5728\u589e\u5f3a\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6539\u53d8\u4e86\u53e5\u5b50\u7684\u610f\u601d\uff0c\u4f46\u5176\u4ecd\u4fdd\u7559\u539f\u59cb\u7684\u7c7b\u522b\u6807\u7b7e\uff0c\u4ece\u800c\u4ea7\u751f\u4e86\u6807\u7b7e\u9519\u8bef\u7684\u53e5\u5b50\u3002<\/p>\n \u3000\u3000\u4e2d\u6587\u6587\u672c\u5206\u7c7b\u6570\u636e\u589e\u5f3a\u4ee3\u7801\u5b9e\u73b0\u4ee3\u7801\u5b9e\u73b0\u4e2d\u662f\u9700\u8981jieba\u5206\u8bcd\uff0c\u505c\u7528\u8bcd\uff0c\u4ee5\u53ca\u4e00\u4e2a\u63d0\u4f9b\u540c\u4e49\u8bcd\u7684\u5305\uff08Synonyms\uff3b5\uff3d\uff09\uff0c\u672c\u4ee3\u7801\u53c2\u8003\u5730\u5740\uff1aChineseTextEDA\uff3b6\uff3d<\/p>\n \u3000\u3000\u4f7f\u7528\u65b9\u5f0f<\/p>\n \u3000\u3000\u672c\u4ee3\u7801\u6682\u65f6\u4e0d\u8003\u8651\u4e0a\u4f20\u5230pi<\/u>p\u4e0a\uff0c\u672c\u4ee3\u7801\u53ea\u9700\u8981\u8fdb\u5165chinese-text-eda\u76ee\u5f55\u4e0b\u540e\uff0c\u6267\u884c\uff1a<\/p>\n \u3000\u3000python<\/u>\u00a0setup.py install<\/p>\n \u3000\u3000\u5373\u53ef\u5b89\u88c5\u4f7f\u7528\u3002\u4e5f\u53ef\u4ee5\u5c06\u4ee3\u7801\u590d\u5236\u5230\u9879\u76ee\u5f55\u4e0b\u4f7f\u7528\u3002<\/p>\n \u3000\u3000\u5728\u4e2d\u6587\u6587\u672c\u5206\u7c7b\u8fc7\u7a0b\u4e2d\u9700\u8981\u4f7f\u7528\u6570\u636e\u589e\u5f3a\u7684\u65b9\u5f0f\u80fd\u591f\u5728\u6570\u636e\u91cf\u5c11\u7684\u60c5\u51b5\u8d77\u5230\u4e00\u5b9a\u6548\u679c\u3002<\/p>\n \u3000\u3000\u56fa\u5b9a\u683c\u5f0f\u6570\u636e\u589e\u5f3a<\/p>\n \u3000\u3000\u8be5\u79cd\u65b9\u5f0f\u63d0\u4f9b\u53ea\u9700\u8981\u5c06\u5f85\u589e\u5f3a\u7684\u6570\u636e\u5904\u7406\u6210\u5982\u4e0b\u683c\u5f0f\uff0c\u7136\u540e\u5728\u4e66\u5199\u4e00\u4e2apy\u811a\u672c\uff0c\u5728\u547d\u4ee4\u884c\u8fd0\u884c\u5373\u53ef\u3002<\/p>\n \u3000\u3000label sentence<\/p>\n \u3000\u3000\u5176\u4e2d\u6570\u636e\u7684\u6807\u7b7e\u5728\u524d\uff0c\u6587\u672c\u5728\u540e\uff0c\u6807\u7b7e\u548c\u6587\u672c\u4e4b\u95f4\u4f7f\u7528\\t\uff08tab\uff09\u5206\u5272\u3002<\/p>\n \u3000\u3000\u4f7f\u7528\u65b9\u5f0f\u5982\u4e0b\uff0cpython \u6587\u4ef6\u4e3aexample.py<\/p>\n \u3000\u3000from eda import SimpleEDAEnhancesed = SimpleEDAEnhance\uff08\uff09sed.simple_eda_enhance\uff08\uff09<\/p>\n \u3000\u3000\u7136\u540e\u5728\u63a7\u5236\u53f0\u4e2d\u8f93\u5165\u76f8\u5173\u53c2\u6570\u5373\u53ef\u3002\u63a7\u5236\u53f0\u8f93\u5165\u6837\u4f8b\u5982\u4e0b\uff1a<\/p>\n \u3000\u3000python example.py --input trai<\/u>n.txt --output eda_train.txt --num_aug 2 --alpha 0.2<\/p>\n \u3000\u3000\u76f8\u5173\u53c2\u6570\u8bf4\u660e\uff1a<\/p>\n \u3000\u3000--input\uff1a \u539f\u59cb\u6570\u636e\u7684\u8f93\u5165\u6587\u4ef6\uff0c must<\/p>\n \u3000\u3000--output\uff1a \u589e\u5f3a\u6570\u636e\u540e\u7684\u8f93\u51fa\u6587\u4ef6\uff0c optional\uff0c\u5982\u679c\u672a\u586b\u5199\uff0c\u4f1a\u5728input\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2aeda\u5f00\u5934\u7684\u7ed3\u679c<\/p>\n \u3000\u3000--num_aug\uff1a \u4e00\u6761\u6570\u636e\u589e\u5f3a\u51e0\u6761\u6570\u636e\uff0coptional\uff0c default 9<\/p>\n \u3000\u3000--alpha\uff1a \u6bcf\u6761\u8bed\u53e5\u4e2d\u5c06\u4f1a\u88ab\u6539\u53d8\u7684\u5355\u8bcd\u6570\u5360\u6bd4\uff0c optional\uff0c default 0.1<\/p>\n \u3000\u3000\u81ea\u5b9a\u4e49\u683c\u5f0f\u6570\u636e\u589e\u5f3a<\/strong><\/p>\n \u3000\u3000\u6709\u65f6\u6570\u636e\u683c\u5f0f\u76f8\u5bf9\u590d\u6742\uff0c\u8fd9\u65f6\u9700\u8981\u6211\u4eec\u5c06\u589e\u5f3a\u7684\u65b9\u6cd5\u5d4c\u5165\u5230\u6570\u636e\u5904\u7406\u7684\u7a0b\u5e8f\u4e2d\uff0c\u8fd9\u65f6\u53ef\u4ee5\u53c2\u8003\u5982\u4e0b\u65b9\u6cd5\uff0c \u6848\u4f8b\u4ee3\u7801\u5982\u4e0b\uff0c\u8fd9\u4e5f\u662f\u5b9e\u4f8b\u5316EDA\u8fd9\u4e2a\u7c7b<\/p>\n \u3000\u3000\u5176\u4e2d\uff0cEDA\u521d\u59cb\u5316\u7c7b\u7684\u53c2\u6570\u5982\u4e0b\uff1a<\/p>\n \u3000\u3000num_aug\uff1a \u4e00\u6761\u6570\u636e\u589e\u5f3a\u5230\u591a\u5c11\u6761\uff0coptional\uff0c default 9<\/p>\n \u3000\u3000stop_words\uff1a \u589e\u5f3a\u8fc7\u7a0b\u4f7f\u7528\u7684\u505c\u7528\u8bcd\uff0c optional\uff0c default use hit\u63d0\u4f9b\u7684\u505c\u7528\u8bcd<\/p>\n \u3000\u3000stop_words_type\uff1a \u505c\u7528\u8bcd\u7c7b\u578b\uff0coptional\uff0c select scope\uff1a \uff3b\u201chit\u201d\uff0c \u201ccn\u201d\uff0c \u201cbaidu\u201d\uff0c \u201cscu\u201d\uff3d<\/p>\n \u3000\u3000EDA\u7c7b\u4e2d\u7684\u6570\u636e\u589e\u5f3a\u65b9\u6cd5\u7684\u5206\u6570\u5982\u4e0b\uff1a<\/p>\n \u3000\u3000sentence\uff1a must\uff0c \u5f85\u589e\u5f3a\u7684\u8bed\u53e5;<\/p>\n \u3000\u3000alpha_sr\uff1a default=0.1\uff0c\u8fd1\u4e49\u8bcd\u66ff\u6362\u8bcd\u8bed\u7684\u6bd4\u4f8b<\/p>\n \u3000\u3000alpha_ri\uff1a default=0.1\uff0c\u968f\u673a\u63d2\u5165\u8bcd\u8bed\u4e2a\u6570\u5360\u8bed\u53e5\u8bcd\u8bed\u6570\u636e\u7684\u6bd4\u4f8b<\/p>\n \u3000\u3000alpha_rs\uff1a default=0.1\uff0c\u968f\u673a\u4ea4\u6362\u8bcd\u8bed\u4e2a\u6570\u5360\u8bed\u53e5\u8bcd\u8bed\u6570\u636e\u7684\u6bd4\u4f8b<\/p>\n \u3000\u3000p_rd\uff1a default=0.1\uff0c\u968f\u673a\u5220\u9664\u8bcd\u8bed\u4e2a\u6570\u5360\u8bed\u53e5\u8bcd\u8bed\u6570\u636e\u7684\u6bd4\u4f8b<\/p>\n \u3000\u3000\u4e00\u4e2a\u7b80\u5355\u7684\u6d4b\u8bd5\u5982\u4e0b\uff1a<\/p>\n \u3000\u3000from ChineseTextEDA.eda import EDAeda = EDA\uff08\uff09res = eda.eda\uff08\u201c\u6211\u4eec\u5c31\u50cf\u84b2\u516c\u82f1\uff0c\u6211\u4e5f\u7948\u7977\u7740\u80fd\u548c\u4f60\u98de\u53bb\u540c\u4e00\u7247\u571f\u5730\u201d\uff09print\uff08res\uff09<\/p>\n \u3000\u3000\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n \u3000\u3000\uff3b\u2018\u6211\u4eec \u5c31 \u50cf \u84b2\u516c\u82f1 \uff0c \u6211 \u4e5f \u5929\u4e3b \u7740 \u80fd \u548c \u4f60 \u98de\u53bb \u540c \u4e00\u7247 \u571f\u5730\u2019\uff0c \u2018\u6211\u4eec \u5c31 \u50cf \u84b2\u516c\u82f1 \uff0c \u6211 \u4e5f \u7948\u7977 \u7740 \u80fd \u548c \u4f60 \u98de\u53bb \u540c \u4e00\u7247 \u571f\u5730\u2019\uff0c \u2018\u6211\u4eec \u5c31 \u50cf \u84b2\u516c\u82f1 \uff0c \u6211 \u4e5f \u7948\u7977 \u548c \u80fd \u7740 \u4f60 \u98de\u53bb \u540c \u4e00\u7247 \u571f\u5730\u2019\uff0c \u2018\u6211\u4eec \u5c31 \u50cf \u84b2\u516c\u82f1 \uff0c \u6211 \u4e5f \u7948\u7977 \u7740 \u805a\u82b1 \u80fd \u548c \u4f60 \u98de\u53bb \u540c \u4e00\u7247 \u571f\u5730\u2019\uff0c \u2018\u6211\u4eec \u5c31 \u50cf \u84b2\u516c\u82f1 \uff0c \u6211 \u4e5f \u7948\u7977 \u7740 \u80fd \u548c \u98de\u53bb \u4f60 \u540c \u4e00\u7247 \u571f\u5730\u2019\uff0c \u2018\u6211\u4eec \u5c31 \u50cf \u84b2\u516c\u82f1 \uff0c \u6211 \u4e5f \u7948\u7977 \u80fd \u548c \u4f60 \u98de\u53bb \u540c \u4e00\u7247 \u571f\u5730\u2019\uff0c \u2018\u6211\u4eec \u5c31 \u50cf \uff0c \u6211 \u4e5f \u7948\u7977 \u7740 \u80fd \u548c \u4f60 \u98de\u53bb \u540c \u4e00\u7247 \u571f\u5730\u2019\uff0c \u2018\u6211\u4eec \u5c31 \u50cf \u84b2\u516c\u82f1 \uff0c \u6211 \u4e5f \u7948\u7977 \u7740 \u80fd \u548c \u4f60 \u98de\u53bb \u540c \u5047\u5982 \u4e00\u7247 \u571f\u5730\u2019\uff0c \u2018\u6211\u4eec \u5c31 \u50cf \u84b2\u516c\u82f1 \uff0c \u6211 \u4e5f \u7948\u7977 \u7740 \u80fd \u548c \u4f60 \u76f4\u5954 \u540c \u4e00\u7247 \u571f\u5730\u2019\uff0c \u2018\u6211\u4eec \u5c31 \u50cf \u84b2\u516c\u82f1 \uff0c \u6211 \u4e5f \u7948\u7977 \u7740 \u80fd \u548c \u4f60 \u98de\u53bb \u540c \u4e00\u7247 \u571f\u5730\u2019\uff3d<\/p>\n","protected":false},"excerpt":{"rendered":" \u3000\u6570\u636e\u589e\u5f3a\u53ef\u4ee5\u7b97\u4f5c\u662f\u505a\u6df1\u5ea6\u5b66\u4e60\u7b97\u6cd5\u7684\u4e00\u4e2a\u5c0ftrick\u3002\u8be5\u4ecb\u7ecd\u4e3b\u8981\u51fa\u81ea\u8bba\u6587\uff1aEDA\uff1a Easy Data Aug […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/9314"}],"collection":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9314"}],"version-history":[{"count":1,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/9314\/revisions"}],"predecessor-version":[{"id":9319,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/9314\/revisions\/9319"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9314"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}