rabbit-slide-kou-php-conference-2017 2017.10.08.0 → 2017.10.08.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff30010f1a930b97509fb8f622492fb042152f70
|
4
|
+
data.tar.gz: a18fbe2509f0e01c1c6aa0e7d1364c72d7c54856
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9e8001688429654a9f2a32aa878cf21980f3f06f842f4d97776b1ae69ff7b3c9b83aa34c70cf9756cf44e2ff76c2a3dcafdb59f996b254ec4fb7a4937a85ff8
|
7
|
+
data.tar.gz: d9d293625c2492fdc69f55ed2b1a939792de5e1362a5254c806cf9e9c95d7d7907b5a86d0ad1ccdf3b415d68a216c80479fec4034066eaa2c7de82b59dfe46bf
|
data/config.yaml
CHANGED
Binary file
|
@@ -280,9 +280,9 @@ PHP + PostgreSQL + PGroonga
|
|
280
280
|
|
281
281
|
= データ登録
|
282
282
|
|
283
|
-
(1) PHP
|
283
|
+
(1) PHPのマニュアルを\n
|
284
284
|
ローカルで生成
|
285
|
-
* PHP
|
285
|
+
* PHPのマニュアルの作り方\n
|
286
286
|
http://doc.php.net/tutorial/
|
287
287
|
* フィードバックチャンスが\n
|
288
288
|
いろいろあったよ!
|
@@ -309,7 +309,7 @@ PHP + PostgreSQL + PGroonga
|
|
309
309
|
$xpath = new \DOMXPath($document);
|
310
310
|
$entry = new Entry();
|
311
311
|
$entry->url = "/doc/" . basename($html_path);
|
312
|
-
// XPath
|
312
|
+
// XPathでテキスト抽出(詳細はソースを参照)
|
313
313
|
$this->extract_title($entry, $xpath);
|
314
314
|
$this->extract_content($entry, $xpath);
|
315
315
|
$entry->save();
|
@@ -486,6 +486,46 @@ PHP + PostgreSQL + PGroonga
|
|
486
486
|
// ※回避策なのでLaravelにWITHサポートを入れたい!
|
487
487
|
"WITH (tokenizer='TokenBigramSplitSymbolAlphaDigit')");
|
488
488
|
|
489
|
+
= データ登録
|
490
|
+
|
491
|
+
(1) マニュアルから候補を抽出\n
|
492
|
+
(('note:(手動作成はコスト高すぎ)'))
|
493
|
+
* 例:名詞は候補
|
494
|
+
* 例:連続した名詞→1つの候補に
|
495
|
+
(2) ヨミガナも自動で推測\n
|
496
|
+
(('note:(MeCabを利用)'))
|
497
|
+
(3) 候補をPostgreSQLに挿入
|
498
|
+
|
499
|
+
= コマンド作成
|
500
|
+
|
501
|
+
# coderay console
|
502
|
+
|
503
|
+
% php artisan \
|
504
|
+
make:command \
|
505
|
+
--command=terms:register \
|
506
|
+
RegisterTerms
|
507
|
+
|
508
|
+
= 登録コマンド実装(一部)
|
509
|
+
|
510
|
+
# coderay php
|
511
|
+
|
512
|
+
public function handle()
|
513
|
+
{
|
514
|
+
foreach (Entry::query()->cursor() as $entry) {
|
515
|
+
// processTextの実装はソースを参照
|
516
|
+
// タイトルから抽出
|
517
|
+
$this->processText($entry->title);
|
518
|
+
// 本文から抽出
|
519
|
+
$this->processText($entry->content);
|
520
|
+
}
|
521
|
+
}
|
522
|
+
|
523
|
+
= 登録
|
524
|
+
|
525
|
+
# coderay console
|
526
|
+
|
527
|
+
% php artisan terms:register
|
528
|
+
|
489
529
|
= 前方一致RK検索
|
490
530
|
|
491
531
|
* 日本語特化の前方一致検索
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbit-slide-kou-php-conference-2017
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2017.10.08.
|
4
|
+
version: 2017.10.08.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rabbit
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
95
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.5.2
|
96
|
+
rubygems_version: 2.5.2.1
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: PostgreSQLとPGroongaで作るPHPマニュアル高速全文検索システム
|