hankcs/multi-criteria-cws
hankcs/multi-criteria-cws has 301 GitHub stars and 81 forks. Star changes are not measured yet. Last checked 2026-11-14 01:01 UTC. Last push 2020-08-12.
Gemessener Sternzuwachs
- in 24h
- Verlauf wird gesammelt
- in 7 days
- Verlauf wird gesammelt
- in 15 days
- Verlauf wird gesammelt
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
Über uns
Simple Solution for Multi-Criteria Chinese Word Segmentation
EntwicklerwerkzeugeREADME.md
Originalmulti-criteria-cws
Codes and corpora for paper "Effective Neural Solution for Multi-Criteria Word Segmentation" (accepted & forthcoming at SCI-2018).
Dependency
- Python3
- dynet
Quick Start
Run following command to prepare corpora, split them into train/dev/test sets etc.:
python3 convert_corpus.py
Then convert a corpus $dataset into pickle file:
./script/make.sh $dataset
$datasetcan be one of the following corpora:pku,msr,as,cityu,sxu,ctb,zx,cnc,udcandwtb.$datasetcan also be a joint corpus likejoint-sighan2005orjoint-10in1.- If you have access to sighan2008 corpora, you can also make
joint-sighan2008as your$dataset.
Finally, one command performs both training and test on the fly:
./script/train.sh $dataset
Performance
sighan2005

sighan2008

10-in-1
Since SIGHAN bakeoff 2008 datasets are proprietary and difficult to obtain, we decide to conduct additional experiments on more freely available datasets, for the public to test and verify the efficiency of our method. We applied our solution on 6 additional freely available datasets together with the 4 sighan2005 datasets.

Corpora
In this section, we will briefly introduce those corpora used in this paper.
10 corpora in this repo
Those 10 corpora are either from official sighan2005 website, or collected from open-source project, or from researchers' homepage. Licenses are listed in following table.

sighan2008
As sighan2008 corpora are proprietary, we are unable to distribute them. If you have a legal copy, you can replicate our scores following these instructions.
Firstly, link the sighan2008 to data folder in this project.
ln -s /path/to/your/sighan2008/data data/sighan2008
Then, use HanLP for Traditional Chinese to Simplified Chinese conversion, as shown in the following Java code snippets:
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(
"data/sighan2008/ckip_seg_truth&resource/ckip_truth_utf16.seg"
), "UTF-16"));
String line;
BufferedWriter bw = IOUtil.newBufferedWriter(
"data/sighan2008/ckip_seg_truth&resource/ckip_truth_utf8.seg");
while ((line = br.readLine()) != null)
{
for (String word : line.split("\\s"))
{
if (word.length() == 0) continue;
bw.write(HanLP.convertToSimplifiedChinese(word));
bw.write(" ");
}
bw.newLine();
}
br.close();
bw.close();
You need to repeat this for the following 4 files:
- ckip_train_utf16.seg
- ckip_truth_utf16.seg
- cityu_train_utf16.seg
- cityu_truth_utf16.seg
Then, uncomment following codes in convert_corpus.py:
# For researchers who have access to sighan2008 corpus, use official corpora please.
print('Converting sighan2008 Simplified Chinese corpus')
datasets = 'ctb', 'ckip', 'cityu', 'ncc', 'sxu'
convert_all_sighan2008(datasets)
print('Combining those 8 sighan corpora to one joint corpus')
datasets = 'pku', 'msr', 'as', 'ctb', 'ckip', 'cityu', 'ncc', 'sxu'
make_joint_corpus(datasets, 'joint-sighan2008')
make_bmes('joint-sighan2008')
Finally, you are ready to go:
python3 convert_corpus.py
./script/make.sh joint-sighan2008
./script/train.sh joint-sighan2008
Acknowledgments
- Thanks for those friends who helped us with the experiments.
- Credits should also be given to those generous researchers who shared their corpora with the public, as listed in license table. Your datasets indeed helped those small groups (like us) without any funding.
- Model implementation modified from a Dynet-1.x version by rguthrie3.
Ähnliche Projekte entdecken
codecrafters-io/build-your-own-x
Meistere das Programmieren, indem du deine Lieblingstechnologien von Grund auf neu erschaffst.
562,351 Sternepublic-apis/public-apis
Eine gemeinschaftliche Liste kostenloser APIs
498,794 Sternemorluto/rea
Mit Agenten alles per Reverse Engineering untersuchen, vom Verhalten der Anwendung bis hin zu nativen Binärdateien.
457,728 Sterneopenclaw/openclaw
Die KI, die wirklich Dinge erledigt. Jedes Betriebssystem, jede Plattform. Auf die Hummer-Art. 🦞
394,399 Sterne