错觉

  1. 总是以为当前正在做的事,是最重要的事。
  2. 总是以为解决了当前问题,后面就一帆风顺了。

IK中文分词

#####步骤

1. 使用IK默认的分词,对数据处理。
2. 人工审核,纠正。然后热更新,丰富ES词库
3. 循环1.2,可让ES正确处理网络用语

#####测试

1
2
3
4
5
6
MacBook-Pro:Jobrunner$ php artisan for:test
string(10) "老#司机"
string(11) "萌#萌#哒"
MacBook-Pro:Jobrunner$ php artisan for:test
string(9) "老司机"
string(9) "萌萌哒"

#####参考
http://www.cnblogs.com/Hai--D/p/5751403.html
http://www.cnblogs.com/miao-zp/p/6008370.html
https://github.com/medcl/elasticsearch-analysis-ik
https://github.com/medcl/elasticsearch-analysis-ik/issues/256
http://weblee.leanote.com/post/ElasticSearch-ik%E4%B8%AD%E6%96%87%E5%88%86%E8%AF%8D
http://unpython.com/4/
http://mojijs.com/2016/10/220251/index.html

EasyWeChat微信开发

#####功能支持
1.路由直接响应微信事件处理
2.命令行后台操作(支持菜单配置,带参二维码生成)
区分测试,线上环境,默认测试

#####安装:
composer require overtrue/wechat:~3.1 -vvv

#####配置
路由:
Route::any(‘/wechat’, ‘WechatController@serve’);
过滤:(VerifyCsrfToken中间件)
protected $except = [
‘wechat’
];

#####事件处理流程

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
* @todo 入口
*/
public function serve() {
$app = new Application(config('app.wechat_online_options'));
$this->app = $app;
$server = $app->server;
$server->setMessageHandler(function ($message) {
switch ($message->MsgType) {
case 'event':
# 事件消息...
return $this->processEvent($message);
case 'text':
# 文字消息...
return $this->processText($message);
default:
# code...
break;
}
});
return $app->server->serve();

#####参考:
https://easywechat.org/
https://www.laravist.com/series/peak-into-wechat-development-using-laravel