mirror of
https://github.com/fumiama/jieba.git
synced 2026-06-11 04:10:25 +08:00
优化
This commit is contained in:
20
tokenizers/example_bleve_test.go
Normal file → Executable file
20
tokenizers/example_bleve_test.go
Normal file → Executable file
@@ -6,7 +6,7 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/blevesearch/bleve"
|
||||
_ "github.com/wangbin/jiebago/tokenizers"
|
||||
_ "github.com/fumiama/jieba/tokenizers"
|
||||
)
|
||||
|
||||
func Example_beleveSearch() {
|
||||
@@ -101,26 +101,26 @@ func Example_beleveSearch() {
|
||||
// Output:
|
||||
// Result of "水果世博园": 2 matches:
|
||||
// 1. Doc 3, (1.099550)
|
||||
// Name: 买<span class="highlight">水果</span>然后来<span class="highlight">世博</span>园。
|
||||
// Name: 买<mark>水果</mark>然后来<mark>世博</mark>园。
|
||||
// 2. Doc 2, (0.031941)
|
||||
// Name: The second one 你 中文测试中文 is even more interesting! 吃<span class="highlight">水果</span>
|
||||
// Name: The second one 你 中文测试中文 is even more interesting! 吃<mark>水果</mark>
|
||||
// Result of "你": 1 matches:
|
||||
// 1. Doc 2, (0.391161)
|
||||
// Name: The second one <span class="highlight">你</span> 中文测试中文 is even more interesting! 吃水果
|
||||
// Name: The second one <mark>你</mark> 中文测试中文 is even more interesting! 吃水果
|
||||
// Result of "first": 1 matches:
|
||||
// 1. Doc 1, (0.512150)
|
||||
// Name: This is the <span class="highlight">first</span> document we’ve added
|
||||
// Name: This is the <mark>first</mark> document we’ve added
|
||||
// Result of "中文": 1 matches:
|
||||
// 1. Doc 2, (0.553186)
|
||||
// Name: The second one 你 <span class="highlight">中文</span>测试<span class="highlight">中文</span> is even more interesting! 吃水果
|
||||
// Name: The second one 你 <mark>中文</mark>测试<mark>中文</mark> is even more interesting! 吃水果
|
||||
// Result of "交换机": 2 matches:
|
||||
// 1. Doc 4, (0.608495)
|
||||
// Name: 工信处女干事每月经过下属科室都要亲口交代24口<span class="highlight">交换机</span>等技术性器件的安装工作
|
||||
// Name: 工信处女干事每月经过下属科室都要亲口交代24口<mark>交换机</mark>等技术性器件的安装工作
|
||||
// 2. Doc 5, (0.086700)
|
||||
// Name: 咱俩<span class="highlight">交换</span>一下吧。
|
||||
// Name: 咱俩<mark>交换</mark>一下吧。
|
||||
// Result of "交换": 2 matches:
|
||||
// 1. Doc 5, (0.534158)
|
||||
// Name: 咱俩<span class="highlight">交换</span>一下吧。
|
||||
// Name: 咱俩<mark>交换</mark>一下吧。
|
||||
// 2. Doc 4, (0.296297)
|
||||
// Name: 工信处女干事每月经过下属科室都要亲口交代24口<span class="highlight">交换</span>机等技术性器件的安装工作
|
||||
// Name: 工信处女干事每月经过下属科室都要亲口交代24口<mark>交换</mark>机等技术性器件的安装工作
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user