text: (function(t){function e(e){for(var n,r,s=e[0],c=e[1],l=e[2],u=0,d=[];u<s.length;u++)r=s[u],i[r]&&d.push(i[r][0]),i[r]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(t[n]=c[n]);_&&_(e);while(d.length)d.shift()();return a.push.apply(a,l||[]),o()}function o(){for(var t,e=0;e<a.length;e++){for(var o=a[e],n=!0,s=1;s<o.length;s++){var c=o[s];0!==i[c]&&(n=!1)}n&&(a.splice(e--,1),t=r(r.s=o[0]))}return t}var n={},i={app:0},a=[];function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=n,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/";var s=window["webpackJsonp"]=window["webpackJsonp"]||[],c=s.push.bind(s);s.push=e,s=s.slice();for(var l=0;l<s.length;l++)e(s[l]);var _=c;a.push([0,"chunk-vendors"]),o()})({0:function(t,e,o){t.exports=o("56d7")},"012e":function(t,e,o){},"034f":function(t,e,o){"use strict";var n=o("64a9"),i=o.n(n);i.a},3560:function(t,e,o){},5304:function(t,e,o){},"56d7":function(t,e,o){"use strict";o.r(e);o("cadf"),o("551c"),o("f751"),o("097d");var n=o("2b0e"),i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"app"}},[o("div",{staticStyle:{"text-align":"left","font-size":"20px","background-color":"#b3c0d1",color:"#333","line-height":"60px","font-family":"Helvetica",height:"60px"}},[o("a",{attrs:{href:"/"}},[o("svg",{staticClass:"icon",staticStyle:{width:"40px",height:"40px",margin:"0 10px","margin-top":"10px"},attrs:{t:"1576742653217",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"8289",width:"40",height:"40"}},[o("path",{attrs:{d:"M992 192h-128l-14.32-28.62A64 64 0 0 0 792.44 128H685.2l-54.56-54.56C610.46 53.28 576 67.56 576 96.06v299.68l256 91.42V416h64c70.7 0 128-57.3 128-128v-64c0-17.68-14.32-32-32-32z m-224 96c-17.68 0-32-14.32-32-32s14.32-32 32-32 32 14.32 32 32-14.32 32-32 32zM192 448c-35.28 0-64-28.72-64-64 0-35.34-28.66-64-64-64S0 348.66 0 384c0 83.32 53.66 153.7 128 180.2V992c0 17.68 14.32 32 32 32h128c17.68 0 32-14.32 32-32V768h320v224c0 17.68 14.32 32 32 32h128c17.68 0 32-14.32 32-32V555.1L532.1 448H192z","p-id":"8290",fill:"#ffffff"}})]),o("font",{staticStyle:{height:"40px",margin:"0 10px","margin-top":"10px"},attrs:{face:"微软雅黑",color:"#fff",size:"6"}},[t._v("可 可 文 学")])],1),o("a",{staticClass:"github-corner",attrs:{href:"https://github.com/keleqnma/flask-vuejs-nlp",target:"_blank",title:"Follow me on GitHub","aria-label":"Follow me on GitHub"}},[o("svg",{staticStyle:{fill:"#fff",color:"#b3c0d1",position:"absolute",top:"0",border:"0",right:"0"},attrs:{width:"60",height:"60",viewBox:"0 0 250 250","aria-hidden":"true"}},[o("path",{attrs:{d:"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"}}),o("path",{staticClass:"octo-arm",staticStyle:{"transform-origin":"130px 106px"},attrs:{d:"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2",fill:"currentColor"}}),o("path",{staticClass:"octo-body",attrs:{d:"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z",fill:"currentColor"}})])])]),o("router-view")],1)},a=[],r={data:function(){return{routerAlive:!0}},provide:function(){return{routerRefresh:this.routerRefresh}},methods:{routerRefresh:function(){var t=this;this.routerAlive=!1,this.$nextTick((function(){t.routerAlive=!0}))}}},s=r,c=(o("034f"),o("2877")),l=Object(c["a"])(s,i,a,!1,null,null,null),_=l.exports,u=o("8c4f"),d=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"container"},[o("el-container",{staticClass:"ui-widget-container",staticStyle:{height:"700px","font-family":"微软雅黑",border:"1px solid #eee"},attrs:{direction:"vertical"}},[o("el-main",[o("center",{staticStyle:{"line-height":"70px"}},[o("el-row",{attrs:{gutter:5}},[o("el-col",{attrs:{span:20}},[o("el-input",{attrs:{size:"big",placeholder:"请输入关键字",clearable:""},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}})],1),o("el-col",{attrs:{span:4}},[o("el-button",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:t.fullscreenLoading,expression:"fullscreenLoading",modifiers:{fullscreen:!0,lock:!0}}],attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.getKeywordBooks(t.keyword)}}},[t._v("搜索")])],1)],1)],1),o("div",{staticStyle:{margin:"50px 0"}},[o("el-divider",[o("el-button",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:t.fullscreenLoading,expression:"fullscreenLoading",modifiers:{fullscreen:!0,lock:!0}}],attrs:{type:"primary",icon:"el-icon-magic-stick",circle:""},on:{click:function(e){return t.getRandomBook()}}})],1)],1),o("div",t._l(t.books,(function(e){return o("div",{key:e.id,staticStyle:{"line-height":"40px","background-color":"#FFF"}},[o("br"),o("el-row",[o("el-col",{attrs:{span:4}},[o("img",{staticClass:"head_pic",attrs:{src:e.book_img,height:"120"}})]),o("el-col",{attrs:{span:4}},[o("span",{staticStyle:{"font-family":"微软雅黑","font-size":"20px","margin-left":"20px"}},[t._v(t._s(e.book_name))])]),o("el-col",{attrs:{span:3}},[o("i",{staticClass:"el-icon-edit",staticStyle:{"margin-left":"20px"}}),o("span",{staticStyle:{"margin-left":"10px"}},[t._v(t._s(e.author))])]),o("el-col",{attrs:{span:2}},[o("el-tag",{staticStyle:{"margin-left":"20px"},attrs:{type:"success"}},[t._v(t._s(e.type))])],1),o("el-col",{attrs:{span:4}},[o("span",{staticStyle:{"margin-left":"20px"}},[t._v(t._s(e.profile))])]),o("el-col",{attrs:{span:4}},[o("i",{staticClass:"el-icon-time",staticStyle:{"margin-left":"20px"}}),o("span",{staticStyle:{"margin-left":"10px"}},[t._v(t._s(e.last_update))])]),o("el-col",{attrs:{span:3}},[o("el-button",{attrs:{icon:"el-icon-notebook-2"},on:{click:function(o){return t.showdetail(e)}}})],1)],1),o("el-divider")],1)})),0)],1)],1)],1)},h=[],p=o("bc3a"),f=o.n(p),g={name:"Ping",data:function(){return{fullscreenLoading:!1,books:[],keyword:"",msg:""}},methods:{getRandomBook:function(){var t=this;this.fullscreenLoading=!0;var e="/api/books";console.log(e),f.a.get(e).then((function(e){t.books=e.data.books,t.fullscreenLoading=!1})).catch((function(t){console.error(t)}))},getKeywordBooks:function(t){var e=this;this.fullscreenLoading=!0;var o="/api/books/keyword/".concat(t);f.a.get(o).then((function(t){e.books=t.data.books,e.fullscreenLoading=!1})).catch((function(t){console.error(t)}))},showdetail:function(t){this.$router.push({path:"/book",query:{book_id:t.id}})}},created:function(){this.getRandomBook()}},m=g,v=Object(c["a"])(m,d,h,!1,null,null,null),b=v.exports,k=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-container",{staticStyle:{height:"700px","font-family":"微软雅黑",border:"1px solid #eee"}},[o("el-main",{directives:[{name:"loading",rawName:"v-loading.fullscreen.lock",value:t.fullscreenLoading,expression:"fullscreenLoading",modifiers:{fullscreen:!0,lock:!0}}]},[o("el-page-header",{attrs:{content:"详情页面"},on:{back:t.goBack}}),o("div",{staticStyle:{"line-height":"30px"}},[o("img",{staticClass:"head_pic",attrs:{src:t.book_information.book_img,height:"120"}})]),o("div",{staticStyle:{"line-height":"50px"}},[o("span",{staticStyle:{"font-family":"微软雅黑","font-size":"20px"}},[t._v(t._s(t.book_information.book_name))]),o("br"),o("el-tag",{attrs:{type:"success"}},[t._v(t._s(t.book_information.type))]),o("i",{staticClass:"el-icon-edit",staticStyle:{"margin-left":"20px"}}),o("span",{staticStyle:{"margin-left":"10px"}},[t._v(t._s(t.book_information.author))]),o("i",{staticClass:"el-icon-time",staticStyle:{"margin-left":"20px"}}),o("span",{staticStyle:{"margin-left":"10px"}},[t._v(t._s(t.book_information.last_update))]),o("el-link",{staticStyle:{"margin-left":"20px"},attrs:{href:t.book_information.book_url,target:"_blank",type:"success",underline:!1}},[t._v("原书链接")])],1),o("el-divider",[t._v('"'+t._s(t.book_information.profile)+'"')]),t._l(t.chapters,(function(e){return o("el-button",{key:e.id,attrs:{icon:"el-icon-notebook-2"},on:{click:function(o){return t.showdetail(e)}}},[t._v(t._s(e.chapter_name))])}))],2)],1)],1)},w=[],y={name:"Ping",data:function(){return{book_id:"",book_information:{},chapters:[],keyword:"",msg:""}},methods:{goBack:function(){this.$router.push({path:"/"})},getChapters:function(t){var e=this,o="/api/chapters/".concat(t);f.a.get(o).then((function(t){e.chapters=t.data.chapters,console.log(e.chapters),e.fullscreenLoading=!1})).catch((function(t){console.error(t)}))},getBookInformantion:function(t){var e=this,o="/api/books/".concat(t);console.log(o),f.a.get(o).then((function(t){e.book_information=t.data,""==e.book_information.profile&&(e.book_information.profile="暂无简介。"),console.log(e.book_information)})).catch((function(t){console.error(t)}))},showdetail:function(t){var e=this;"章节已锁定"!=t.chapter_name?this.$router.push({path:"/chapters",query:{chapter_id:t.id,book_id:this.book_id}}):this.$alert("该内容已被锁定或冻结，暂时无法查看哦！","提示",{confirmButtonText:"确定",callback:function(t){e.$message({type:"info",message:"action: ".concat(t)})}})}},created:function(){this.fullscreenLoading=!0,this.book_id=this.$route.query.book_id,this.getBookInformantion(this.book_id),this.getChapters(this.book_id)}},x=y,C=(o("7c76"),Object(c["a"])(x,k,w,!1,null,null,null)),E=C.exports,O=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"container"},[o("el-container",{staticStyle:{height:"700px","font-family":"微软雅黑",border:"1px solid #eee"}},[o("el-aside",{attrs:{width:"250px","default-openeds":["1","2","3","4","5"]}},[o("el-row",{staticClass:"tac"},[o("el-menu",{staticClass:"el-menu-vertical-demo",attrs:{"default-active":"2","default-openeds":["1","2","3","4","5"]},on:{select:t.handleSelect}},[o("el-menu-item",{attrs:{index:"1"}},[o("i",{staticClass:"el-icon-document"}),o("span",{attrs:{slot:"title"},slot:"title"},[t._v("返回章节列表")])]),o("el-menu-item",{attrs:{index:"2"}},[o("i",{staticClass:"el-icon-menu"}),o("span",{attrs:{slot:"title"},slot:"title"},[t._v("章节原文")])]),o("el-submenu",{attrs:{index:"3"}},[o("template",{slot:"title"},[o("i",{staticClass:"el-icon-knife-fork"}),o("span",[t._v("分词")])]),o("el-menu-item",{attrs:{index:"3-1"}},[t._v("原始分词结果")]),o("el-menu-item",{attrs:{index:"3-2"}},[t._v("词性标注分词")])],2),o("el-menu-item",{attrs:{index:"4"}},[o("i",{staticClass:"el-icon-postcard"}),o("span",{attrs:{slot:"title"},slot:"title"},[t._v("命名实体识别")])]),o("el-menu-item",{attrs:{index:"5"}},[o("i",{staticClass:"el-icon-cloudy"}),o("span",{attrs:{slot:"title"},slot:"title"},[t._v("词云展示")])]),o("el-menu-item",{attrs:{index:"6"}},[o("i",{staticClass:"el-icon-film"}),o("span",{attrs:{slot:"title"},slot:"title"},[t._v("情感分析")])])],1)],1)],1),o("el-container",[o("el-main",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[o("div",{staticClass:"wraper"},[o("center",[o("el-row",[o("el-button-group",[o("el-button",{attrs:{type:"info",icon:"el-icon-back",circle:""},on:{click:function(e){return t.jump(-1)}}}),o("el-button",{attrs:{type:"info",icon:"el-icon-right",circle:""},on:{click:function(e){return t.jump(1)}}})],1)],1),o("el-backtop",{attrs:{target:".wraper"}}),o("div",{directives:[{name:"show",rawName:"v-show",value:1==t.show,expression:"show == 1"}],staticStyle:{"white-space":"pre-line","line-height":"40px",width:"900px"}},[t._v(t._s(t.content))]),o("div",{directives:[{name:"show",rawName:"v-show",value:2==t.show,expression:"show == 2"}],staticStyle:{"white-space":"pre-line","line-height":"40px",width:"900px"}},t._l(t.segcontent,(function(e,n){return o("div",{key:n},[t._l(e,(function(e,n){return o("span",{key:n},[o("span",{staticStyle:{display:"inline-block"}},[t._v(t._s(e))]),o("el-divider",{attrs:{direction:"vertical"}})],1)})),o("el-divider")],2)})),0),o("div",{directives:[{name:"show",rawName:"v-show",value:3==t.show,expression:"show == 3"}],staticStyle:{"white-space":"pre-line","line-height":"40px",width:"900px"}},t._l(t.post_segcontent,(function(e,n){return o("div",{key:n},[t._l(e,(function(e,i){return o("span",{key:i},[o("span",{staticStyle:{display:"inline-block"}},[o("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e,placement:"top-start"}},[o("el-button",{attrs:{type:t.getPostType(e)}},[t._v(t._s(t.segcontent[n][i]))])],1)],1)])})),o("el-divider")],2)})),0),o("div",{directives:[{name:"show",rawName:"v-show",value:4==t.show,expression:"show == 4"}],staticStyle:{"white-space":"pre-line","line-height":"40px",width:"900px"}},t._l(t.ner_content,(function(e,n){return o("div",{key:n},[t._l(e,(function(e,i){return o("span",{key:i},[o("span",{staticStyle:{display:"inline-block"}},[o("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e,placement:"top-start"}},[o("el-button",{attrs:{type:t.getNerType(e)}},[t._v(t._s(t.segcontent[n][i]))])],1)],1)])})),o("el-divider")],2)})),0),o("div",{directives:[{name:"show",rawName:"v-show",value:5==t.show,expression:"show == 5"}],staticStyle:{"white-space":"pre-line","line-height":"40px",width:"900px"}},[o("el-row",[o("el-button",{attrs:{type:"primary",round:""},on:{click:function(e){return t.getWordCloud(t.color=1)}}},[t._v("蓝青配")]),o("el-button",{attrs:{type:"danger",round:""},on:{click:function(e){return t.getWordCloud(t.color=2)}}},[t._v("红白配")]),o("el-button",{attrs:{type:"success",round:""},on:{click:function(e){return t.getWordCloud(t.color=3)}}},[t._v("绿白配")]),o("el-button",{attrs:{round:""},on:{click:function(e){return t.getWordCloud(t.color=4)}}},[t._v("随机白")]),o("el-button",{attrs:{type:"info",round:""},on:{click:function(e){return t.getWordCloud(t.color=5)}}},[t._v("随机黑")])],1),o("canvas",{staticStyle:{width:"900px",height:"600px"},attrs:{id:"canvas",width:"1500px",height:"1200px"}})],1),o("div",{directives:[{name:"show",rawName:"v-show",value:6==t.show,expression:"show == 6"}],staticStyle:{"white-space":"pre-line","line-height":"40px",width:"900px"}},t._l(t.senti_content,(function(e,n){return o("span",{key:n},[o("el-row",[o("el-col",{attrs:{span:16}},[o("el-link",{attrs:{type:"info"}},[t._v(t._s(e.sentence))])],1),o("el-col",{attrs:{span:3}},[o("el-tag",{attrs:{type:"negative"==e.sentiment?"danger":"success"}},[t._v(t._s(e.sentiment))])],1),o("el-col",{attrs:{span:5}},[o("el-tag",{attrs:{type:"info"}},[t._v(t._s(e.degree))])],1)],1),o("el-divider")],1)})),0)],1)],1)])],1)],1)],1)},M=[],P=o("659f"),S=P["a"],D=(o("7fd6"),Object(c["a"])(S,O,M,!1,null,null,null)),T=D.exports;n["default"].use(u["a"]);var L=new u["a"]({mode:"history",base:"/",routes:[{path:"/",name:"Books",component:b},{path:"/book",name:"BookDetail",component:E},{path:"/chapters",name:"ChapterDetail",component:T}]}),B=(o("5304"),o("012e"),o("5c96")),I=o.n(B);n["default"].use(I.a),n["default"].config.productionTip=!1,new n["default"]({router:L,render:function(t){return t(_)}}).$mount("#app")},"64a9":function(t,e,o){},"659f":function(module,__webpack_exports__,__webpack_require__){"use strict";var core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("c5f6"),core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es6_number_constructor__WEBPACK_IMPORTED_MODULE_0__),axios__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("bc3a"),axios__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__),wordcloud__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("175f"),wordcloud__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(wordcloud__WEBPACK_IMPORTED_MODULE_2__),jquery__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("1157"),jquery__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_3__),words=new Array,Choose={ORIGIN:1,SEGMENT:2,POSTAG_SEGMENT:3,ENTITY_REC:4,WORD_CLOUD:5,SENTIMENT:6},map_ner={"人名":"primary","地名":"warning","机构名":"danger","无":"info"},map_post={"普通名":"primary","时间名":"primary","方位名":"primary","处所名":"primary","人名":"success","姓":"success","名":"success","地名":"success","族名":"success","机构名":"success","其他专名":"success","动词":"warning","趋向动词":"warning","联系动词":"warning","能愿动词":"warning","形容词":"info","区别词":"info","数词":"info","量词":"info","副词":"danger","代词":"success","介词":"info","连词":"danger","助词":"danger","叹词":"danger","拟声词":"info","习用语":"info","缩略语":"info","前接成分":"info","后接成分":"info","语素字":"danger","非语素字":"info","标点符号":"info","非汉字字符串":"info","其他未知的符号":"info","未知":"info"};__webpack_exports__["a"]={name:"Ping",inject:["routerRefresh"],data:function(){return{key:"2",wordFreqs:[],show:Choose.ORIGIN,book_id:"",chapter_id:"",content:"",segcontent:[],post_segcontent:[],ner_content:[],senti_content:[],chapters:[],loading:!0}},methods:{getPostType:function(t){return map_post[t]},getNerType:function(t){return map_ner[t]},clear:function(){this.chapter_id=this.content=this.wordFreqs=this.segcontent=this.post_segcontent=this.ner_content=this.senti_content=""},jump:function(t){var e=this;console.log(t),console.log("next chapter");var o=Number(this.chapter_id)+Number(t),n=this.chapters.filter((function(t){return t.id==o}));0==n.length?this.$alert("没了","提示",{confirmButtonText:"确定",callback:function(t){e.$message({type:"info",message:"action: ".concat(t)})}}):"章节已锁定"==n[0].chapter_name?this.$alert("该内容已被锁定或冻结，暂时无法查看哦！","提示",{confirmButtonText:"确定",callback:function(t){e.$message({type:"info",message:"action: ".concat(t)})}}):this.$router.push({path:"/chapters",query:{chapter_id:o,book_id:this.book_id}}),this.clear(),this.routerRefresh(),this.refresh()},refresh:function(){this.chapter_id=this.$route.query.chapter_id,this.book_id=this.$route.query.book_id,console.log("hi"+this.chapter_id),this.handleSelect(this.key),this.getChapters(this.book_id)},getner:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chapter_id;if(""==this.ner_content){if(""==this.segcontent){var o="/api/process/segcontent/".concat(e);axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(o).then((function(e){t.segcontent=e.data.words}))}var n="/api/process/nercontent/".concat(e);this.loading=!0,axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(n).then((function(e){t.ner_content=e.data.ners,t.loading=!1})).catch((function(t){console.error(t)}))}else this.loading=!1},getChapters:function(t){var e=this,o="/api/chapters/".concat(t);axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(o).then((function(t){e.chapters=t.data.chapters,e.fullscreenLoading=!1})).catch((function(t){console.error(t)}))},getContent:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chapter_id;if(""==this.content){var o="/api/chaptercontent/".concat(e);axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(o).then((function(e){t.content=e.data.content,t.loading=!1})).catch((function(t){console.error(t)}))}else this.loading=!1},getContentSeg:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chapter_id;if(""==this.segcontent){var o="/api/process/segcontent/".concat(e);axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(o).then((function(e){t.segcontent=e.data.words,t.loading=!1})).catch((function(t){console.error(t)}))}else this.loading=!1},getContentSenti:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chapter_id;if(""==this.senti_content){var o="/api/process/senticontent/".concat(e);axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(o).then((function(e){t.senti_content=e.data.sentiments,t.loading=!1})).catch((function(t){console.error(t)}))}else this.loading=!1},getPostContentSeg:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chapter_id;if(""==this.post_segcontent){if(""==this.segcontent){var o="/api/process/segcontent/".concat(e);axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(o).then((function(e){t.segcontent=e.data.words}))}var n="/api/process/postagcontentseg/".concat(e);this.loading=!0,axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(n).then((function(e){t.post_segcontent=e.data.tags,t.loading=!1})).catch((function(t){console.error(t)}))}else this.loading=!1},getImages:function getImages(color){var wordFreqs=this.wordFreqs,background_color="",plain_color="",important_color="",color_var="";switch(color){case 1:background_color="#e9eef3",plain_color="#b3c0d1",important_color="#116de6";break;case 2:background_color="#ffe0e0",plain_color="#c09292",important_color="#f02222";break;case 3:background_color="#E2FAE7",plain_color="#82A088",important_color="#63D0A4";break;case 4:background_color="#e9eef3",color_var="random-dark";break;case 5:background_color="#2D365B",color_var="random-light";break}var max_3_freq=wordFreqs[2].count,canvas=document.getElementById("canvas"),color_func=function(t,e){return e>=max_3_freq?important_color:plain_color},options=eval({list:words,gridSize:Math.round(16*jquery__WEBPACK_IMPORTED_MODULE_3___default()("#canvas").width()/1024),weightFactor:function(t){return Math.pow(t,.7)*jquery__WEBPACK_IMPORTED_MODULE_3___default()("#canvas").width()/32},maxFontSize:100,minFontSize:30,rotationSteps:2,fontWeight:"normal",fontFamily:"Times, serif",color:color>=4?color_var:color_func,backgroundColor:background_color,rotateRatio:.5});wordcloud__WEBPACK_IMPORTED_MODULE_2___default()(canvas,options),this.loading=!1},getWordCloud:function(t){var e=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.chapter_id;if(console.log("color"+t),""==this.wordFreqs){var n="/api/process/wordcloud/".concat(o);console.log(n),axios__WEBPACK_IMPORTED_MODULE_1___default.a.get(n).then((function(o){e.wordFreqs=o.data;for(var n=e.wordFreqs,i=0;i<n.length;i++){var a=[n[i].word,n[i].count];words.push(a)}e.getImages(t)})).catch((function(t){console.error(t)}))}else this.getImages(t)},handleSelect:function(t){switch(this.loading=!0,this.key=t,t){case"1":this.$router.push({path:"/book",query:{book_id:this.book_id}});break;case"2":this.show=Choose.ORIGIN,this.getContent(this.chapter_id);break;case"3-1":this.getContentSeg(this.chapter_id),this.show=Choose.SEGMENT;break;case"3-2":this.getPostContentSeg(this.chapter_id),this.show=Choose.POSTAG_SEGMENT;break;case"4":this.getner(this.chapter_id),this.show=Choose.ENTITY_REC;break;case"5":this.show=Choose.WORD_CLOUD,this.getWordCloud(1);break;case"6":this.show=Choose.SENTIMENT,this.getContentSenti(this.chapter_id);break}console.log(t)}},created:function(){this.refresh()}}},"7c76":function(t,e,o){"use strict";var n=o("a024"),i=o.n(n);i.a},"7fd6":function(t,e,o){"use strict";var n=o("3560"),i=o.n(n);i.a},a024:function(t,e,o){}});
  //# sourceMappingURL=app.245c7112.js.map