Repository: lucenenet
Updated Branches:
  refs/heads/master e67244aa2 -> 2d5108ba0


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f092010/src/Lucene.Net.Tests.Analysis.Kuromoji/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Kuromoji/project.json 
b/src/Lucene.Net.Tests.Analysis.Kuromoji/project.json
new file mode 100644
index 0000000..5badefa
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Kuromoji/project.json
@@ -0,0 +1,43 @@
+{
+  "version": "4.8.0",
+  "title": "Lucene.Net.Tests.Analysis.Kuromoji",
+  "buildOptions": {
+    "compile": {
+      "includeFiles": [ "../CommonAssemblyInfo.cs" ]
+    },
+    "embed": {
+      "includeFiles": [
+        "bocchan.utf-8",
+        "search-segmentation-tests.txt",
+        "userdict.txt"
+      ]
+    }
+  },
+  "dependencies": {
+    "dotnet-test-nunit-teamcity": "3.4.0-beta-3",
+    "Lucene.Net.Analysis.Kuromoji": "4.8.0",
+    "Lucene.Net.TestFramework": "4.8.0",
+    "NUnit": "3.5.0"
+  },
+  "testRunner": "nunit-teamcity",
+  "frameworks": {
+    "netcoreapp1.0": {
+      "imports": "dnxcore50",
+      "buildOptions": {
+        "debugType": "portable",
+        "define": [ "NETSTANDARD" ]
+      }
+    },
+    "net451": {
+      "buildOptions": {
+        "debugType": "full",
+        "define": [ "FEATURE_SERIALIZABLE" ]
+      }
+    }
+  },
+
+  "runtimes": {
+    "win7-x86": {},
+    "win7-x64": {}
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f092010/src/Lucene.Net.Tests.Analysis.Kuromoji/search-segmentation-tests.txt
----------------------------------------------------------------------
diff --git 
a/src/Lucene.Net.Tests.Analysis.Kuromoji/search-segmentation-tests.txt 
b/src/Lucene.Net.Tests.Analysis.Kuromoji/search-segmentation-tests.txt
new file mode 100644
index 0000000..835446f
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Kuromoji/search-segmentation-tests.txt
@@ -0,0 +1,142 @@
+###
+### Tests for Kuromoji's search mode heuristic
+###
+### In search-mode, Kuromoji uses a heuristic to do extra splitting of words
+### to get a decompounding effect useful for search.  This file includes tests
+### for this heuristic and demonstrates its usefulness, but also weaknesses.
+###
+### This file's format is as follows:
+###      <text><tab><token1> <token2> ... <token>
+###
+### This file should use UTF-8 encoding and there is one test per line.  The
+### text to be segmented and its expected surface form token sequence is 
+### separated by a tab ('\t').  Tokens are  separated by a half-width space.
+### Whitespace lines and lines starting with a '#' are ignored.  Comments
+### are not allowed on entry line.
+###
+### NOTE: These tests depends on IPADIC
+###
+### Revision history:
+###  - 2012-01-29: Initial version
+###
+
+##
+## Organizations
+##
+
+# Kansai Internationl Airport
+関西国際空港     関西 関西国際空港/0 国際 空港
+# Narita Airport
+成田空港   成田 成田空港/0 空港
+# Haneda Airport
+羽田空港   羽田 羽田空港/0 空港
+# Nara Institute of Science and Technology
+奈良先端科学技術大学院大学        奈良 奈良å…
ˆç«¯ç§‘学技術大学院大学/0 先端 科学 技術 大学院 大学
+# Tokyo University
+東京大学   東京 東京大学/0 大学
+# Kyoto University
+京都大学   京都 京都大学/0 大学
+
+# NOTE: differs from non-compound mode:
+# Kyoto University Baseball Club
+京都大学硬式野球部    京都大 学 硬式 野球 部
+
+##
+## Katakana titles
+##
+
+# Senior Software Engineer
+シニアソフトウェアエンジニア     シニア 
シニアソフトウェアエンジニア/0 ソフトウェア エンジニア
+# Software Engineer
+ソフトウェアエンジニア      ソフトウェア エンジニア
+# Senior Project Manager
+シニアプロジェクトマネジャー     シニア 
シニアプロジェクトマネジャー/0 プロジェクト マネジャー
+# Project Manager
+プロジェクトマネジャー      プロジェクト マネジャー
+# Senior Sales Engineer
+シニアセールスエンジニア   シニア 
シニアセールスエンジニア/0 セールス エンジニア
+# System Architect
+システムアーキテクト システム システムアーキテクト/0 
アーキテクト
+# Senior System Architect
+シニアシステムアーキテクト        シニア シニアシステム
アーキテクト/0 システム アーキテクト
+# System Administrator
+システムアドミニストレータ        システム 
アドミニストレータ
+システムアドミニストレーター     システム システム
アドミニストレーター/0 アドミニストレーター
+# Senior System Administrator
+シニアシステムアドミニストレーター    シニア 
シニアシステムアドミニストレーター/0 システム 
アドミニストレーター
+
+##
+## Company names (several are fictitious)
+##
+
+# SoftBank Mobile
+ソフトバンクモバイル ソフトバンク モバイル
+# Alpine Materials
+アルパインマテリアルズ      アルパイン 
アルパインマテリアルズ/0 マテリアルズ
+# Sapporo Holdings
+サッポロホールディングス   サッポロ ホールディングス
+# Yamada Corporation
+ヤマダコーポレーション      ヤマダ 
ヤマダコーポレーション/0 コーポレーション
+# Canon Semiconductor equipement       NOTE: Semiconductor becomes semi + 
conductor
+キヤノンセミコンダクターエクィップメント   キヤノン 
キヤノンセミコンダクターエクィップメント/0 セミ 
コンダクター エクィップメント
+# Orental Chain
+オリエンタルチエン    オリエンタル 
オリエンタルチエン/0 チエン
+# Ally Projects Japan  NOTE: Becomes one token as プロジェクツ is not in 
IPADIC
+アーリープロジェクツジャパン     
アーリープロジェクツジャパン
+# Peter Pan Corporation
+ピーターパンコーポレーション     ピーター 
ピーターパンコーポレーション/0 パン コーポレーション
+# AIM Create
+エイムクリエイツ       エイムクリエイツ
+# Mars Engineering
+マースエンジニアリング      マース 
マースエンジニアリング/0 エンジニアリング
+# Fuji Protein Technology
+フジプロテインテクノロジー        フジ 
フジプロテインテクノロジー/0 プロテイン テクノロジー
+
+##
+## Person names
+##
+
+# Michael Jackson
+マイケルジャクソン    マイケル ジャクソン
+# Steve Jobs
+スティーブジョブズ    スティーブ ジョブズ
+# Harry Potter NOTE: Becomes one token (short word)
+ハリーポッター  ハリーポッター
+# Bill Gates   NOTE: Becomes one token (short word)
+ビルゲイツ        ビルゲイツ
+# Sean Connery NOTE: Becomes one token (okay)
+ショーンコネリー       ショーンコネリー
+
+##
+## Other nouns
+##
+
+# Holdings
+ホールディングス       ホールディングス
+# Engineering
+エンジニアリング       エンジニアリング
+# Software Engineering
+ソフトウェアエンジニアリング     ソフトウェア 
エンジニアリング
+# Shopping center
+ショッピングセンター ショッピング センター
+# Game center (arcade) NOTE: One token because of short word
+ゲームセンター  ゲームセンター
+# Christmas shopping
+クリスマスショッピング      クリスマス ショッピング
+# Download file
+ダウンロードファイル ダウンロード ファイル
+# Technology
+テクノロジー     テクノロジー
+# Lillehammer Olympics
+リレハンメルオリンピック   リレハンメル オリンピック
+
+##
+## Problematic terms
+##
+
+# JT Engineering       NOTE: Becomes J Tien ginia ring (substrings are in 
IPADIC)
+ジェイティエンジニアリング        ジェイ 
ジェイティエンジニアリング/0 ティエン ジニア リング
+# Anchovy pasta        NOTE: Become Anch yvipasta
+アンチョビパスタ       アンチ アンチョビパスタ/0 
ョビパスタ
+# Surprise gift        NOTE: Becomes one token (surprise not in IPADIC)
+サプライズギフト       サプライズギフト

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f092010/src/Lucene.Net.Tests.Analysis.Kuromoji/userdict.txt
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Kuromoji/userdict.txt 
b/src/Lucene.Net.Tests.Analysis.Kuromoji/userdict.txt
new file mode 100644
index 0000000..f9db02c
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Kuromoji/userdict.txt
@@ -0,0 +1,10 @@
+# Custom segmentation for long entries
+日本経済新聞,日本 経済 新聞,ニホン ケイザイ 
シンブン,カスタム名詞
+関西国際空港,関西 国際 空港,カンサイ コクサイ 
クウコウ,テスト名詞
+
+# Custom reading for sumo wrestler
+朝青龍,朝青龍,アサショウリュウ,カスタム人名
+
+# Silly entry:
+abcd,a b cd,foo1 foo2 foo3,bar
+abcdefg,ab cd efg,foo1 foo2 foo4,bar

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f092010/src/Lucene.Net/Support/Collections.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Support/Collections.cs 
b/src/Lucene.Net/Support/Collections.cs
index dcafc25..3ded8e3 100644
--- a/src/Lucene.Net/Support/Collections.cs
+++ b/src/Lucene.Net/Support/Collections.cs
@@ -54,6 +54,15 @@ namespace Lucene.Net.Support
             return new SetFromMap<T>(map);
         }
 
+        public static void Reverse<T>(IList<T> list)
+        {
+            int size = list.Count;
+            for (int i = 0, mid = size >> 1, j = size - 1; i < mid; i++, j--)
+            {
+                Swap(list, i, j);
+            }
+        }
+
         public static IComparer<T> ReverseOrder<T>()
         {
             return (IComparer<T>)ReverseComparer<T>.REVERSE_ORDER;

Reply via email to