<NME> TopNSentence.java
<BEF> ADDFILE
<MSG> 挑选分值最高的N个句子

<DFF> @@ -0,0 +1,39 @@
+/**
+ *
+ * APDPlat - Application Product Development Platform Copyright (c) 2013, 杨尚川,
+ * yang-shangchuan@qq.com
+ *
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package org.apdplat.superword.tools;
+
+import java.util.TreeMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * 挑选分值最高的N个句子
+ * @author 杨尚川
+ */
+public class TopNSentence {
+    public static TreeMap<Float, String> topN(String path, int limit) {
+        return TextAnalyzer.sentence(path, limit, true);
+    }
+    public static void main(String[] args) throws Exception {
+        TreeMap<Float, String> data = topN("src/main/resources/it", 100);
+        AtomicInteger i = new AtomicInteger();
+        data.keySet().forEach(k -> System.out.println(i.incrementAndGet() + "\t" + k + "\n" + data.get(k)));
+    }
+}

{'commit': 'diff --git a/src/main/java/org/apdplat/superword/tools/TopNSentence.java b/src/main/java/org/apdplat/superword/tools/TopNSentence.java\nnew file mode 100644\nindex 0000000..a571d81\n--- /dev/null\n+++ b/src/main/java/org/apdplat/superword/tools/TopNSentence.java\n@@ -0,0 +1,39 @@\n+/**\n+ *\n+ * APDPlat - Application Product Development Platform Copyright (c) 2013, 杨尚川,\n+ * yang-shangchuan@qq.com\n+ *\n+ * This program is free software: you can redistribute it and/or modify it under\n+ * the terms of the GNU General Public License as published by the Free Software\n+ * Foundation, either version 3 of the License, or (at your option) any later\n+ * version.\n+ *\n+ * This program is distributed in the hope that it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n+ * details.\n+ *\n+ * You should have received a copy of the GNU General Public License along with\n+ * this program. If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ */\n+\n+package org.apdplat.superword.tools;\n+\n+import java.util.TreeMap;\n+import java.util.concurrent.atomic.AtomicInteger;\n+\n+/**\n+ * 挑选分值最高的N个句子\n+ * @author 杨尚川\n+ */\n+public class TopNSentence {\n+    public static TreeMap<Float, String> topN(String path, int limit) {\n+        return TextAnalyzer.sentence(path, limit, true);\n+    }\n+    public static void main(String[] args) throws Exception {\n+        TreeMap<Float, String> data = topN("src/main/resources/it", 100);\n+        AtomicInteger i = new AtomicInteger();\n+        data.keySet().forEach(k -> System.out.println(i.incrementAndGet() + "\\t" + k + "\\n" + data.get(k)));\n+    }\n+}\n', 'commit_subject': '挑选分值最高的N个句子', 'repo_name': 'ysc/superword', 'committer': {'name': 'ysc', 'email': '8b37f6ec54bd5377666ecc39fb98741165624e5f@qq.com', 'time_sec': '1427119741', 'tz_offset': '480', 'date': {'seconds': '1427119741'}}, 'commit_tree': '212d8f59a70fd81b3816e59d729882d869fa5553', 'commit_message': '挑选分值最高的N个句子\n', 'language_name': 'Shell', 'license': 'apache-2.0', 'hunks': '@@ -0,0 +1,39 @@\n+/**\n+ *\n+ * APDPlat - Application Product Development Platform Copyright (c) 2013, 杨尚川,\n+ * yang-shangchuan@qq.com\n+ *\n+ * This program is free software: you can redistribute it and/or modify it under\n+ * the terms of the GNU General Public License as published by the Free Software\n+ * Foundation, either version 3 of the License, or (at your option) any later\n+ * version.\n+ *\n+ * This program is distributed in the hope that it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\n+ * details.\n+ *\n+ * You should have received a copy of the GNU General Public License along with\n+ * this program. If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ */\n+\n+package org.apdplat.superword.tools;\n+\n+import java.util.TreeMap;\n+import java.util.concurrent.atomic.AtomicInteger;\n+\n+/**\n+ * 挑选分值最高的N个句子\n+ * @author 杨尚川\n+ */\n+public class TopNSentence {\n+    public static TreeMap<Float, String> topN(String path, int limit) {\n+        return TextAnalyzer.sentence(path, limit, true);\n+    }\n+    public static void main(String[] args) throws Exception {\n+        TreeMap<Float, String> data = topN("src/main/resources/it", 100);\n+        AtomicInteger i = new AtomicInteger();\n+        data.keySet().forEach(k -> System.out.println(i.incrementAndGet() + "\\t" + k + "\\n" + data.get(k)));\n+    }\n+}\n', 'addition_count': 39, 'deletion_count': 0, 'src_file': '/dev/null', 'tgt_file': 'b/src/main/java/org/apdplat/superword/tools/TopNSentence.java', 'file_extension': '.java', 'before_file': 'ADDFILE', 'message': '挑选分值最高的N个句子\n', 'author_name': 'ysc', 'lang': 'java'}