rabbit-slide-kou-php-conference-2017 2017.10.08.0 → 2017.10.08.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec4cae3a085fc043e16dd908ef24ffced568281c
4
- data.tar.gz: 8915e502b0374beb084d775d5ac7ac5d32cb8de3
3
+ metadata.gz: ff30010f1a930b97509fb8f622492fb042152f70
4
+ data.tar.gz: a18fbe2509f0e01c1c6aa0e7d1364c72d7c54856
5
5
  SHA512:
6
- metadata.gz: 82e3b43f0b8d7e0307ebcbb7906a4a92378b1c79ac3b60b94361b85ce177cfd0856b5402f02428279b0e1add8f365924bb8daabe899f4e463bd58988ab5fa0a2
7
- data.tar.gz: 1a0d1fb95de9f6b3a38ff333cbe30420100c7d7a67a7dab7d8c50d91e5405d67230216da765df7fb0f1602249aa805530992b9e3774a1aeb25fc8d2b2d625bf8
6
+ metadata.gz: a9e8001688429654a9f2a32aa878cf21980f3f06f842f4d97776b1ae69ff7b3c9b83aa34c70cf9756cf44e2ff76c2a3dcafdb59f996b254ec4fb7a4937a85ff8
7
+ data.tar.gz: d9d293625c2492fdc69f55ed2b1a939792de5e1362a5254c806cf9e9c95d7d7907b5a86d0ad1ccdf3b415d68a216c80479fec4034066eaa2c7de82b59dfe46bf
@@ -8,7 +8,7 @@ tags:
8
8
  - pgroonga
9
9
  - phpcon2017
10
10
  presentation_date: '2017-10-08'
11
- version: 2017.10.08.0
11
+ version: 2017.10.08.1
12
12
  licenses:
13
13
  - CC BY 3.0
14
14
  - CC BY-SA 4.0
@@ -280,9 +280,9 @@ PHP + PostgreSQL + PGroonga
280
280
 
281
281
  = データ登録
282
282
 
283
- (1) PHPのドキュメントを\n
283
+ (1) PHPのマニュアルを\n
284
284
  ローカルで生成
285
- * PHPのドキュメントの作り方\n
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.0
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-07 00:00:00.000000000 Z
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マニュアル高速全文検索システム