{"id":5911,"date":"2015-07-07T11:44:27","date_gmt":"2015-07-07T03:44:27","guid":{"rendered":"https:\/\/kyle.ai\/blog\/?p=5911"},"modified":"2015-07-07T11:54:14","modified_gmt":"2015-07-07T03:54:14","slug":"%e4%bd%bf%e7%94%a8%e6%90%9c%e7%8b%97%e8%af%8d%e5%ba%93%e5%88%b6%e4%bd%9cmmseg%e8%87%aa%e5%ae%9a%e4%b9%89%e8%af%8d%e5%85%b8","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/5911.html","title":{"rendered":"\u4f7f\u7528\u641c\u72d7\u8bcd\u5e93\u5236\u4f5cmmseg\u81ea\u5b9a\u4e49\u8bcd\u5178"},"content":{"rendered":"<p>coreseek\u7684\u4ecb\u7ecd\u548c\u5b89\u88c5\u8aac\u660e\u53ef\u53c2\u8003<a title=\"Sphinx\/Coreseek\u642d\u5efa\u5168\u6587\u641c\u7d22\u5f15\u64ce\u4e8c\u4e09\u4e8b\" href=\"http:\/\/blog.atime.me\/note\/sphinx-coreseek-summary.html\">\u8fd9\u91cc<\/a>\uff0c\u4e0d\u518d\u8d58\u8ff0\u3002\u4ee5\u4e0b\u662f\u63a5\u4e0b\u6765\u9700\u8981\u6ce8\u610f\u7684\u51e0\u70b9:<\/p>\n<ul>\n<li>\u4e0b\u9762\u5047\u8bbelibmmseg\u5b89\u88c5\u4e8e\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\/usr\/local\/mmseg3\r\n<\/pre>\n<\/li>\n<li>\u751f\u6210\u7684mmseg\u8bcd\u5178\u6587\u4ef6\u5fc5\u987b\u4e3aUTF-8\u7f16\u7801\u3002<\/li>\n<li>\u4e0b\u9762\u7528\u5230\u7684\u4e24\u4e2apython\u811a\u672c\u89c1<a title=\"\u8f85\u52a9\u811a\u672c\" href=\"http:\/\/blog.atime.me\/note\/mmseg-custom-dict.html#dcaa84\">\u8f85\u52a9\u811a\u672c<\/a><\/li>\n<\/ul>\n<h2 id=\"a91443\">\u63d0\u53d6\u641c\u72d7\u5b57\u5e93<\/h2>\n<p>\u76ee\u524d\u53ea\u652f\u6301\u641c\u72d7\u8bcd\u5e93\uff0c\u641c\u72d7\u8bcd\u5e93\u53ef\u4ee5\u5728<a title=\"\u641c\u72d7\u8bcd\u5e93\u4e0b\u8f7d\u9875\u9762\" href=\"http:\/\/pinyin.sogou.com\/dict\/\">\u8fd9\u91cc<\/a>\u8fd9\u91cc\u4e0b\u8f7d\u3002<\/p>\n<p>\u4e0b\u8f7d\u540e\u7684\u8bcd\u5e93\u6587\u4ef6(.scel)\u653e\u5728sougou\u76ee\u5f55\u4e0b\uff0c\u7136\u540e\u8fd0\u884c\u811a\u672c<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n.\/extract-sougou-dict.py sougou\/*.scel -o sougou-dict.txt -mmseg\r\n<\/pre>\n<p>\u751f\u6210\u7684sougou-dict.txt\u53ef\u4f9bmmseg\u5e93\u5206\u8bcd\u4f7f\u7528\u3002<\/p>\n<h2 id=\"50c2ea\">\u5408\u5e76\u5df2\u6709\u7684\u8bcd\u5178\u548c\u81ea\u5b9a\u4e49\u8bcd\u5178<\/h2>\n<p>\u5047\u8bbe\u5df2\u6709\u7684\u8bcd\u5178\u6587\u4ef6\u4e3aunigram.txt\uff0c\u5219\u8fd0\u884c\u811a\u672c<\/p>\n<div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">.\/merge-mmseg-dict.py -a unigram.txt -b sougou-dict.txt -o merged.txt<\/pre>\n<\/div>\n<p>\u8fd9\u91cc\u4ee5unigram.txt\u4e3a\u4e3b\u8bcd\u5178\uff0c\u610f\u5473\u7740\u5982\u679c\u5728\u5408\u5e76\u7684\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u91cd\u590d\u8bcd\u7ec4\uff0c\u5219\u5ffd\u7565sougou-dict.txt \u4e2d\u7684\u91cd\u590d\u8bcd\u7ec4\u3002<\/p>\n<h2 id=\"a3d8ba\">\u66f4\u65b0mmseg\u8bcd\u5178<\/h2>\n<p>\u9996\u5148\u5907\u4efd\u4e0b\u65e7\u7684\u8bcd\u5178\u6587\u4ef6<\/p>\n<div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/local\/mmseg3\/etc\r\nmv unigram.txt unigram.txt.bak\r\nmv uni.lib uni.lib.bak\r\ncd -<\/pre>\n<\/div>\n<p>\u5c06\u5408\u5e76\u540e\u7684\u8bcd\u5178\u91cd\u547d\u540d\u4e3aunigram.txt\uff0c\u5728\u6307\u5b9a\u7684\u76ee\u5f55\u91cc\u8fd0\u884cmmseg<\/p>\n<div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">mv merged.txt \/usr\/local\/mmseg3\/etc\/unigram.txt\r\n\/usr\/local\/mmseg3\/bin\/mmseg -u \/usr\/local\/mmseg3\/etc\/unigram.txt<\/pre>\n<\/div>\n<p>\u6700\u540e\u5c06\u751f\u6210\u7684unigram.txt.uni\u91cd\u547d\u540d\u4e3auni.lib<\/p>\n<div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">cd \/usr\/local\/mmseg3\/etc\r\nmv unigram.txt.uni uni.lib<\/pre>\n<\/div>\n<p>\u9700\u8981\u6ce8\u610f\u4e00\u4e2a\u6bd4\u8f83\u86cb\u75bc\u7684\u95ee\u9898\uff0c\u66f4\u65b0\u540e\u7684\u5206\u8bcd\u6548\u679c\u5bf9\u5df2\u5efa\u7acb\u7684\u7d22\u5f15\u65e0\u6548<a title=\"\" href=\"http:\/\/blog.atime.me\/note\/mmseg-custom-dict.html#fn:1\" rel=\"footnote\" data-original-title=\"\">1<\/a>\u3002<\/p>\n<h2 id=\"2ea33d\">\u68c0\u9a8c\u5206\u8bcd\u6548\u679c<\/h2>\n<p>\u627e\u4e00\u4e2a\u4e4b\u524d\u65e0\u6cd5\u5206\u8bcd\u7684\u8bcd\u7ec4\uff0c\u7136\u540e\u7528mmseg\u8fdb\u884c\u6d4b\u8bd5\uff0c\u8fd9\u91cc\u5047\u8bbe\u8bcd\u5178\u4f4d\u4e8e\/usr\/local\/mmseg3\/etc\u76ee\u5f55\u4e0b<\/p>\n<div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">echo &quot;\u91d1\u4ea4\u6240&quot; &amp;gt; whatever.txt\r\n\/usr\/local\/mmseg3\/bin\/mmseg -d \/usr\/local\/mmseg3\/etc whatever.txt<\/pre>\n<\/div>\n<p>\u5982\u679c\u8bcd\u5178\u4e2d\u6ca1\u6709`\u91d1\u4ea4\u6240&#8217;\u8fd9\u4e2a\u8bcd\u7ec4\uff0c\u7ed3\u679c\u901a\u5e38\u5982\u4e0b<\/p>\n<div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\u91d1\/x \u4ea4\/x \u6240\/x\r\n\r\nWord Splite took: 0 ms.<\/pre>\n<\/div>\n<p>\u5982\u679c\u5728\u81ea\u5b9a\u4e49\u7684\u8bcd\u5178\u4e2d\u6709`\u91d1\u4ea4\u6240&#8217;\u8fd9\u4e2a\u8bcd\u7ec4\uff0c\u5219\u7ed3\u679c\u5982\u4e0b<\/p>\n<div>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\u91d1\u4ea4\u6240\/x\r\n\r\nWord Splite took: 0 ms.<\/pre>\n<\/div>\n<h2 id=\"dcaa84\">\u8f85\u52a9\u811a\u672c<\/h2>\n<p>\u4ee5\u4e0b\u4e24\u4e2a\u811a\u672c\u653e\u5728<a href=\"https:\/\/github.com\/mawenbao\/coreseek-scripts\">Github<\/a>\u4e0a\u3002<\/p>\n<ul>\n<li>extract-sougou-dict.py\u53c2\u8003\u4e86<a title=\"libmmseg\" href=\"http:\/\/www.coreseek.cn\/opensource\/mmseg\/\">\u8fd9\u7bc7\u6587\u7ae0<\/a>\u91cc\u7684\u4ee3\u7801\u3002<\/li>\n<li>merge-mmseg-dict.py\u5408\u5e76\u4e24\u4e2ammseg\u8bcd\u5178\uff0c\u5982\u679c\u4e24\u4e2a\u8bcd\u5178\u5305\u542b\u76f8\u540c\u7684\u8bcd\u7ec4\uff0c\u90a3\u4e48\u4ee5\u4e3b\u8bcd\u5178\u4e3a\u51c6(-a)\u3002<\/li>\n<\/ul>\n<h2 id=\"35808e\">\u53c2\u8003\u8d44\u6599<\/h2>\n<ol>\n<li><a title=\"libmmseg\" href=\"http:\/\/www.coreseek.cn\/opensource\/mmseg\/\">libmmseg\u5e93\u4ecb\u7ecd\u548c\u8bcd\u5178\u6587\u4ef6\u7684\u4ecb\u7ecd<\/a><\/li>\n<li><a title=\"\u641c\u72d7\u8bcd\u5e93\u8f6c\u4e3atxt\u683c\u5f0f\uff08\u5c0f\u5c0f\u8f93\u5165\u6cd5\uff09\" href=\"http:\/\/blog.csdn.net\/zhangzhenhu\/article\/details\/7014271\">\u641c\u72d7\u8bcd\u5e93\u8f6c\u4e3atxt\u683c\u5f0f\uff08\u5c0f\u5c0f\u8f93\u5165\u6cd5\uff09<\/a><\/li>\n<\/ol>\n<h2 id=\"content-references\">\u811a\u6ce8<\/h2>\n<div>\n<ol>\n<li id=\"fn:1\"><a title=\"Coreseek\u4e2d\u6587\u5206\u8bcd\u6838\u5fc3\u914d\u7f6e\" href=\"http:\/\/www.coreseek.cn\/products\/products-install\/coreseek_mmseg\/\">Coreseek\u4e2d\u6587\u5206\u8bcd\u6838\u5fc3\u914d\u7f6e<\/a><\/li>\n<\/ol>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>coreseek\u7684\u4ecb\u7ecd\u548c\u5b89\u88c5\u8aac\u660e\u53ef\u53c2\u8003\u8fd9\u91cc\uff0c\u4e0d\u518d\u8d58\u8ff0\u3002\u4ee5\u4e0b\u662f\u63a5\u4e0b\u6765\u9700\u8981\u6ce8\u610f\u7684\u51e0\u70b9: \u4e0b\u9762\u5047\u8bbelibmmseg\u5b89 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-5911","post","type-post","status-publish","format-standard","hentry","category-skill"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/5911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=5911"}],"version-history":[{"count":5,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/5911\/revisions"}],"predecessor-version":[{"id":5916,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/5911\/revisions\/5916"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=5911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=5911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=5911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}