[libpinyin] update to 0.3.x head
Peng Wu
pwu at fedoraproject.org
Thu Oct 27 04:47:32 UTC 2011
commit 22e129f1b8a5842615ce69d07c4246ae5eedaa86
Author: Peng Wu <alexepico at gmail.com>
Date: Thu Oct 27 12:44:43 2011 +0800
update to 0.3.x head
libpinyin-0.3.x-head.patch | 849 ++++++++++++++++++++++++++++++++++++++++++++
libpinyin.spec | 7 +-
2 files changed, 855 insertions(+), 1 deletions(-)
---
diff --git a/libpinyin-0.3.x-head.patch b/libpinyin-0.3.x-head.patch
new file mode 100644
index 0000000..c7bf56f
--- /dev/null
+++ b/libpinyin-0.3.x-head.patch
@@ -0,0 +1,849 @@
+From 127a5ce640ec5282bbb4b473c01c5366e3c5e2f2 Mon Sep 17 00:00:00 2001
+From: Peng Wu <alexepico at gmail.com>
+Date: Tue, 11 Oct 2011 14:56:23 +0800
+Subject: [PATCH 1/2] fixes fsf address
+
+---
+ src/include/memory_chunk.h | 2 +-
+ src/include/novel_types.h | 2 +-
+ src/lookup/lookup.cpp | 2 +-
+ src/lookup/lookup.h | 2 +-
+ src/lookup/phrase_lookup.cpp | 2 +-
+ src/lookup/phrase_lookup.h | 2 +-
+ src/lookup/pinyin_lookup.cpp | 2 +-
+ src/lookup/pinyin_lookup.h | 2 +-
+ src/lookup/winner_tree.cpp | 2 +-
+ src/lookup/winner_tree.h | 2 +-
+ src/pinyin.cpp | 2 +-
+ src/pinyin.h | 2 +-
+ src/pinyin_internal.h | 2 +-
+ src/storage/flexible_ngram.h | 2 +-
+ src/storage/ngram.cpp | 2 +-
+ src/storage/ngram.h | 2 +-
+ src/storage/phrase_index.cpp | 2 +-
+ src/storage/phrase_index.h | 2 +-
+ src/storage/phrase_index_logger.h | 2 +-
+ src/storage/phrase_large_table.cpp | 2 +-
+ src/storage/phrase_large_table.h | 2 +-
+ src/storage/pinyin_base.cpp | 2 +-
+ src/storage/pinyin_base.h | 2 +-
+ src/storage/pinyin_custom.h | 2 +-
+ src/storage/pinyin_large_table.cpp | 2 +-
+ src/storage/pinyin_large_table.h | 2 +-
+ src/storage/pinyin_phrase.h | 2 +-
+ src/storage/tag_utility.h | 2 +-
+ tests/lookup/test_phrase_lookup.cpp | 2 +-
+ tests/storage/test_phrase_index_logger.cpp | 2 +-
+ tests/test_chewing.cpp | 2 +-
+ tests/test_phrase.cpp | 2 +-
+ tests/test_pinyin.cpp | 2 +-
+ utils/segment/ngseg.cpp | 2 +-
+ utils/segment/spseg.cpp | 2 +-
+ utils/storage/export_interpolation.cpp | 2 +-
+ utils/storage/gen_binary_files.cpp | 2 +-
+ utils/storage/gen_pinyin_table.cpp | 2 +-
+ utils/storage/gen_zhuyin_map.cpp | 2 +-
+ utils/storage/import_interpolation.cpp | 2 +-
+ utils/training/estimate_interpolation.cpp | 2 +-
+ utils/training/estimate_k_mixture_model.cpp | 2 +-
+ utils/training/eval_correction_rate.cpp | 2 +-
+ utils/training/export_k_mixture_model.cpp | 2 +-
+ utils/training/gen_deleted_ngram.cpp | 2 +-
+ utils/training/gen_k_mixture_model.cpp | 2 +-
+ utils/training/gen_ngram.cpp | 2 +-
+ utils/training/gen_unigram.cpp | 2 +-
+ utils/training/import_k_mixture_model.cpp | 2 +-
+ utils/training/k_mixture_model.h | 2 +-
+ .../training/k_mixture_model_to_interpolation.cpp | 2 +-
+ utils/training/merge_k_mixture_model.cpp | 2 +-
+ utils/training/prune_k_mixture_model.cpp | 2 +-
+ utils/training/validate_k_mixture_model.cpp | 2 +-
+ 54 files changed, 54 insertions(+), 54 deletions(-)
+
+diff --git a/src/include/memory_chunk.h b/src/include/memory_chunk.h
+index def0532..49b8f8c 100644
+--- a/src/include/memory_chunk.h
++++ b/src/include/memory_chunk.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef MEMORY_CHUNK_H
+diff --git a/src/include/novel_types.h b/src/include/novel_types.h
+index 2c11752..1c4fb2b 100644
+--- a/src/include/novel_types.h
++++ b/src/include/novel_types.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ /*
+diff --git a/src/lookup/lookup.cpp b/src/lookup/lookup.cpp
+index e0ccce9..66278cd 100644
+--- a/src/lookup/lookup.cpp
++++ b/src/lookup/lookup.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include "phrase_index.h"
+diff --git a/src/lookup/lookup.h b/src/lookup/lookup.h
+index ef6a35f..c5e814a 100644
+--- a/src/lookup/lookup.h
++++ b/src/lookup/lookup.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef LOOKUP_H
+diff --git a/src/lookup/phrase_lookup.cpp b/src/lookup/phrase_lookup.cpp
+index 4966cef..53d43b3 100644
+--- a/src/lookup/phrase_lookup.cpp
++++ b/src/lookup/phrase_lookup.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <math.h>
+diff --git a/src/lookup/phrase_lookup.h b/src/lookup/phrase_lookup.h
+index cee486d..a989648 100644
+--- a/src/lookup/phrase_lookup.h
++++ b/src/lookup/phrase_lookup.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef PHRASE_LOOKUP_H
+diff --git a/src/lookup/pinyin_lookup.cpp b/src/lookup/pinyin_lookup.cpp
+index 2e6408d..c32e2bb 100644
+--- a/src/lookup/pinyin_lookup.cpp
++++ b/src/lookup/pinyin_lookup.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <math.h>
+diff --git a/src/lookup/pinyin_lookup.h b/src/lookup/pinyin_lookup.h
+index 7bc206d..dd28b4d 100644
+--- a/src/lookup/pinyin_lookup.h
++++ b/src/lookup/pinyin_lookup.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef PINYIN_LOOKUP_H
+diff --git a/src/lookup/winner_tree.cpp b/src/lookup/winner_tree.cpp
+index 29135f5..35e92ae 100644
+--- a/src/lookup/winner_tree.cpp
++++ b/src/lookup/winner_tree.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <float.h>
+diff --git a/src/lookup/winner_tree.h b/src/lookup/winner_tree.h
+index 0559589..b83b7fe 100644
+--- a/src/lookup/winner_tree.h
++++ b/src/lookup/winner_tree.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef LOOKUP_WINNER_TREE_H
+diff --git a/src/pinyin.cpp b/src/pinyin.cpp
+index ee05a0a..c8eff79 100644
+--- a/src/pinyin.cpp
++++ b/src/pinyin.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/src/pinyin.h b/src/pinyin.h
+index b06e578..5820532 100644
+--- a/src/pinyin.h
++++ b/src/pinyin.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/src/pinyin_internal.h b/src/pinyin_internal.h
+index ac4863e..4bd52be 100644
+--- a/src/pinyin_internal.h
++++ b/src/pinyin_internal.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/src/storage/flexible_ngram.h b/src/storage/flexible_ngram.h
+index 7e30e7e..b09d58e 100644
+--- a/src/storage/flexible_ngram.h
++++ b/src/storage/flexible_ngram.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/src/storage/ngram.cpp b/src/storage/ngram.cpp
+index a4d72c2..17c7e9b 100644
+--- a/src/storage/ngram.cpp
++++ b/src/storage/ngram.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/src/storage/ngram.h b/src/storage/ngram.h
+index 1f891d0..537c1d6 100644
+--- a/src/storage/ngram.h
++++ b/src/storage/ngram.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef NGRAM_H
+diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp
+index 27e9095..c42b077 100644
+--- a/src/storage/phrase_index.cpp
++++ b/src/storage/phrase_index.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include "phrase_index.h"
+diff --git a/src/storage/phrase_index.h b/src/storage/phrase_index.h
+index c82ed80..3c81b91 100644
+--- a/src/storage/phrase_index.h
++++ b/src/storage/phrase_index.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef PHRASE_INDEX_H
+diff --git a/src/storage/phrase_index_logger.h b/src/storage/phrase_index_logger.h
+index b4553b9..7052715 100644
+--- a/src/storage/phrase_index_logger.h
++++ b/src/storage/phrase_index_logger.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/src/storage/phrase_large_table.cpp b/src/storage/phrase_large_table.cpp
+index 9c09abe..a353544 100644
+--- a/src/storage/phrase_large_table.cpp
++++ b/src/storage/phrase_large_table.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <assert.h>
+diff --git a/src/storage/phrase_large_table.h b/src/storage/phrase_large_table.h
+index 6e14d2e..0fc8509 100644
+--- a/src/storage/phrase_large_table.h
++++ b/src/storage/phrase_large_table.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef PHRASE_LARGE_TABLE_H
+diff --git a/src/storage/pinyin_base.cpp b/src/storage/pinyin_base.cpp
+index 1a6344b..c5d2783 100644
+--- a/src/storage/pinyin_base.cpp
++++ b/src/storage/pinyin_base.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include "stl_lite.h"
+diff --git a/src/storage/pinyin_base.h b/src/storage/pinyin_base.h
+index f40b43b..921fce3 100644
+--- a/src/storage/pinyin_base.h
++++ b/src/storage/pinyin_base.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ /** @file pinyin_base.h
+diff --git a/src/storage/pinyin_custom.h b/src/storage/pinyin_custom.h
+index 3e66305..9d74e99 100644
+--- a/src/storage/pinyin_custom.h
++++ b/src/storage/pinyin_custom.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/src/storage/pinyin_large_table.cpp b/src/storage/pinyin_large_table.cpp
+index 204518d..952287a 100644
+--- a/src/storage/pinyin_large_table.cpp
++++ b/src/storage/pinyin_large_table.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <assert.h>
+diff --git a/src/storage/pinyin_large_table.h b/src/storage/pinyin_large_table.h
+index 2ef862d..dd26a91 100644
+--- a/src/storage/pinyin_large_table.h
++++ b/src/storage/pinyin_large_table.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef PINYIN_LARGE_TABLE_H
+diff --git a/src/storage/pinyin_phrase.h b/src/storage/pinyin_phrase.h
+index b9a8812..3e2985b 100644
+--- a/src/storage/pinyin_phrase.h
++++ b/src/storage/pinyin_phrase.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef PINYIN_PHRASE_H
+diff --git a/src/storage/tag_utility.h b/src/storage/tag_utility.h
+index 6f4c9fc..8f97c11 100644
+--- a/src/storage/tag_utility.h
++++ b/src/storage/tag_utility.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #ifndef TAG_UTILITY_H
+diff --git a/tests/lookup/test_phrase_lookup.cpp b/tests/lookup/test_phrase_lookup.cpp
+index 24e6982..63ebf8f 100644
+--- a/tests/lookup/test_phrase_lookup.cpp
++++ b/tests/lookup/test_phrase_lookup.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/tests/storage/test_phrase_index_logger.cpp b/tests/storage/test_phrase_index_logger.cpp
+index e0434c0..74cd5af 100644
+--- a/tests/storage/test_phrase_index_logger.cpp
++++ b/tests/storage/test_phrase_index_logger.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include "pinyin_internal.h"
+diff --git a/tests/test_chewing.cpp b/tests/test_chewing.cpp
+index 95e867e..4d3a054 100644
+--- a/tests/test_chewing.cpp
++++ b/tests/test_chewing.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/tests/test_phrase.cpp b/tests/test_phrase.cpp
+index 5a70b45..01cd4cc 100644
+--- a/tests/test_phrase.cpp
++++ b/tests/test_phrase.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/tests/test_pinyin.cpp b/tests/test_pinyin.cpp
+index eb868d3..3162cb3 100644
+--- a/tests/test_pinyin.cpp
++++ b/tests/test_pinyin.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/utils/segment/ngseg.cpp b/utils/segment/ngseg.cpp
+index 380c556..8e56414 100644
+--- a/utils/segment/ngseg.cpp
++++ b/utils/segment/ngseg.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/segment/spseg.cpp b/utils/segment/spseg.cpp
+index d2495c4..b51982e 100644
+--- a/utils/segment/spseg.cpp
++++ b/utils/segment/spseg.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/storage/export_interpolation.cpp b/utils/storage/export_interpolation.cpp
+index 1e6a318..93854b6 100644
+--- a/utils/storage/export_interpolation.cpp
++++ b/utils/storage/export_interpolation.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/utils/storage/gen_binary_files.cpp b/utils/storage/gen_binary_files.cpp
+index 4c71247..5d8dfa6 100644
+--- a/utils/storage/gen_binary_files.cpp
++++ b/utils/storage/gen_binary_files.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/storage/gen_pinyin_table.cpp b/utils/storage/gen_pinyin_table.cpp
+index 414946b..0d7e231 100644
+--- a/utils/storage/gen_pinyin_table.cpp
++++ b/utils/storage/gen_pinyin_table.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/storage/gen_zhuyin_map.cpp b/utils/storage/gen_zhuyin_map.cpp
+index 68efbcc..2224805 100644
+--- a/utils/storage/gen_zhuyin_map.cpp
++++ b/utils/storage/gen_zhuyin_map.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/utils/storage/import_interpolation.cpp b/utils/storage/import_interpolation.cpp
+index 643bf1a..7ddb4f3 100644
+--- a/utils/storage/import_interpolation.cpp
++++ b/utils/storage/import_interpolation.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/training/estimate_interpolation.cpp b/utils/training/estimate_interpolation.cpp
+index dd6ed2b..e62e8c0 100644
+--- a/utils/training/estimate_interpolation.cpp
++++ b/utils/training/estimate_interpolation.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/training/estimate_k_mixture_model.cpp b/utils/training/estimate_k_mixture_model.cpp
+index 2a1fde7..4fd9932 100644
+--- a/utils/training/estimate_k_mixture_model.cpp
++++ b/utils/training/estimate_k_mixture_model.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <locale.h>
+diff --git a/utils/training/eval_correction_rate.cpp b/utils/training/eval_correction_rate.cpp
+index 6706492..c6b1514 100644
+--- a/utils/training/eval_correction_rate.cpp
++++ b/utils/training/eval_correction_rate.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/utils/training/export_k_mixture_model.cpp b/utils/training/export_k_mixture_model.cpp
+index f00d6b4..af4116d 100644
+--- a/utils/training/export_k_mixture_model.cpp
++++ b/utils/training/export_k_mixture_model.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include "pinyin_internal.h"
+diff --git a/utils/training/gen_deleted_ngram.cpp b/utils/training/gen_deleted_ngram.cpp
+index ff8eef1..937b977 100644
+--- a/utils/training/gen_deleted_ngram.cpp
++++ b/utils/training/gen_deleted_ngram.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/training/gen_k_mixture_model.cpp b/utils/training/gen_k_mixture_model.cpp
+index 83f149f..d6efd70 100644
+--- a/utils/training/gen_k_mixture_model.cpp
++++ b/utils/training/gen_k_mixture_model.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/utils/training/gen_ngram.cpp b/utils/training/gen_ngram.cpp
+index 2dfc168..eeeec3b 100644
+--- a/utils/training/gen_ngram.cpp
++++ b/utils/training/gen_ngram.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/training/gen_unigram.cpp b/utils/training/gen_unigram.cpp
+index 8abfd25..022f159 100644
+--- a/utils/training/gen_unigram.cpp
++++ b/utils/training/gen_unigram.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/training/import_k_mixture_model.cpp b/utils/training/import_k_mixture_model.cpp
+index 26cc21c..98419ae 100644
+--- a/utils/training/import_k_mixture_model.cpp
++++ b/utils/training/import_k_mixture_model.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <stdio.h>
+diff --git a/utils/training/k_mixture_model.h b/utils/training/k_mixture_model.h
+index 20347e4..ad8d3d8 100644
+--- a/utils/training/k_mixture_model.h
++++ b/utils/training/k_mixture_model.h
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/utils/training/k_mixture_model_to_interpolation.cpp b/utils/training/k_mixture_model_to_interpolation.cpp
+index b0e830d..50a147d 100644
+--- a/utils/training/k_mixture_model_to_interpolation.cpp
++++ b/utils/training/k_mixture_model_to_interpolation.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include "pinyin_internal.h"
+diff --git a/utils/training/merge_k_mixture_model.cpp b/utils/training/merge_k_mixture_model.cpp
+index 0be5725..72397ef 100644
+--- a/utils/training/merge_k_mixture_model.cpp
++++ b/utils/training/merge_k_mixture_model.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include <locale.h>
+diff --git a/utils/training/prune_k_mixture_model.cpp b/utils/training/prune_k_mixture_model.cpp
+index 3069f02..4d2be84 100644
+--- a/utils/training/prune_k_mixture_model.cpp
++++ b/utils/training/prune_k_mixture_model.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+
+diff --git a/utils/training/validate_k_mixture_model.cpp b/utils/training/validate_k_mixture_model.cpp
+index 5fc7031..b9b864c 100644
+--- a/utils/training/validate_k_mixture_model.cpp
++++ b/utils/training/validate_k_mixture_model.cpp
+@@ -16,7 +16,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+ #include "pinyin_internal.h"
+--
+1.7.6.4
+
+
+From 6df832baaa4c06bcffed93620edf5431ee9249fc Mon Sep 17 00:00:00 2001
+From: Peng Wu <alexepico at gmail.com>
+Date: Wed, 26 Oct 2011 10:22:44 +0800
+Subject: [PATCH 2/2] add m_modified
+
+---
+ src/pinyin.cpp | 14 ++++++++++----
+ 1 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/src/pinyin.cpp b/src/pinyin.cpp
+index c8eff79..46269e1 100644
+--- a/src/pinyin.cpp
++++ b/src/pinyin.cpp
+@@ -20,8 +20,6 @@
+ */
+
+
+-
+-
+ #include "pinyin.h"
+ #include "pinyin_internal.h"
+
+@@ -46,6 +44,7 @@ struct _pinyin_context_t{
+
+ char * m_system_dir;
+ char * m_user_dir;
++ bool m_modified;
+ };
+
+
+@@ -54,6 +53,7 @@ pinyin_context_t * pinyin_init(const char * systemdir, const char * userdir){
+
+ context->m_system_dir = g_strdup(systemdir);
+ context->m_user_dir = g_strdup(userdir);
++ context->m_modified = false;
+
+ context->m_pinyin_table = new PinyinLargeTable(&(context->m_custom));
+ MemoryChunk * chunk = new MemoryChunk;
+@@ -123,7 +123,10 @@ pinyin_context_t * pinyin_init(const char * systemdir, const char * userdir){
+
+ bool pinyin_save(pinyin_context_t * context){
+ if (!context->m_user_dir)
+- return FALSE;
++ return false;
++
++ if (!context->m_modified)
++ return false;
+
+ MemoryChunk * oldchunk = new MemoryChunk;
+ MemoryChunk * newlog = new MemoryChunk;
+@@ -150,6 +153,7 @@ bool pinyin_save(pinyin_context_t * context){
+ filename = g_build_filename(context->m_user_dir, "user.db", NULL);
+ context->m_user_bigram->save_db(filename);
+
++ context->m_modified = false;
+ return true;
+ }
+
+@@ -180,6 +184,7 @@ void pinyin_fini(pinyin_context_t * context){
+
+ g_free(context->m_system_dir);
+ g_free(context->m_user_dir);
++ context->m_modified = false;
+
+ delete context;
+ }
+@@ -518,9 +523,10 @@ bool pinyin_translate_token(pinyin_instance_t * instance,
+
+ bool pinyin_train(pinyin_instance_t * instance){
+ if (!instance->m_context->m_user_dir)
+- return FALSE;
++ return false;
+
+ pinyin_context_t * & context = instance->m_context;
++ context->m_modified = true;
+
+ bool retval = context->m_pinyin_lookup->train_result
+ (instance->m_pinyin_keys, instance->m_constraints,
+--
+1.7.6.4
+
diff --git a/libpinyin.spec b/libpinyin.spec
index efd4bee..5e0bdcc 100644
--- a/libpinyin.spec
+++ b/libpinyin.spec
@@ -1,11 +1,12 @@
Name: libpinyin
Version: 0.2.99.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Library to deal with pinyin
License: GPLv2+
URL: https://github.com/libpinyin/libpinyin
Source0: https://github.com/downloads/libpinyin/libpinyin/%{name}-%{version}.tar.gz
+Patch0: libpinyin-0.3.x-head.patch
BuildRequires: db4-devel, glib2-devel
#Requires:
@@ -34,6 +35,7 @@ The %{name}-data package contains data files.
%prep
%setup -q
+%patch0 -p1 -b .head
%build
@@ -68,6 +70,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%{_datadir}/libpinyin/data
%changelog
+* Thu Oct 27 2011 Peng Wu <pwu at redhat.com> - 0.2.99.2-2
+- Add patch libpinyin-0.3.x-head.patch
+
* Tue Oct 11 2011 Peng Wu <pwu at redhat.com> - 0.2.99.2-1
- Update to 0.2.99.2
More information about the scm-commits
mailing list