File size: 1,951 Bytes
6e204fa
52f319d
6e204fa
52f319d
 
 
 
 
6e204fa
52f319d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
language: yue
license: apache-2.0
tags:
- generated_from_trainer
model-index:
- name: electra-hongkongese-small-hk-ws
  results: []
---

# electra-hongkongese-small-hk-ws

This model is a fine-tuned version of [toastynews/electra-hongkongese-small-discriminator](https://huggingface.co/toastynews/electra-hongkongese-small-discriminator) on [HKCanCor](https://pycantonese.org/data.html#built-in-data) and [CityU](http://sighan.cs.uchicago.edu/bakeoff2005/) for word segmentation.

## Model description

Performs word segmentation on text from Hong Kong.
There are two versions; hk trained with only text from Hong Kong, and hkt trained with text from Hong Kong and Taiwan. Each version have base and small model sizes.

## Intended uses & limitations

Trained to handle both Hongkongese/Cantonese and Standard Chinese from Hong Kong. Text from other places and English do not work as well. 
The easiest way is to use with the CKIP Transformers libary. 

## Training and evaluation data

HKCanCor and CityU are converted to BI-encoded word segmentation dataset in Hugging Face format using code from [finetune-ckip-transformers](https://github.com/toastynews/finetune-ckip-transformers).

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3.0

### Training results

|dataset   |token_f |token_p |token_r |
|:---------|--------|--------|--------|
|ud yue_hk |  0.9468|  0.9484|  0.9453|
|ud zh_hk  |  0.9277|  0.9350|  0.9205|
|_hkcancor_|_0.9769_|_0.9742_|_0.9795_|
|cityu     |  0.9750|  0.9741|  0.9760|
|as        |  0.9187|  0.9154|  0.9219|

_Was trained on hkcancor. Reported for reference only._

### Framework versions

- Transformers 4.27.0.dev0
- Pytorch 1.10.0
- Datasets 2.10.0
- Tokenizers 0.13.2