Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert changes introduced in commit 1468c5.

  • Loading branch information...
commit 85bd052abc86811cb03b8b297399a07066c74c31 1 parent 6571bb0
@CasperVector CasperVector authored
View
10 debian/README.Debian
@@ -40,14 +40,14 @@ binary format for storing the lexicon and language model data.
So, to make sunpinyin usable, you may need to download the lexicon and
language data file from open-gram website [2]. Two files are
necessary for sunpinyin to work:
- - lm_sc.t3g, pydict3_sc.bin
+ - lm_sc.t3g, pydict_sc.bin
And we prepare two file for each of them:
- - slm_sc.t3g.{be,le}, pydict3_sc.bin.{be, le}
+ - slm_sc.t3g.{be,le}, pydict_sc.bin.{be, le}
The `be' and `le' stand for `Big Endian' and `Little Endian'. Download
the right ones according to your computer's byte order, rename
-them to lm_sc.t3g and pydict3_sc.bin respectively, then put them to
+them to lm_sc.t3g and pydict_sc.bin respectively, then put them to
/usr/share/sunpinyin/data.
@@ -84,13 +84,13 @@ home page [1].)
frequency are stored.
There are two sets of lexicon used in SunPinyin: dict.utf8 and
- pydict3_sc.bin.
+ pydict_sc.bin.
*** dict.utf8
The word frequency in dict.utf8 which are used in the first
iteration of segmentation of the raw corpus.
-*** pydict3_sc.bin
+*** pydict_sc.bin
This data file is a trie presentation of the syllables and
corresponding Chinese words, so that we can lookup the Chinese
words with incomplete pinyin-prefix. This lexicon is also sorted
View
4 debian/rules
@@ -41,13 +41,13 @@ DEB_DH_MAKESHLIBS_ARGS := -n
DEB_DH_GENCONTROL_ARGS := -u'-Vsunpinyin-data-depends=$(SUNPINYIN_DATA_DEPENDS)'
binary-fixup/sunpinyin-data-le::
- for f in pydict3_sc.bin lm_sc.t3g ; do \
+ for f in pydict_sc.bin lm_sc.t3g ; do \
cp -f $(CURDIR)/data/$$f.le \
$(CURDIR)/debian/sunpinyin-data-le/usr/lib/sunpinyin/data/$$f; \
done
binary-fixup/sunpinyin-data-be::
- for f in pydict3_sc.bin lm_sc.t3g ; do \
+ for f in pydict_sc.bin lm_sc.t3g ; do \
cp -f $(CURDIR)/data/$$f.be \
$(CURDIR)/debian/sunpinyin-data-be/usr/lib/sunpinyin/data/$$f; \
done
View
2  debian/sunpinyin-data-be.install
@@ -1,2 +1,2 @@
debian/tmp/usr/lib/sunpinyin/data/lm_sc.t3g
-debian/tmp/usr/lib/sunpinyin/data/pydict3_sc.bin
+debian/tmp/usr/lib/sunpinyin/data/pydict_sc.bin
View
2  debian/sunpinyin-data-le.install
@@ -1,2 +1,2 @@
debian/tmp/usr/lib/sunpinyin/data/lm_sc.t3g
-debian/tmp/usr/lib/sunpinyin/data/pydict3_sc.bin
+debian/tmp/usr/lib/sunpinyin/data/pydict_sc.bin
View
28 doc/SLM-inst.mk.in
@@ -18,10 +18,8 @@ TSLM3_TEXT_FILE = ${SLM_TARGET}.t3g.arpa
TSLM3_ORIG_FILE = ${SLM_TARGET}.t3g.orig
TSLM3_DIST_FILE = ${SLM_TARGET}.t3g
-PYTRIE2_FILE = pydict2_sc.bin
-PYTRIE2_LOG_FILE = pydict2_sc.log
-PYTRIE3_FILE = pydict3_sc.bin
-PYTRIE3_LOG_FILE = pydict3_sc.log
+PYTRIE_FILE = pydict_sc.bin
+PYTRIE_LOG_FILE = pydict_sc.log
SYSTEM_DATA_DIR = ${DESTDIR}@DATADIR@/sunpinyin
@@ -36,10 +34,9 @@ tslm2_dist: ${TSLM2_DIST_FILE}
${TSLM2_DIST_FILE}: ${TSLM2_ORIG_FILE}
tslmendian -e ${ENDIANNESS} -i $^ -o $@
-lexicon2: ${PYTRIE2_FILE}
-${PYTRIE2_FILE}: ${DICT_FILE} ${TSLM2_ORIG_FILE}
- genpyt -e ${ENDIANNESS} -i ${DICT_FILE} \
- -s ${TSLM2_ORIG_FILE} -l ${PYTRIE2_LOG_FILE} -o $@
+lexicon2: ${DICT_FILE} ${TSLM2_ORIG_FILE}
+ genpyt -e ${ENDIANNESS} -i ${DICT_FILE} -s ${TSLM2_ORIG_FILE} \
+ -l ${PYTRIE_LOG_FILE} -o ${PYTRIE_FILE}
tslm3_orig: ${TSLM3_ORIG_FILE}
${TSLM3_ORIG_FILE}: ${DICT_FILE} ${TSLM3_TEXT_FILE}
@@ -49,18 +46,17 @@ tslm3_dist: ${TSLM3_DIST_FILE}
${TSLM3_DIST_FILE}: ${TSLM3_ORIG_FILE}
tslmendian -e ${ENDIANNESS} -i $^ -o $@
-lexicon3: ${PYTRIE3_FILE}
-${PYTRIE3_FILE}: ${DICT_FILE} ${TSLM3_ORIG_FILE}
- genpyt -e ${ENDIANNESS} -i ${DICT_FILE} \
- -s ${TSLM3_ORIG_FILE} -l ${PYTRIE3_LOG_FILE} -o $@
+lexicon3: ${DICT_FILE} ${TSLM3_ORIG_FILE}
+ genpyt -e ${ENDIANNESS} -i ${DICT_FILE} -s ${TSLM3_ORIG_FILE} \
+ -l ${PYTRIE_LOG_FILE} -o ${PYTRIE_FILE}
-slm2_dist: ${TSLM2_DIST_FILE} ${PYTRIE2_FILE}
-slm2_install: ${TSLM2_DIST_FILE} ${PYTRIE2_FILE}
+slm2_dist: ${TSLM2_DIST_FILE} lexicon2
+slm2_install: ${TSLM2_DIST_FILE} ${PYTRIE_FILE}
install -d ${SYSTEM_DATA_DIR}
install -Dm644 $^ ${SYSTEM_DATA_DIR}
-slm3_dist: ${TSLM3_DIST_FILE} ${PYTRIE3_FILE}
-slm3_install: ${TSLM3_DIST_FILE} ${PYTRIE3_FILE}
+slm3_dist: ${TSLM3_DIST_FILE} lexicon3
+slm3_install: ${TSLM3_DIST_FILE} ${PYTRIE_FILE}
install -d ${SYSTEM_DATA_DIR}
install -Dm644 $^ ${SYSTEM_DATA_DIR}
View
18 doc/SLM-train.mk
@@ -22,10 +22,8 @@ SLM3_TEXT_FILE = ${SLM_TARGET}.3gm.arpa
TSLM3_FILE = ${SLM_TARGET}.t3g
TSLM3_TEXT_FILE = ${SLM_TARGET}.t3g.arpa
-PYTRIE2_FILE = pydict2_sc.bin
-PYTRIE2_LOG_FILE = pydict2_sc.log
-PYTRIE3_FILE = pydict3_sc.bin
-PYTRIE3_LOG_FILE = pydict3_sc.log
+PYTRIE_FILE = pydict_sc.bin
+PYTRIE_LOG_FILE = pydict_sc.log
all: bootstrap3
@@ -65,9 +63,9 @@ tslm2_info: ${TSLM2_TEXT_FILE}
${TSLM2_TEXT_FILE}: ${DICT_FILE} ${TSLM2_FILE}
tslminfo -v -l ${DICT_FILE} ${TSLM2_FILE} > $@
-lexicon2: ${PYTRIE2_FILE}
-${PYTRIE2_FILE}: ${DICT_FILE} ${TSLM2_FILE}
- genpyt -i ${DICT_FILE} -s ${TSLM2_FILE} -l ${PYTRIE2_LOG_FILE} -o $@
+lexicon2: ${DICT_FILE} ${TSLM2_FILE}
+ genpyt -i ${DICT_FILE} -s ${TSLM2_FILE} \
+ -l ${PYTRIE_LOG_FILE} -o ${PYTRIE_LOG_FILE}
trigram_stat: ${TRIGRAM_STAT_FILE}
${TRIGRAM_STAT_FILE}: ${IDS_FILE}
@@ -94,9 +92,9 @@ tslm3_info: ${TSLM3_TEXT_FILE}
${TSLM3_TEXT_FILE}: ${DICT_FILE} ${TSLM3_FILE}
tslminfo -p -v -l ${DICT_FILE} ${TSLM3_FILE} > $@
-lexicon3: ${PYTRIE3_FILE}
-${PYTRIE3_FILE}: ${DICT_FILE} ${TSLM3_FILE}
- genpyt -i ${DICT_FILE} -s ${TSLM3_FILE} -l ${PYTRIE3_LOG_FILE} -o $@
+lexicon3: ${DICT_FILE} ${TSLM3_FILE}
+ genpyt -i ${DICT_FILE} -s ${TSLM3_FILE} \
+ -l ${PYTRIE_LOG_FILE} -o ${PYTRIE_LOG_FILE}
tmp_clean:
rm -f *.tmp ${IDS_FILE}
View
4 python/importer/importer.py
@@ -25,13 +25,13 @@ def get_userdict_path ():
def get_sysdict_path ():
if sys.platform == "darwin":
homedir = os.environ.get("HOME")
- sysdict_path = "/Library/Input Methods/SunPinyin.app/Contents/Resources/pydict3_sc.bin"
+ sysdict_path = "/Library/Input Methods/SunPinyin.app/Contents/Resources/pydict_sc.bin"
if os.path.exists (homedir + sysdict_path):
return homedir + sysdict_path
else:
return sysdict_path
- return "/usr/lib/sunpinyin/data/pydict3_sc.bin"
+ return "/usr/lib/sunpinyin/data/pydict_sc.bin"
def load_system_dict ():
sysdict_path = get_sysdict_path ()
View
2  python/test.py
@@ -30,7 +30,7 @@ def test_pyslm ():
def test_pytrie ():
trie = PinyinTrie()
- if not trie.load ("../data/pydict3_sc.bin"):
+ if not trie.load ("../data/pydict_sc.bin"):
return
root = trie.get_root_node ()
View
2  src/ime-core/imi_options.cpp
@@ -67,7 +67,7 @@ CSimplifiedChinesePolicy::loadResources()
bool suc = true;
std::string data_dir = m_data_dir.size() ? m_data_dir : SUNPINYIN_DATA_DIR;
std::string lm_path = data_dir + "/lm_sc.t3g";
- std::string dict_path = data_dir + "/pydict3_sc.bin";
+ std::string dict_path = data_dir + "/pydict_sc.bin";
suc &= m_coreData.loadResource(lm_path.c_str(), dict_path.c_str());
View
6 src/sunpinyin-dictgen.mk.in
@@ -34,15 +34,15 @@ lm_sc.t3g.orig: dict.utf8 lm_sc.t3g.arpa
lm_sc.t3g: lm_sc.t3g.orig
tslmendian -e ${ENDIANNESS} -i $^ -o $@
-pydict3_sc.bin: dict.utf8 lm_sc.t3g
+pydict_sc.bin: dict.utf8 lm_sc.t3g
genpyt -e ${ENDIANNESS} -i dict.utf8 -s lm_sc.t3g \
-l lm_sc.t3g.log -o $@
-install: lm_sc.t3g pydict3_sc.bin
+install: lm_sc.t3g pydict_sc.bin
install -d ${DATA_DIR}
install -Dm644 $^ ${DATA_DIR}
clean:
rm -rf ${DICT_AR} ${TSLM_AR} dict.utf8 lm_sc.t3g.arpa \
- lm_sc.t3g.orig lm_sc.t3g lm_sc.t3g.log pydict3_sc.bin
+ lm_sc.t3g.orig lm_sc.t3g lm_sc.t3g.log pydict_sc.bin
View
8 wrapper/macos/SunPinyin.xcodeproj/project.pbxproj
@@ -45,7 +45,7 @@
A4DA4E740DBDD9D600472176 /* portability.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A4DA4E640DBDD9D600472176 /* portability.cpp */; };
A4DA4E750DBDD9D600472176 /* slm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A4DA4E670DBDD9D600472176 /* slm.cpp */; };
A4DA4ED20DBDFA0800472176 /* lm_sc.t3g in Resources */ = {isa = PBXBuildFile; fileRef = A4DA4ED00DBDFA0800472176 /* lm_sc.t3g */; };
- A4DA4ED30DBDFA0800472176 /* pydict3_sc.bin in Resources */ = {isa = PBXBuildFile; fileRef = A4DA4ED10DBDFA0800472176 /* pydict3_sc.bin */; };
+ A4DA4ED30DBDFA0800472176 /* pydict_sc.bin in Resources */ = {isa = PBXBuildFile; fileRef = A4DA4ED10DBDFA0800472176 /* pydict_sc.bin */; };
A4FC48CB0F6530EF0069BE81 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A4FC48C90F6530EF0069BE81 /* Localizable.strings */; };
E93074B70A5C264700470842 /* InputMethodKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E93074B60A5C264700470842 /* InputMethodKit.framework */; };
E93074E20A5C2F1200470842 /* SunPinyinInputController.mm in Sources */ = {isa = PBXBuildFile; fileRef = E93074E10A5C2F1200470842 /* SunPinyinInputController.mm */; };
@@ -147,7 +147,7 @@
A4DA4E670DBDD9D600472176 /* slm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = slm.cpp; sourceTree = "<group>"; };
A4DA4E680DBDD9D600472176 /* slm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = slm.h; sourceTree = "<group>"; };
A4DA4ED00DBDFA0800472176 /* lm_sc.t3g */ = {isa = PBXFileReference; lastKnownFileType = file; name = lm_sc.t3g; path = ../../data/lm_sc.t3g; sourceTree = SOURCE_ROOT; };
- A4DA4ED10DBDFA0800472176 /* pydict3_sc.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = pydict3_sc.bin; path = ../../data/pydict3_sc.bin; sourceTree = "<group>"; };
+ A4DA4ED10DBDFA0800472176 /* pydict_sc.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = pydict_sc.bin; path = ../../data/pydict_sc.bin; sourceTree = "<group>"; };
A4FC48CA0F6530EF0069BE81 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
A4FC48CC0F6531110069BE81 /* zh_CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/Localizable.strings; sourceTree = "<group>"; };
E93074B60A5C264700470842 /* InputMethodKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = InputMethodKit.framework; path = /System/Library/Frameworks/InputMethodKit.framework; sourceTree = "<absolute>"; };
@@ -244,7 +244,7 @@
0752CBF10F9C723600C7096E /* dsa_pub.pem */,
A412C8570F7942DB006B10AD /* SunPinyin.icns */,
A4FC48C90F6530EF0069BE81 /* Localizable.strings */,
- A4DA4ED10DBDFA0800472176 /* pydict3_sc.bin */,
+ A4DA4ED10DBDFA0800472176 /* pydict_sc.bin */,
A4DA4ED00DBDFA0800472176 /* lm_sc.t3g */,
8D1107310486CEB800E47090 /* Info.plist */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
@@ -424,7 +424,7 @@
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
E99A79200BFAA07E00935A00 /* preferences.plist in Resources */,
A4DA4ED20DBDFA0800472176 /* lm_sc.t3g in Resources */,
- A4DA4ED30DBDFA0800472176 /* pydict3_sc.bin in Resources */,
+ A4DA4ED30DBDFA0800472176 /* pydict_sc.bin in Resources */,
A45578F51146A75200592C6E /* MainMenu.xib in Resources */,
A4FC48CB0F6530EF0069BE81 /* Localizable.strings in Resources */,
A412C8580F7942DC006B10AD /* SunPinyin.icns in Resources */,
View
2  wrapper/macos/packaging/README
@@ -2,7 +2,7 @@ Package SunPinyin for Mac OS X release
======================================
SunPinyin for Mac OS X has been updated to support automatic
-self-update and automatic data files (lm_sg.t3g, pydict3_sc.bin)
+self-update and automatic data files (lm_sg.t3g, pydict_sc.bin)
fetching.
1. After you update data files (../../../data/*.t3g.{be,le},
View
2  wrapper/macos/packaging/SunPinyin/DownloadDataFiles/DownloadDataFilesPane.m
@@ -378,7 +378,7 @@ - (void) connectionDidFinishLoading: (NSURLConnection *) connection
return;
}
- NSArray *files = [NSArray arrayWithObjects: @"lm_sc.t3g", @"pydict3_sc.bin", nil];
+ NSArray *files = [NSArray arrayWithObjects: @"lm_sc.t3g", @"pydict_sc.bin", nil];
if (! filesToDownload)
filesToDownload = [[NSMutableArray alloc] initWithCapacity: 2];
View
2  wrapper/macos/packaging/genplist.py
@@ -3,7 +3,7 @@
import plistlib, hashlib, os, sys
dir = "../../../data"
-filenames = [ "lm_sc.t3g.be", "lm_sc.t3g.le", "pydict3_sc.bin.be", "pydict3_sc.bin.le" ]
+filenames = [ "lm_sc.t3g.be", "lm_sc.t3g.le", "pydict_sc.bin.be", "pydict_sc.bin.le" ]
files = []
plist_file = "SunpinyinDataFiles.xml"
View
2  wrapper/macos/packaging/package.py
@@ -41,7 +41,7 @@ def remove_if_exists(file):
print "[PACK] Remove temporary files..."
#remove_if_exists("%s/lm_sc.t3g" % resource_dir)
-#remove_if_exists("%s/pydict3_sc.bin" % resource_dir)
+#remove_if_exists("%s/pydict_sc.bin" % resource_dir)
print "[PACK] Building %s..." % pkg
Please sign in to comment.
Something went wrong with that request. Please try again.