Add VLSP 2013 word segmentation, feature ablation study, and Hydra config
Browse files- Add VLSP 2013 WTK dataset (75K train, 2K test sentences)
- Train word segmentation on VLSP 2013: 97.17% word F1
- Run systematic feature ablation study (13 experiments):
- Bigrams most critical (-2.86% when removed)
- Left context second most important (-1.21%)
- Type features provide zero benefit (+0.01% when removed)
- Minimal 12-template model achieves 97.01% (99.8% of full)
- Refactor training script from Click to Hydra configuration
- Add feature group toggles for ablation via config overrides
- Move scripts/ to src/, add Hydra conf/ structure
- Add 16 research paper extracts to references/
- Add research/ literature survey (41 papers, SOTA comparison)
- Update technical report with ablation results and VLSP 2013 eval
This view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +1 -0
- .gitignore +3 -0
- CLAUDE.md +60 -89
- TECHNICAL_REPORT.md +646 -248
- TECHNICAL_REPORT_CRF.md +0 -377
- TECHNICAL_REPORT_REVIEW.md +161 -118
- datasets/c7veardo0e/test.txt +0 -0
- datasets/c7veardo0e/train.txt +3 -0
- models/word_segmentation/ablation/all-bigram/metadata.yaml +57 -0
- models/word_segmentation/ablation/all-bigram/model.crf +3 -0
- models/word_segmentation/ablation/all-left/metadata.yaml +55 -0
- models/word_segmentation/ablation/all-left/model.crf +3 -0
- models/word_segmentation/ablation/all-morphology/metadata.yaml +57 -0
- models/word_segmentation/ablation/all-morphology/model.crf +3 -0
- models/word_segmentation/ablation/all-right/metadata.yaml +55 -0
- models/word_segmentation/ablation/all-right/model.crf +3 -0
- models/word_segmentation/ablation/all-trigram/metadata.yaml +58 -0
- models/word_segmentation/ablation/all-trigram/model.crf +3 -0
- models/word_segmentation/ablation/all-type/metadata.yaml +54 -0
- models/word_segmentation/ablation/all-type/model.crf +3 -0
- models/word_segmentation/ablation/form+ctx+bi+type+morph/metadata.yaml +58 -0
- models/word_segmentation/ablation/form+ctx+bi+type+morph/model.crf +3 -0
- models/word_segmentation/ablation/form+ctx+bi+type/metadata.yaml +55 -0
- models/word_segmentation/ablation/form+ctx+bi+type/model.crf +3 -0
- models/word_segmentation/ablation/form+ctx+bigram/metadata.yaml +49 -0
- models/word_segmentation/ablation/form+ctx+bigram/model.crf +3 -0
- models/word_segmentation/ablation/form+left+right/metadata.yaml +46 -0
- models/word_segmentation/ablation/form+left+right/model.crf +3 -0
- models/word_segmentation/ablation/form+left/metadata.yaml +41 -0
- models/word_segmentation/ablation/form+left/model.crf +3 -0
- models/word_segmentation/ablation/form_only/metadata.yaml +36 -0
- models/word_segmentation/ablation/form_only/model.crf +3 -0
- models/word_segmentation/ablation/full/metadata.yaml +60 -0
- models/word_segmentation/ablation/full/model.crf +3 -0
- models/word_segmentation/vlsp2013/metadata.yaml +60 -0
- models/word_segmentation/vlsp2013/model.crf +3 -0
- references/2003.naacl.sha/paper.md +1051 -0
- references/2003.naacl.sha/paper.pdf +3 -0
- references/2005.emnlp.mcdonald/paper.md +809 -0
- references/2005.emnlp.mcdonald/paper.pdf +3 -0
- references/2006.eacl.mcdonald/paper.md +942 -0
- references/2006.eacl.mcdonald/paper.pdf +3 -0
- references/2006.paclic.nguyen/paper.md +677 -0
- references/2006.paclic.nguyen/paper.pdf +3 -0
- references/2009.alr.nguyen/paper.md +751 -0
- references/2009.alr.nguyen/paper.pdf +3 -0
- references/2011.acl.zhang/paper.md +508 -0
- references/2011.acl.zhang/paper.pdf +3 -0
- references/2015.kse.nguyen/paper.md +860 -0
- references/2015.kse.nguyen/paper.pdf +3 -0
.gitattributes
CHANGED
|
@@ -43,5 +43,6 @@ references/2021.naacl.nguyen/source/JointModel.pdf filter=lfs diff=lfs merge=lfs
|
|
| 43 |
*.pdf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
*.crfsuite filter=lfs diff=lfs merge=lfs -text
|
| 45 |
*.crf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 46 |
*.mco filter=lfs diff=lfs merge=lfs -text
|
| 47 |
*.jar filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 43 |
*.pdf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
*.crfsuite filter=lfs diff=lfs merge=lfs -text
|
| 45 |
*.crf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
datasets/c7veardo0e/train.txt filter=lfs diff=lfs merge=lfs -text
|
| 47 |
*.mco filter=lfs diff=lfs merge=lfs -text
|
| 48 |
*.jar filter=lfs diff=lfs merge=lfs -text
|
.gitignore
CHANGED
|
@@ -34,3 +34,6 @@ wandb/
|
|
| 34 |
|
| 35 |
.claude
|
| 36 |
.claude/
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
.claude
|
| 36 |
.claude/
|
| 37 |
+
|
| 38 |
+
# Outputs
|
| 39 |
+
outputs/
|
CLAUDE.md
CHANGED
|
@@ -4,118 +4,89 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
| 4 |
|
| 5 |
## Project Overview
|
| 6 |
|
| 7 |
-
|
| 8 |
-
- **POS Tagger**: 27 handcrafted feature templates, predicts 15 Universal POS tags
|
| 9 |
-
- **Word Segmentation**: BIO tagging at syllable level, 21 feature templates
|
| 10 |
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
-
tre-1/
|
| 17 |
-
├── models/ # Trained models (versioned by timestamp)
|
| 18 |
-
│ ├── pos_tagger/
|
| 19 |
-
│ │ └── 20260131_154530/ # YYYYMMDD_HHMMSS format
|
| 20 |
-
│ │ ├── model.crfsuite
|
| 21 |
-
│ │ └── metadata.yaml
|
| 22 |
-
│ └── word_segmentation/
|
| 23 |
-
│ └── 20260131_154530/
|
| 24 |
-
│ ├── model.crfsuite
|
| 25 |
-
│ └── metadata.yaml
|
| 26 |
-
├── configs/ # Training configurations
|
| 27 |
-
│ ├── pos_tagger.yaml
|
| 28 |
-
│ └── word_segmentation.yaml
|
| 29 |
-
├── results/ # Evaluation outputs (plots, metrics)
|
| 30 |
-
│ ├── pos_tagger/
|
| 31 |
-
│ └── word_segmentation/
|
| 32 |
-
├── scripts/ # Training, evaluation, inference scripts
|
| 33 |
-
│ ├── train.py
|
| 34 |
-
│ ├── train_word_segmentation.py
|
| 35 |
-
│ ├── evaluate.py
|
| 36 |
-
│ ├── predict.py
|
| 37 |
-
│ └── predict_word_segmentation.py
|
| 38 |
-
├── handler.py # Hugging Face Custom Handler
|
| 39 |
-
├── pos_tagger.crfsuite # Legacy model (for HF deployment)
|
| 40 |
-
└── CLAUDE.md
|
| 41 |
-
```
|
| 42 |
-
|
| 43 |
-
## Running the Model
|
| 44 |
-
|
| 45 |
-
**Local inference:**
|
| 46 |
-
```python
|
| 47 |
-
from handler import EndpointHandler
|
| 48 |
-
handler = EndpointHandler(path="models/pos_tagger/20260131_000000")
|
| 49 |
-
result = handler({"inputs": "Tôi yêu Việt Nam"})
|
| 50 |
-
```
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
#
|
|
|
|
|
|
|
| 59 |
|
| 60 |
-
``
|
| 61 |
-
# Train model (auto-generates timestamp version, e.g., 20260131_154530)
|
| 62 |
-
uv run scripts/train.py
|
| 63 |
|
| 64 |
-
#
|
| 65 |
-
uv run scripts/train.py --version my_experiment
|
| 66 |
|
| 67 |
-
#
|
| 68 |
-
uv run scripts/train.py --wandb
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
-
uv run scripts/evaluate.py --version 20260131_000000
|
| 75 |
|
| 76 |
-
#
|
| 77 |
-
uv run scripts/evaluate.py --save-plots
|
| 78 |
|
| 79 |
-
|
| 80 |
-
uv run scripts/predict.py "Tôi yêu Việt Nam"
|
| 81 |
-
uv run scripts/predict.py --version 20260131_000000 --format json "Hà Nội là thủ đô"
|
| 82 |
-
```
|
| 83 |
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
-
```
|
| 87 |
-
# Train model (auto-generates timestamp version)
|
| 88 |
-
uv run scripts/train_word_segmentation.py
|
| 89 |
|
| 90 |
-
#
|
| 91 |
-
uv run scripts/train_word_segmentation.py --version my_experiment
|
| 92 |
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
```
|
| 96 |
|
| 97 |
-
##
|
| 98 |
|
| 99 |
-
|
|
|
|
| 100 |
|
| 101 |
-
|
| 102 |
-
- **EndpointHandler**: Hugging Face API entry point - loads CRF model, handles tokenization and inference
|
| 103 |
|
| 104 |
-
|
| 105 |
|
| 106 |
## Key Constraints
|
| 107 |
|
| 108 |
-
-
|
| 109 |
-
-
|
| 110 |
-
-
|
| 111 |
-
-
|
| 112 |
-
-
|
|
|
|
| 113 |
|
| 114 |
-
##
|
| 115 |
|
| 116 |
-
|
| 117 |
-
- Each version has its own directory under `models/{task}/{timestamp}/`
|
| 118 |
-
- Auto-generated when training without `--version` flag
|
| 119 |
-
- Scripts default to **latest** version (sorted alphabetically)
|
| 120 |
-
- `metadata.yaml` contains training info, hyperparameters, and performance metrics
|
| 121 |
-
- `configs/` stores reusable training configurations
|
|
|
|
| 4 |
|
| 5 |
## Project Overview
|
| 6 |
|
| 7 |
+
TRE-1: CRF-based Vietnamese NLP models deployed at [undertheseanlp/tre-1](https://huggingface.co/undertheseanlp/tre-1). Two tasks implemented, two planned:
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
| Task | Status | Accuracy | Script |
|
| 10 |
+
|------|--------|----------|--------|
|
| 11 |
+
| POS Tagging | Done | 95.89% (UDD-1) | `scripts/train.py` |
|
| 12 |
+
| Word Segmentation | Done | 98.90% syl / 98.01% word F1 | `scripts/train_word_segmentation.py` |
|
| 13 |
+
| Chunking | Planned | — | — |
|
| 14 |
+
| Dependency Parsing | Planned | — | — |
|
| 15 |
|
| 16 |
+
Pipeline order: WS → POS → Chunk → DP. All models are CPU-only CRFs (no deep learning).
|
| 17 |
|
| 18 |
+
## Commands
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
All scripts use PEP 723 inline metadata — `uv run` handles dependencies automatically (no venv setup needed).
|
| 21 |
|
| 22 |
+
```bash
|
| 23 |
+
# Train
|
| 24 |
+
uv run scripts/train.py # POS tagger
|
| 25 |
+
uv run scripts/train_word_segmentation.py # Word segmentation
|
| 26 |
+
uv run scripts/train.py --trainer crfsuite-rs --c1 0.5 --c2 0.01 --max-iterations 200
|
| 27 |
+
uv run scripts/train.py --version my_experiment # Custom version name
|
| 28 |
+
uv run scripts/train.py --wandb # W&B logging
|
| 29 |
+
|
| 30 |
+
# Evaluate
|
| 31 |
+
uv run scripts/evaluate.py # Latest POS model
|
| 32 |
+
uv run scripts/evaluate.py --version 20260131_000000 --save-plots
|
| 33 |
+
|
| 34 |
+
# Predict
|
| 35 |
+
uv run scripts/predict.py "Tôi yêu Việt Nam"
|
| 36 |
+
uv run scripts/predict.py --format json "Hà Nội là thủ đô"
|
| 37 |
+
uv run scripts/predict_word_segmentation.py "Trên thế giới, giá vàng đang giao dịch"
|
| 38 |
|
| 39 |
+
# Compare trainer backends
|
| 40 |
+
uv run scripts/test_trainers.py [num_sentences]
|
| 41 |
+
```
|
| 42 |
|
| 43 |
+
Install base dependency: `uv pip install python-crfsuite`
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
## Architecture
|
|
|
|
| 46 |
|
| 47 |
+
### Core Components
|
|
|
|
| 48 |
|
| 49 |
+
**`handler.py`** — Single-file Hugging Face Custom Handler containing:
|
| 50 |
+
- `PythonCRFFeaturizer`: Feature extraction engine using template syntax `T[index].attribute`
|
| 51 |
+
- `EndpointHandler`: HF inference API entry point — loads model, tokenizes, extracts features, predicts
|
| 52 |
|
| 53 |
+
**Data flow:** Input text → whitespace tokenization → per-token feature extraction → CRF prediction → `[{"token": "...", "tag": "..."}]`
|
|
|
|
| 54 |
|
| 55 |
+
### Trainer Abstraction
|
|
|
|
| 56 |
|
| 57 |
+
Both training scripts (`train.py`, `train_word_segmentation.py`) share a parallel architecture with 3 interchangeable CRF backends via `CRFTrainerBase`:
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
+
| Backend | Package | Model Format | Notes |
|
| 60 |
+
|---------|---------|-------------|-------|
|
| 61 |
+
| `python-crfsuite` | `pycrfsuite` | `.crfsuite` | Default, most compatible |
|
| 62 |
+
| `crfsuite-rs` | `crfsuite` | `.crfsuite` | Rust bindings, faster |
|
| 63 |
+
| `underthesea-core` | `underthesea_core` | `.crf` | Native Rust, requires local build |
|
| 64 |
|
| 65 |
+
Feature extraction code is **duplicated** across `handler.py`, `train.py`, `evaluate.py`, `predict.py`, and `predict_word_segmentation.py`. When modifying features, all copies must be updated.
|
|
|
|
|
|
|
| 66 |
|
| 67 |
+
### Feature Templates
|
|
|
|
| 68 |
|
| 69 |
+
- **POS**: 27 templates using `T[index]` prefix — word form, case, prefix/suffix (2-3 chars), bigrams, dictionary lookups
|
| 70 |
+
- **WS**: 21 templates using `S[index]` prefix — syllable-level features including `ispunct`, `len`, bigrams, trigrams
|
|
|
|
| 71 |
|
| 72 |
+
### Tagging Schemes
|
| 73 |
|
| 74 |
+
- **POS**: 15 Universal POS tags (ADJ, ADP, ADV, AUX, CCONJ, DET, NOUN, NUM, PART, PRON, PROPN, PUNCT, SCONJ, VERB, X)
|
| 75 |
+
- **WS**: BIO at syllable level — B (beginning of word), I (inside/continuation). Uses `underthesea.regex_tokenize` to split compound words into syllables.
|
| 76 |
|
| 77 |
+
## Model Versioning
|
|
|
|
| 78 |
|
| 79 |
+
Models stored at `models/{task}/{version}/` with `model.crfsuite` + `metadata.yaml`. Versions are `YYYYMMDD_HHMMSS` timestamps (auto-generated) or custom names. Scripts default to the **latest version** (last when sorted alphabetically).
|
| 80 |
|
| 81 |
## Key Constraints
|
| 82 |
|
| 83 |
+
- CRF hyperparams: c1=1.0 (L1), c2=0.001 (L2), max_iterations=100
|
| 84 |
+
- POS input must be pre-tokenized (whitespace-separated Vietnamese tokens)
|
| 85 |
+
- WS input goes through `underthesea.regex_tokenize` first
|
| 86 |
+
- Dataset: `undertheseanlp/UDD-1` from Hugging Face
|
| 87 |
+
- `underthesea-core` trainer requires building from local source (see docstring in trainer classes)
|
| 88 |
+
- Some scripts have hardcoded local `.whl` paths in PEP 723 metadata for `underthesea-core`
|
| 89 |
|
| 90 |
+
## Research
|
| 91 |
|
| 92 |
+
`research/` contains literature survey (41 papers, 5 with full text) and `references/` has individual paper extracts. See `research/sota.md` for SOTA comparison and `research/comparison.md` for system-level analysis.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TECHNICAL_REPORT.md
CHANGED
|
@@ -1,8 +1,17 @@
|
|
| 1 |
-
# Technical Report: Vietnamese
|
| 2 |
|
| 3 |
## Executive Summary
|
| 4 |
|
| 5 |
-
This report documents the development
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
---
|
| 8 |
|
|
@@ -10,26 +19,37 @@ This report documents the development, training, evaluation, and deployment of a
|
|
| 10 |
|
| 11 |
### 1.1 Problem Statement
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
-
|
| 16 |
-
- **Word segmentation**: Compound words and multi-syllable words require proper tokenization
|
| 17 |
-
- **Limited resources**: Fewer annotated datasets compared to English
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
1.
|
| 22 |
-
2. Use underthesea-compatible feature templates for integration
|
| 23 |
-
3. Deploy the model on Hugging Face for public access
|
| 24 |
-
4. Provide comprehensive evaluation and documentation
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
-
|
| 31 |
-
-
|
| 32 |
-
-
|
|
|
|
|
|
|
| 33 |
|
| 34 |
---
|
| 35 |
|
|
@@ -46,7 +66,23 @@ Our main contributions are as follows:
|
|
| 46 |
| **License** | CC-BY-SA-4.0 |
|
| 47 |
| **Annotation** | Machine-generated using Underthesea toolkit |
|
| 48 |
|
| 49 |
-
### 2.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
| Split | Sentences | Tokens |
|
| 52 |
|-------|-----------|--------|
|
|
@@ -55,7 +91,7 @@ Our main contributions are as follows:
|
|
| 55 |
| Validation | 859 | ~19,605 |
|
| 56 |
| Test | 859 | 19,210 |
|
| 57 |
|
| 58 |
-
### 2.
|
| 59 |
|
| 60 |
| Tag | Description | Count | Percentage |
|
| 61 |
|-----|-------------|-------|------------|
|
|
@@ -79,9 +115,209 @@ Our main contributions are as follows:
|
|
| 79 |
|
| 80 |
---
|
| 81 |
|
| 82 |
-
## 3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
| 97 |
|
| 98 |
-
###
|
| 99 |
|
| 100 |
-
The
|
| 101 |
|
| 102 |
#### Current Token Features (10)
|
| 103 |
```
|
|
@@ -134,46 +370,9 @@ T[-1,0].is_in_dict - Bigram in dictionary
|
|
| 134 |
T[0,1].is_in_dict - Bigram in dictionary
|
| 135 |
```
|
| 136 |
|
| 137 |
-
###
|
| 138 |
-
|
| 139 |
-
| Parameter | Value | Description |
|
| 140 |
-
|-----------|-------|-------------|
|
| 141 |
-
| Algorithm | lbfgs | Limited-memory BFGS optimization |
|
| 142 |
-
| c1 | 1.0 | L1 regularization coefficient |
|
| 143 |
-
| c2 | 0.001 | L2 regularization coefficient |
|
| 144 |
-
| max_iterations | 100 | Maximum training iterations |
|
| 145 |
-
| feature.possible_transitions | True | Include all possible transitions |
|
| 146 |
-
|
| 147 |
-
### 3.4 Implementation
|
| 148 |
-
|
| 149 |
-
**Libraries Used**:
|
| 150 |
-
- `python-crfsuite` (0.9.11) - CRF implementation
|
| 151 |
-
- `scikit-learn` (1.6.1) - Evaluation metrics
|
| 152 |
-
- `datasets` (4.5.0) - Data loading from Hugging Face
|
| 153 |
-
- `click` (8.0+) - CLI interface
|
| 154 |
-
|
| 155 |
-
**Code Structure**:
|
| 156 |
-
```
|
| 157 |
-
tre-1/
|
| 158 |
-
├── handler.py # Inference handler (Hugging Face endpoint)
|
| 159 |
-
├── pos_tagger.crfsuite # Trained CRF model (2.3 MB)
|
| 160 |
-
├── requirements.txt # Runtime dependencies
|
| 161 |
-
├── README.md # Model card
|
| 162 |
-
├── TECHNICAL_REPORT.md # This report
|
| 163 |
-
├── CLAUDE.md # Development guide
|
| 164 |
-
├── confusion_matrix.png # Confusion matrix visualization
|
| 165 |
-
├── per_tag_metrics.png # Per-tag metrics visualization
|
| 166 |
-
└── scripts/ # Reproducibility scripts
|
| 167 |
-
├── train.py # Training script (Click CLI)
|
| 168 |
-
├── evaluate.py # Evaluation with metrics & plots
|
| 169 |
-
└── predict.py # Inference CLI
|
| 170 |
-
```
|
| 171 |
-
|
| 172 |
-
---
|
| 173 |
-
|
| 174 |
-
## 4. Results
|
| 175 |
|
| 176 |
-
###
|
| 177 |
|
| 178 |
| Metric | Score |
|
| 179 |
|--------|-------|
|
|
@@ -183,7 +382,7 @@ tre-1/
|
|
| 183 |
| **F1 (macro)** | 92.71% |
|
| 184 |
| **F1 (weighted)** | 95.87% |
|
| 185 |
|
| 186 |
-
###
|
| 187 |
|
| 188 |
| Tag | Precision | Recall | F1-Score | Support |
|
| 189 |
|-----|-----------|--------|----------|---------|
|
|
@@ -203,73 +402,255 @@ tre-1/
|
|
| 203 |
| X | 0.7778 | 0.8400 | 0.8077 | 25 |
|
| 204 |
| PART | 0.8750 | 0.6364 | 0.7368 | 22 |
|
| 205 |
|
| 206 |
-
###
|
| 207 |
|
| 208 |

|
| 209 |
|
| 210 |
-
###
|
| 211 |
|
| 212 |

|
| 213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
---
|
| 215 |
|
| 216 |
-
##
|
|
|
|
|
|
|
| 217 |
|
| 218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
|
| 220 |
| Error Type | True Label | Predicted | Count | Example |
|
| 221 |
|------------|------------|-----------|-------|---------|
|
| 222 |
-
| VERB
|
| 223 |
-
| NOUN
|
| 224 |
-
| DET
|
| 225 |
-
| NOUN
|
| 226 |
-
| VERB
|
| 227 |
-
| NUM
|
| 228 |
-
| ADJ
|
| 229 |
-
| ADP
|
| 230 |
-
| ADV
|
| 231 |
-
| ADJ
|
| 232 |
-
|
| 233 |
-
###
|
| 234 |
-
|
| 235 |
-
1. **Lexical Ambiguity**: Many Vietnamese words
|
| 236 |
2. **Compound Words**: Multi-word expressions may be incorrectly segmented
|
| 237 |
-
3. **Context Limitation**: CRF window size (
|
| 238 |
4. **Domain Variation**: Legal and news domains have different vocabulary distributions
|
| 239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
---
|
| 241 |
|
| 242 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 243 |
|
| 244 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
|
| 246 |
**Model URL**: [https://huggingface.co/undertheseanlp/tre-1](https://huggingface.co/undertheseanlp/tre-1)
|
| 247 |
|
| 248 |
**Files Deployed**:
|
| 249 |
| File | Size | Description |
|
| 250 |
|------|------|-------------|
|
| 251 |
-
| `pos_tagger.crfsuite` | 2.3 MB | Trained CRF model |
|
| 252 |
| `handler.py` | 4.5 KB | Custom inference handler |
|
| 253 |
| `requirements.txt` | 28 B | Python dependencies |
|
| 254 |
| `README.md` | 2.5 KB | Model card |
|
| 255 |
|
| 256 |
-
###
|
| 257 |
|
| 258 |
#### Python (Local)
|
| 259 |
|
| 260 |
```python
|
| 261 |
-
from
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
# Download model
|
| 265 |
-
model_path = hf_hub_download(
|
| 266 |
-
repo_id="undertheseanlp/tre-1",
|
| 267 |
-
filename="pos_tagger.crfsuite"
|
| 268 |
-
)
|
| 269 |
-
|
| 270 |
-
# Load model
|
| 271 |
-
tagger = pycrfsuite.Tagger()
|
| 272 |
-
tagger.open(model_path)
|
| 273 |
```
|
| 274 |
|
| 275 |
#### Inference API
|
|
@@ -288,8 +669,9 @@ response = requests.post(
|
|
| 288 |
print(response.json())
|
| 289 |
```
|
| 290 |
|
| 291 |
-
###
|
| 292 |
|
|
|
|
| 293 |
| Input | Output |
|
| 294 |
|-------|--------|
|
| 295 |
| "Tôi yêu Việt Nam" | Tôi/PRON yêu/VERB Việt/PROPN Nam/PUNCT |
|
|
@@ -300,133 +682,105 @@ print(response.json())
|
|
| 300 |
|
| 301 |
---
|
| 302 |
|
| 303 |
-
##
|
| 304 |
|
| 305 |
-
###
|
| 306 |
|
| 307 |
-
|
| 308 |
-
|---------|-----------|---------|-----------|
|
| 309 |
-
| UDD-v0.1 | 3,000 | Legal | Previous |
|
| 310 |
-
| **UDD-1** | **20,000** | **Legal + News** | **Current** |
|
| 311 |
-
| VLSP 2013 | 27,870 | Mixed | Benchmark |
|
| 312 |
-
|
| 313 |
-
### 7.2 Model Comparison
|
| 314 |
-
|
| 315 |
-
| Model | Dataset | Accuracy | F1 (macro) |
|
| 316 |
-
|-------|---------|----------|------------|
|
| 317 |
-
| TRE-1 v1.0 | UDD-v0.1 | 95.57% | 87.45% |
|
| 318 |
-
| **TRE-1 v1.1** | **UDD-1** | **95.89%** | **92.71%** |
|
| 319 |
-
| Improvement | - | +0.32% | **+5.26%** |
|
| 320 |
-
|
| 321 |
-
### 7.3 Comparison with Vietnamese POS Taggers (VLSP 2013)
|
| 322 |
-
|
| 323 |
-
| Model | Accuracy | Method | Reference |
|
| 324 |
-
|-------|----------|--------|-----------|
|
| 325 |
-
| PhoBERT-large | 96.8% | Transformer | Nguyen & Nguyen (2020) |
|
| 326 |
-
| vELECTRA | 96.77% | Transformer | Bui et al. (2020) |
|
| 327 |
-
| VnMarMoT | 95.88% | CRF | Nguyen et al. (2018) |
|
| 328 |
-
| **TRE-1** | **95.89%** | **CRF** | **This work** |
|
| 329 |
-
| RDRPOSTagger | 95.11% | Rules | Nguyen et al. (2014) |
|
| 330 |
-
|
| 331 |
-
**Note**: Direct comparison is limited as TRE-1 is evaluated on UDD-1, not VLSP 2013. Our accuracy (95.89%) is competitive with VnMarMoT (95.88%) on VLSP 2013.
|
| 332 |
-
|
| 333 |
-
---
|
| 334 |
|
| 335 |
-
##
|
| 336 |
|
| 337 |
-
|
| 338 |
|
| 339 |
-
###
|
| 340 |
|
| 341 |
-
|
| 342 |
|
| 343 |
-
###
|
| 344 |
|
| 345 |
-
|
| 346 |
|
| 347 |
-
###
|
| 348 |
|
| 349 |
-
**
|
| 350 |
|
| 351 |
-
###
|
| 352 |
|
| 353 |
-
|
| 354 |
|
| 355 |
-
|
| 356 |
|
| 357 |
-
|
| 358 |
|
| 359 |
-
|
| 360 |
|
| 361 |
-
|
| 362 |
|
| 363 |
-
|
| 364 |
|
| 365 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 366 |
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
### 8.6 Datasets and Benchmarks
|
| 370 |
-
|
| 371 |
-
The **VLSP 2013** shared task (Nguyen et al., 2013) established the primary benchmark for Vietnamese POS tagging, providing 27,870 manually annotated sentences. However, researchers have identified data leakage issues: sentences from VLSP 2016 NER and VnDT are included in VLSP 2013.
|
| 372 |
-
|
| 373 |
-
**Universal Dependencies** (Nivre et al., 2020) provides cross-linguistically consistent annotations. The Vietnamese UD treebank (UD_Vietnamese-VTB) contains 3,000 sentences converted from the VLSP constituent treebank.
|
| 374 |
-
|
| 375 |
-
Our **UDD-1** dataset contributes 20,000 sentences from legal documents and news, annotated using the underthesea toolkit. While machine-annotated, the larger scale and multi-domain coverage complement existing resources.
|
| 376 |
-
|
| 377 |
-
### 8.7 Summary
|
| 378 |
-
|
| 379 |
-
| Approach | Representative | VLSP 2013 | Params | Strengths |
|
| 380 |
-
|----------|---------------|-----------|--------|-----------|
|
| 381 |
-
| Rules | RDRPOSTagger | 95.11% | - | Fast, interpretable |
|
| 382 |
-
| CRF | VnMarMoT, TRE-1 | 95.88% | - | Fast, no GPU |
|
| 383 |
-
| BiLSTM-CRF | Nguyen et al. | 93.52% | ~10M | End-to-end |
|
| 384 |
-
| Transformer | PhoBERT-large | 96.8% | 370M | Pre-trained LM |
|
| 385 |
-
| Efficient | ViDeBERTa-base | ~96.8% | 86M | 4x smaller |
|
| 386 |
-
| Multi-task | PhoNLP | 96.91% | 135M+ | Best accuracy |
|
| 387 |
-
| Domain-specific | ViSoBERT | - | 278M | Social media |
|
| 388 |
-
|
| 389 |
-
Our work demonstrates that CRF-based methods remain competitive (95.89%) when combined with well-designed feature templates, offering a practical alternative when computational resources are limited.
|
| 390 |
|
| 391 |
---
|
| 392 |
|
| 393 |
-
##
|
| 394 |
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
1. **Tokenization Required**: Model expects pre-tokenized input (whitespace-separated). Compound words must be joined with underscores.
|
| 398 |
|
| 399 |
2. **Machine-Annotated Data**: UDD-1 annotations are machine-generated using the Underthesea toolkit, which may introduce systematic annotation errors.
|
| 400 |
|
| 401 |
3. **Domain Coverage**: Trained primarily on legal documents and news. Performance on social media, conversational, or literary text is unknown.
|
| 402 |
|
| 403 |
-
4. **Rare Tags**: PART (0.11%) and X (0.13%) tags have limited training samples, leading to lower F1 scores (0.74 and 0.81 respectively).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
|
| 405 |
-
|
| 406 |
|
| 407 |
---
|
| 408 |
|
| 409 |
-
##
|
| 410 |
|
| 411 |
-
|
|
|
|
| 412 |
2. **Manual Annotation Verification**: Sample-based quality assessment of UDD-1 annotations
|
| 413 |
3. **Multi-domain Training**: Include social media, conversational, and literary data
|
| 414 |
-
|
| 415 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 416 |
|
| 417 |
---
|
| 418 |
|
| 419 |
-
##
|
| 420 |
|
| 421 |
All experiments are logged to Weights & Biases:
|
| 422 |
|
| 423 |
-
- **
|
| 424 |
-
- **
|
| 425 |
-
- **
|
| 426 |
|
| 427 |
---
|
| 428 |
|
| 429 |
-
##
|
| 430 |
|
| 431 |
### Environment
|
| 432 |
|
|
@@ -437,7 +791,7 @@ OS: Linux
|
|
| 437 |
|
| 438 |
### Dependencies
|
| 439 |
|
| 440 |
-
Scripts use PEP 723 inline metadata - no separate requirements file needed for training/evaluation.
|
| 441 |
|
| 442 |
```
|
| 443 |
python-crfsuite>=0.9.11
|
|
@@ -446,100 +800,121 @@ scikit-learn>=1.6.1
|
|
| 446 |
matplotlib>=3.5.0
|
| 447 |
seaborn>=0.12.0
|
| 448 |
click>=8.0.0
|
|
|
|
| 449 |
```
|
| 450 |
|
| 451 |
-
### Training
|
| 452 |
|
| 453 |
```bash
|
| 454 |
-
#
|
| 455 |
-
uv run scripts/
|
|
|
|
| 456 |
|
| 457 |
-
#
|
| 458 |
-
uv run scripts/
|
|
|
|
| 459 |
|
| 460 |
-
#
|
|
|
|
|
|
|
| 461 |
uv run scripts/train.py --wandb
|
| 462 |
```
|
| 463 |
|
| 464 |
-
### Evaluation
|
| 465 |
|
| 466 |
```bash
|
| 467 |
-
#
|
| 468 |
-
uv run scripts/evaluate.py --
|
| 469 |
|
| 470 |
-
#
|
| 471 |
-
uv run scripts/evaluate.py --
|
| 472 |
```
|
| 473 |
|
| 474 |
-
### Inference
|
| 475 |
|
| 476 |
```bash
|
| 477 |
-
#
|
| 478 |
-
uv run scripts/
|
| 479 |
|
| 480 |
-
#
|
|
|
|
| 481 |
uv run scripts/predict.py --format json "Hà Nội là thủ đô"
|
| 482 |
```
|
| 483 |
|
| 484 |
-
|
| 485 |
|
| 486 |
-
|
| 487 |
-
pos_tagger.crfsuite
|
| 488 |
-
Size: 2.3 MB
|
| 489 |
-
```
|
| 490 |
|
| 491 |
-
--
|
| 492 |
|
| 493 |
-
|
|
|
|
| 494 |
|
| 495 |
-
|
| 496 |
|
| 497 |
-
|
| 498 |
-
1. High-accuracy Vietnamese POS tagger (95.89%) with open-source code
|
| 499 |
-
2. Training on UDD-1, a 20K-sentence multi-domain dataset
|
| 500 |
-
3. Detailed feature engineering documentation (27 templates)
|
| 501 |
-
4. Public model deployment on Hugging Face
|
| 502 |
-
5. Comprehensive evaluation and error analysis
|
| 503 |
|
| 504 |
-
|
| 505 |
|
| 506 |
---
|
| 507 |
|
| 508 |
## References
|
| 509 |
|
| 510 |
-
1. Lafferty, J., McCallum, A., & Pereira, F. (2001). Conditional Random Fields: Probabilistic Models for Segmenting and Labeling Sequence Data. *ICML*, 282-289.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 511 |
|
| 512 |
-
|
| 513 |
|
| 514 |
-
|
| 515 |
|
| 516 |
-
|
| 517 |
|
| 518 |
-
|
| 519 |
|
| 520 |
-
|
| 521 |
|
| 522 |
-
|
| 523 |
|
| 524 |
-
|
| 525 |
|
| 526 |
-
|
| 527 |
|
| 528 |
-
|
| 529 |
|
| 530 |
-
|
| 531 |
|
| 532 |
-
|
| 533 |
|
| 534 |
-
|
| 535 |
|
| 536 |
-
|
| 537 |
|
| 538 |
-
|
| 539 |
|
| 540 |
-
|
| 541 |
|
| 542 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 543 |
|
| 544 |
---
|
| 545 |
|
|
@@ -547,6 +922,7 @@ The model is publicly available on Hugging Face and can be easily integrated int
|
|
| 547 |
|
| 548 |
### A. Feature Template Syntax
|
| 549 |
|
|
|
|
| 550 |
| Syntax | Meaning |
|
| 551 |
|--------|---------|
|
| 552 |
| `T[0]` | Current token |
|
|
@@ -558,35 +934,57 @@ The model is publicly available on Hugging Face and can be easily integrated int
|
|
| 558 |
| `.suffix3` | Last 3 characters |
|
| 559 |
| `.is_in_dict` | Dictionary lookup |
|
| 560 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 561 |
### B. Universal POS Tags
|
| 562 |
|
| 563 |
| Tag | Description | Example |
|
| 564 |
|-----|-------------|---------|
|
| 565 |
-
| ADJ | Adjective |
|
| 566 |
| ADP | Adposition | trong (in) |
|
| 567 |
-
| ADV | Adverb |
|
| 568 |
-
| AUX | Auxiliary |
|
| 569 |
-
| CCONJ | Coordinating conjunction |
|
| 570 |
-
| DET | Determiner |
|
| 571 |
-
| NOUN | Noun |
|
| 572 |
-
| NUM | Numeral |
|
| 573 |
-
| PART | Particle |
|
| 574 |
-
| PRON | Pronoun |
|
| 575 |
-
| PROPN | Proper noun |
|
| 576 |
| PUNCT | Punctuation | . , ? |
|
| 577 |
-
| SCONJ | Subordinating conjunction |
|
| 578 |
-
| VERB | Verb |
|
| 579 |
| X | Other | - |
|
| 580 |
|
| 581 |
-
### C.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 582 |
|
| 583 |
-
| Version | Date | Dataset |
|
| 584 |
-
|---------|------|---------|----------
|
| 585 |
-
| 1.0 | 2025-01-31 | UDD-v0.1 (3K) |
|
| 586 |
-
| **1.1** | **2026-01-31** | **UDD-1 (20K)** | **
|
|
|
|
|
|
|
| 587 |
|
| 588 |
---
|
| 589 |
|
| 590 |
-
*Report generated:
|
| 591 |
*Model: undertheseanlp/tre-1*
|
| 592 |
-
*Version: 1.
|
|
|
|
| 1 |
+
# Technical Report: Vietnamese NLP Pipeline (TRE-1)
|
| 2 |
|
| 3 |
## Executive Summary
|
| 4 |
|
| 5 |
+
This report documents the development of **TRE-1**, a Vietnamese NLP pipeline using Conditional Random Fields (CRF) and non-neural methods optimized for CPU inference. TRE-1 covers four core NLP tasks in a sequential pipeline architecture:
|
| 6 |
+
|
| 7 |
+
| Task | Method | Status | Performance |
|
| 8 |
+
|------|--------|--------|-------------|
|
| 9 |
+
| Word Segmentation | CRF (BIO tagging) | Implemented | 98.01% word F1 (UDD-1), 97.17% word F1 (VLSP 2013) |
|
| 10 |
+
| POS Tagging | CRF (27 features) | Implemented | 95.89% accuracy |
|
| 11 |
+
| Chunking | CRF (BIO tagging) | Planned | -- |
|
| 12 |
+
| Dependency Parsing | Non-neural (transition/graph-based) | Planned | -- |
|
| 13 |
+
|
| 14 |
+
The pipeline achieves competitive results with models requiring no GPU, with a total footprint under 20 MB. Models are deployed on Hugging Face at [undertheseanlp/tre-1](https://huggingface.co/undertheseanlp/tre-1).
|
| 15 |
|
| 16 |
---
|
| 17 |
|
|
|
|
| 19 |
|
| 20 |
### 1.1 Problem Statement
|
| 21 |
|
| 22 |
+
Vietnamese NLP presents unique challenges that affect all four pipeline tasks:
|
| 23 |
+
|
| 24 |
+
- **Analytic language**: Vietnamese lacks inflectional morphology, making POS disambiguation context-dependent
|
| 25 |
+
- **Word segmentation**: Vietnamese words are often multi-syllable compounds written with spaces between syllables (e.g., "Thời hạn" = one word meaning "deadline")
|
| 26 |
+
- **Limited resources**: Fewer annotated datasets compared to English, especially for chunking and dependency parsing
|
| 27 |
+
- **Practical deployment**: Many applications require fast, lightweight models that run on CPU without GPU infrastructure
|
| 28 |
+
|
| 29 |
+
### 1.2 Design Philosophy
|
| 30 |
|
| 31 |
+
TRE-1 adopts a **CPU-first, no deep learning** approach:
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
1. **CRF for sequence labeling** (word segmentation, POS tagging, chunking)
|
| 34 |
+
2. **Non-neural parsing** for dependency parsing (transition-based or graph-based)
|
| 35 |
+
3. **Pipeline architecture** validated by Nguyen et al. (2017): WS -> POS -> Chunk -> DP
|
| 36 |
+
4. **Small model footprint**: Total pipeline < 20 MB
|
| 37 |
+
5. **Fast inference**: No GPU required, suitable for edge deployment
|
| 38 |
|
| 39 |
+
### 1.3 Objectives
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
1. Build a complete Vietnamese NLP pipeline using CRF and non-neural methods
|
| 42 |
+
2. Achieve competitive accuracy with neural methods where possible
|
| 43 |
+
3. Deploy models on Hugging Face for public access
|
| 44 |
+
4. Provide comprehensive evaluation and documentation for all tasks
|
| 45 |
|
| 46 |
+
### 1.4 Contributions
|
| 47 |
|
| 48 |
+
- **TRE-1 Word Segmentation**: CRF-based syllable-level BIO tagger achieving 98.01% word F1 on UDD-1 and 97.17% word F1 on VLSP 2013
|
| 49 |
+
- **TRE-1 POS Tagger**: CRF with 27 handcrafted feature templates achieving 95.89% accuracy on UDD-1, matching VnMarMoT (95.88% on VLSP 2013)
|
| 50 |
+
- **Feature ablation study**: Systematic analysis of 7 feature groups showing bigrams (-2.86% when removed) and left context (-1.21%) are critical, while type features provide zero benefit
|
| 51 |
+
- **Pipeline architecture design** for chunking and dependency parsing based on literature review of 41 papers
|
| 52 |
+
- **Open-source release** at [undertheseanlp/tre-1](https://huggingface.co/undertheseanlp/tre-1)
|
| 53 |
|
| 54 |
---
|
| 55 |
|
|
|
|
| 66 |
| **License** | CC-BY-SA-4.0 |
|
| 67 |
| **Annotation** | Machine-generated using Underthesea toolkit |
|
| 68 |
|
| 69 |
+
### 2.2 VLSP 2013 Word Tokenization Dataset
|
| 70 |
+
|
| 71 |
+
| Property | Value |
|
| 72 |
+
|----------|-------|
|
| 73 |
+
| **Name** | VLSP 2013 Word Tokenization (WTK) |
|
| 74 |
+
| **Source** | VLSP 2013 shared task |
|
| 75 |
+
| **Format** | Syllable-level BIO tagging (B-W/I-W) |
|
| 76 |
+
| **Used for** | Word Segmentation |
|
| 77 |
+
|
| 78 |
+
| Split | Sentences | Syllables | Words | Multi-syllable words |
|
| 79 |
+
|-------|-----------|-----------|-------|---------------------|
|
| 80 |
+
| Train | 75,389 | 2,193,827 | 1,735,433 | 432,631 (24.9%) |
|
| 81 |
+
| Test | 2,120 | 96,457 | 66,241 | 28,028 (42.3%) |
|
| 82 |
+
|
| 83 |
+
**Observation**: The test set has longer sentences (45.5 vs 29.1 avg syllables) and a significantly higher proportion of multi-syllable words (42.3% vs 24.9%), making it a more challenging evaluation split.
|
| 84 |
+
|
| 85 |
+
### 2.3 UDD-1 Dataset Statistics
|
| 86 |
|
| 87 |
| Split | Sentences | Tokens |
|
| 88 |
|-------|-----------|--------|
|
|
|
|
| 91 |
| Validation | 859 | ~19,605 |
|
| 92 |
| Test | 859 | 19,210 |
|
| 93 |
|
| 94 |
+
### 2.4 POS Tag Distribution (UDD-1 Test Set)
|
| 95 |
|
| 96 |
| Tag | Description | Count | Percentage |
|
| 97 |
|-----|-------------|-------|------------|
|
|
|
|
| 115 |
|
| 116 |
---
|
| 117 |
|
| 118 |
+
## 3. Pipeline Architecture
|
| 119 |
+
|
| 120 |
+
TRE-1 uses a sequential pipeline where each task feeds into the next:
|
| 121 |
+
|
| 122 |
+
```
|
| 123 |
+
Input text (raw Vietnamese)
|
| 124 |
+
|
|
| 125 |
+
v
|
| 126 |
+
+---------------------+
|
| 127 |
+
| Word Segmentation | CRF (BIO tagging) 98.01% word F1
|
| 128 |
+
| (syllable -> word) | 21 feature templates, ~1.1 MB model
|
| 129 |
+
+---------+-----------+
|
| 130 |
+
|
|
| 131 |
+
v
|
| 132 |
+
+---------------------+
|
| 133 |
+
| POS Tagging | CRF (27 features) 95.89% accuracy
|
| 134 |
+
| (word -> POS tag) | 27 feature templates, ~2.3 MB model
|
| 135 |
+
+---------+-----------+
|
| 136 |
+
|
|
| 137 |
+
v
|
| 138 |
+
+---------------------+
|
| 139 |
+
| Chunking | CRF (BIO tagging) [Planned]
|
| 140 |
+
| (word+POS -> chunk) | Features: POS + word
|
| 141 |
+
+---------+-----------+
|
| 142 |
+
|
|
| 143 |
+
v
|
| 144 |
+
+---------------------+
|
| 145 |
+
| Dependency Parsing | Transition/Graph-based [Planned]
|
| 146 |
+
| (word+POS -> tree) | Features: ~72 templates
|
| 147 |
+
+---------------------+
|
| 148 |
+
|
| 149 |
+
Total pipeline: < 20 MB, CPU-only, fast inference
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
This pipeline architecture is validated by Nguyen et al. (2017), who showed that a pipeline approach (separate word segmentation then POS tagging) produces better results than joint approaches for Vietnamese.
|
| 153 |
+
|
| 154 |
+
---
|
| 155 |
+
|
| 156 |
+
## 4. Task 1: Word Segmentation
|
| 157 |
+
|
| 158 |
+
### 4.1 Problem Definition
|
| 159 |
+
|
| 160 |
+
Vietnamese word segmentation identifies word boundaries in text where syllables are separated by spaces. For example:
|
| 161 |
+
|
| 162 |
+
- Input: `Thời hạn bảo hành sản phẩm`
|
| 163 |
+
- Output: `[Thời hạn] [bảo hành] [sản phẩm]` (3 compound words)
|
| 164 |
+
|
| 165 |
+
This is formulated as a syllable-level sequence labeling task using BIO tags:
|
| 166 |
+
- **B**: Beginning of a word (first syllable)
|
| 167 |
+
- **I**: Inside a word (continuation syllable)
|
| 168 |
+
|
| 169 |
+
### 4.2 Feature Engineering
|
| 170 |
+
|
| 171 |
+
The word segmentation model uses **20 feature templates** at the syllable level, organized into 7 groups (see Section 4.4 for ablation analysis):
|
| 172 |
+
|
| 173 |
+
#### G1: Form (2 templates)
|
| 174 |
+
```
|
| 175 |
+
S[0] - Syllable text
|
| 176 |
+
S[0].lower - Lowercase form
|
| 177 |
+
```
|
| 178 |
+
|
| 179 |
+
#### G2: Type (5 templates)
|
| 180 |
+
```
|
| 181 |
+
S[0].istitle - Is title case
|
| 182 |
+
S[0].isupper - Is uppercase
|
| 183 |
+
S[0].isdigit - Is digit
|
| 184 |
+
S[0].ispunct - Is punctuation
|
| 185 |
+
S[0].len - Syllable length
|
| 186 |
+
```
|
| 187 |
+
|
| 188 |
+
#### G3: Morphology (2 templates)
|
| 189 |
+
```
|
| 190 |
+
S[0].prefix2 - First 2 characters
|
| 191 |
+
S[0].suffix2 - Last 2 characters
|
| 192 |
+
```
|
| 193 |
+
|
| 194 |
+
#### G4: Left Context (4 templates)
|
| 195 |
+
```
|
| 196 |
+
S[-1], S[-1].lower - Previous syllable
|
| 197 |
+
S[-2], S[-2].lower - Syllable at -2
|
| 198 |
+
```
|
| 199 |
+
|
| 200 |
+
#### G5: Right Context (4 templates)
|
| 201 |
+
```
|
| 202 |
+
S[1], S[1].lower - Next syllable
|
| 203 |
+
S[2], S[2].lower - Syllable at +2
|
| 204 |
+
```
|
| 205 |
+
|
| 206 |
+
#### G6: Bigram (2 templates)
|
| 207 |
+
```
|
| 208 |
+
S[-1,0] - Bigram (previous, current)
|
| 209 |
+
S[0,1] - Bigram (current, next)
|
| 210 |
+
```
|
| 211 |
+
|
| 212 |
+
#### G7: Trigram (1 template)
|
| 213 |
+
```
|
| 214 |
+
S[-1,0,1] - Trigram (previous, current, next)
|
| 215 |
+
```
|
| 216 |
+
|
| 217 |
+
Boundary tokens (`__BOS__`, `__EOS__`) are used for sentence edges.
|
| 218 |
+
|
| 219 |
+
### 4.3 Results
|
| 220 |
+
|
| 221 |
+
#### On UDD-1
|
| 222 |
+
|
| 223 |
+
| Level | Metric | Score |
|
| 224 |
+
|-------|--------|-------|
|
| 225 |
+
| Syllable | Accuracy | 98.90% |
|
| 226 |
+
| Syllable | F1 (weighted) | 98.90% |
|
| 227 |
+
| Word | Precision | 98.02% |
|
| 228 |
+
| Word | Recall | 98.01% |
|
| 229 |
+
| Word | **F1** | **98.01%** |
|
| 230 |
+
|
| 231 |
+
#### On VLSP 2013
|
| 232 |
+
|
| 233 |
+
| Level | Metric | Score |
|
| 234 |
+
|-------|--------|-------|
|
| 235 |
+
| Syllable | Accuracy | 98.51% |
|
| 236 |
+
| Syllable | F1 (weighted) | 98.51% |
|
| 237 |
+
| Word | Precision | 96.64% |
|
| 238 |
+
| Word | Recall | 97.70% |
|
| 239 |
+
| Word | **F1** | **97.17%** |
|
| 240 |
+
|
| 241 |
+
Trained with `underthesea-core` (Rust CRF, L-BFGS) on 75,389 sentences (2.19M syllables). Training time: 6m 28s on CPU.
|
| 242 |
+
|
| 243 |
+
The lower performance on VLSP 2013 compared to UDD-1 is expected: the VLSP 2013 test set has significantly more multi-syllable words (42.3% vs ~25%) and longer sentences (45.5 vs ~29 avg syllables).
|
| 244 |
+
|
| 245 |
+
### 4.4 Feature Ablation Study (VLSP 2013)
|
| 246 |
+
|
| 247 |
+
To understand the contribution of each feature group, we conducted a systematic ablation study on VLSP 2013 using both leave-one-out and additive methodologies, following the approach of Nguyen et al. (2006) and UITws-v1 (Nguyen et al., 2019).
|
| 248 |
|
| 249 |
+
The 20 feature templates are organized into 7 functional groups:
|
| 250 |
+
|
| 251 |
+
| Group | Templates | Count | Description |
|
| 252 |
+
|-------|-----------|-------|-------------|
|
| 253 |
+
| G1: Form | S[0], S[0].lower | 2 | Core syllable identity |
|
| 254 |
+
| G2: Type | S[0].istitle, .isupper, .isdigit, .ispunct, .len | 5 | Orthographic properties |
|
| 255 |
+
| G3: Morphology | S[0].prefix2, S[0].suffix2 | 2 | Sub-word patterns |
|
| 256 |
+
| G4: Left context | S[-1], S[-1].lower, S[-2], S[-2].lower | 4 | Previous syllables |
|
| 257 |
+
| G5: Right context | S[1], S[1].lower, S[2], S[2].lower | 4 | Next syllables |
|
| 258 |
+
| G6: Bigram | S[-1,0], S[0,1] | 2 | Pairwise conjunctions |
|
| 259 |
+
| G7: Trigram | S[-1,0,1] | 1 | Three-way conjunction |
|
| 260 |
+
|
| 261 |
+
#### Leave-One-Out Results
|
| 262 |
+
|
| 263 |
+
Each row removes one group from the full model (20 templates, 97.17% word F1):
|
| 264 |
+
|
| 265 |
+
| Removed Group | Templates | Syl Acc | Word F1 | Delta |
|
| 266 |
+
|---------------|-----------|---------|---------|-------|
|
| 267 |
+
| *(none — full model)* | 20 | 98.52% | **97.17%** | — |
|
| 268 |
+
| G6: Bigram | 18 | 96.84% | 94.31% | **-2.86%** |
|
| 269 |
+
| G4: Left context | 16 | 97.83% | 95.96% | **-1.21%** |
|
| 270 |
+
| G5: Right context | 16 | 98.43% | 97.04% | -0.13% |
|
| 271 |
+
| G7: Trigram | 19 | 98.49% | 97.11% | -0.06% |
|
| 272 |
+
| G3: Morphology | 18 | 98.50% | 97.14% | -0.03% |
|
| 273 |
+
| G2: Type | 15 | 98.53% | 97.18% | +0.01% |
|
| 274 |
+
|
| 275 |
+
#### Additive Results
|
| 276 |
+
|
| 277 |
+
Starting from form-only and progressively adding groups:
|
| 278 |
+
|
| 279 |
+
| Configuration | Templates | Syl Acc | Word F1 | Delta |
|
| 280 |
+
|---------------|-----------|---------|---------|-------|
|
| 281 |
+
| G1: Form only | 2 | 83.56% | 73.88% | baseline |
|
| 282 |
+
| + G4: Left context | 6 | 95.60% | 92.15% | **+18.27%** |
|
| 283 |
+
| + G5: Right context | 10 | 95.85% | 92.51% | +0.36% |
|
| 284 |
+
| + G6: **Bigrams** | 12 | 98.44% | 97.01% | **+4.50%** |
|
| 285 |
+
| + G2: Type | 17 | 98.47% | 97.08% | +0.07% |
|
| 286 |
+
| + G3: Morphology | 19 | 98.49% | 97.11% | +0.03% |
|
| 287 |
+
| + G7: Trigram (full) | 20 | 98.52% | 97.17% | +0.06% |
|
| 288 |
+
|
| 289 |
+
#### Analysis
|
| 290 |
+
|
| 291 |
+
1. **Bigrams are the most critical feature group** (-2.86% when removed, +4.50% when added). Syllable co-occurrence patterns (S[-1,0] and S[0,1]) are essential for word boundary detection in Vietnamese, where multi-syllable compounds are delimited by spaces.
|
| 292 |
+
|
| 293 |
+
2. **Left context is the second most important** (-1.21% when removed, +18.27% from form-only baseline). Previous syllable identity strongly predicts whether the current syllable begins a new word or continues the previous one.
|
| 294 |
+
|
| 295 |
+
3. **Right context provides asymmetric value**: Adding right context after left yields only +0.36%, but removing it from the full model costs -0.13%. Left context is ~9x more important than right context, consistent with the sequential nature of BIO tagging where B/I decisions depend primarily on what came before.
|
| 296 |
+
|
| 297 |
+
4. **Type features (istitle, isupper, isdigit, ispunct, len) provide zero benefit** — removing all 5 templates actually improves F1 by 0.01%. These features may introduce noise for Vietnamese word segmentation where orthographic properties are less predictive of word boundaries than in languages with case-sensitive morphology.
|
| 298 |
+
|
| 299 |
+
5. **A minimal 12-template model** (form + context + bigrams) achieves 97.01% word F1, capturing 99.8% of the full model's performance. The remaining 8 templates contribute only +0.16%.
|
| 300 |
+
|
| 301 |
+
6. **Comparison with prior Vietnamese ablation studies**: Nguyen et al. (2006) found dictionary features contributed +3.49 F1 for Vietnamese WS — our bigram features provide a comparable +4.50% gain without requiring external dictionaries. UITws-v1 (Nguyen et al., 2019) reported +0.04% from their full feature combination over baseline, consistent with our finding that incremental improvements beyond core features are small.
|
| 302 |
+
|
| 303 |
+
### 4.5 Comparison with Prior Work
|
| 304 |
+
|
| 305 |
+
| Model | Dataset | F1 | Method | Neural? |
|
| 306 |
+
|-------|---------|-----|--------|---------|
|
| 307 |
+
| UITws-v1 | VLSP 2013 | 98.06% | SVM + ambiguity reduction | No |
|
| 308 |
+
| RDRsegmenter | VLSP 2013 | 97.90% | Rule-based decision trees | No |
|
| 309 |
+
| jPTDP-v2 | VLSP 2013 | 97.90% | Joint neural | Yes |
|
| 310 |
+
| **TRE-1 WS** | **VLSP 2013** | **97.17%** | **CRF (BIO)** | **No** |
|
| 311 |
+
| **TRE-1 WS** | **UDD-1** | **98.01%** | **CRF (BIO)** | **No** |
|
| 312 |
+
| JVnSegmenter | VLSP 2013 | 97.06% | CRF + SVM | No |
|
| 313 |
+
|
| 314 |
+
**Note**: On the standard VLSP 2013 benchmark, TRE-1 achieves 97.17% word F1, surpassing JVnSegmenter (97.06%) but trailing UITws-v1 (98.06%) by 0.9%. On UDD-1, TRE-1 achieves 98.01% word F1.
|
| 315 |
+
|
| 316 |
+
---
|
| 317 |
+
|
| 318 |
+
## 5. Task 2: POS Tagging
|
| 319 |
+
|
| 320 |
+
### 5.1 Model Architecture
|
| 321 |
|
| 322 |
**Algorithm**: Conditional Random Fields (CRF)
|
| 323 |
|
|
|
|
| 331 |
- $\lambda_k$ are learned weights
|
| 332 |
- $Z(X)$ is the partition function
|
| 333 |
|
| 334 |
+
### 5.2 Feature Engineering
|
| 335 |
|
| 336 |
+
The POS tagger uses **27 feature templates** inspired by the underthesea NLP library:
|
| 337 |
|
| 338 |
#### Current Token Features (10)
|
| 339 |
```
|
|
|
|
| 370 |
T[0,1].is_in_dict - Bigram in dictionary
|
| 371 |
```
|
| 372 |
|
| 373 |
+
### 5.3 Results
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 374 |
|
| 375 |
+
#### Overall Performance
|
| 376 |
|
| 377 |
| Metric | Score |
|
| 378 |
|--------|-------|
|
|
|
|
| 382 |
| **F1 (macro)** | 92.71% |
|
| 383 |
| **F1 (weighted)** | 95.87% |
|
| 384 |
|
| 385 |
+
#### Per-Tag Performance
|
| 386 |
|
| 387 |
| Tag | Precision | Recall | F1-Score | Support |
|
| 388 |
|-----|-----------|--------|----------|---------|
|
|
|
|
| 402 |
| X | 0.7778 | 0.8400 | 0.8077 | 25 |
|
| 403 |
| PART | 0.8750 | 0.6364 | 0.7368 | 22 |
|
| 404 |
|
| 405 |
+
### 5.4 Confusion Matrix
|
| 406 |
|
| 407 |

|
| 408 |
|
| 409 |
+
### 5.5 Per-Tag Metrics Visualization
|
| 410 |
|
| 411 |

|
| 412 |
|
| 413 |
+
### 5.6 Comparison with Prior Work
|
| 414 |
+
|
| 415 |
+
| Model | Dataset | Accuracy | Method | Neural? |
|
| 416 |
+
|-------|----------|--------|--------|---------|
|
| 417 |
+
| ViDeBERTa-large | VLSP 2013 | 97.2% | DeBERTaV3 | Yes |
|
| 418 |
+
| PhoBERT-large | VLSP 2013 | 96.8% | RoBERTa | Yes |
|
| 419 |
+
| vELECTRA | VLSP 2013 | 96.77% | ELECTRA | Yes |
|
| 420 |
+
| PhoNLP | VLSP 2013 | 96.76% | PhoBERT + MTL | Yes |
|
| 421 |
+
| VnMarMoT | VLSP 2013 | 95.88% | CRF (MarMoT) | No |
|
| 422 |
+
| **TRE-1** | **UDD-1** | **95.89%** | **CRF** | **No** |
|
| 423 |
+
| RDRPOSTagger | VLSP 2013 | 95.11% | Rules (RDR) | No |
|
| 424 |
+
|
| 425 |
+
**Note**: TRE-1 is evaluated on UDD-1, not VLSP 2013. Our accuracy (95.89%) is competitive with VnMarMoT (95.88%), the best CRF-based system on VLSP 2013.
|
| 426 |
+
|
| 427 |
+
---
|
| 428 |
+
|
| 429 |
+
## 6. Task 3: Chunking (Planned)
|
| 430 |
+
|
| 431 |
+
### 6.1 Approach
|
| 432 |
+
|
| 433 |
+
Chunking (shallow parsing) identifies non-overlapping phrase boundaries such as noun phrases (NP), verb phrases (VP), and prepositional phrases (PP). TRE-1 will use CRF with BIO tagging, following the approach validated on English CoNLL-2000 (Sha & Pereira, 2003) and adapted for Vietnamese (Nguyen et al., 2009).
|
| 434 |
+
|
| 435 |
+
### 6.2 Planned Feature Templates
|
| 436 |
+
|
| 437 |
+
| Feature | Description | Source |
|
| 438 |
+
|---------|-------------|--------|
|
| 439 |
+
| POS tag (current, +-2) | From upstream TRE-1 POS model | Essential for chunking |
|
| 440 |
+
| Word form | Current and context words | Standard |
|
| 441 |
+
| Lowercase | Normalized word forms | Standard |
|
| 442 |
+
| Prefix/suffix | Character-level features | Helpful |
|
| 443 |
+
| Bigrams (POS) | POS tag n-grams | Helpful |
|
| 444 |
+
| Case type | Title case, uppercase | Sometimes useful |
|
| 445 |
+
|
| 446 |
+
POS tags are the most important features for chunking. The TRE-1 POS tagger (95.89% accuracy) provides high-quality POS features for downstream chunking.
|
| 447 |
+
|
| 448 |
+
### 6.3 Reference Benchmarks
|
| 449 |
+
|
| 450 |
+
#### English CoNLL-2000 (Reference)
|
| 451 |
+
|
| 452 |
+
| Model | Year | F1 | Method | Neural? |
|
| 453 |
+
|-------|------|----|--------|---------|
|
| 454 |
+
| SS05 (HMM+voting) | 2005 | 95.23% | Specialized HMM | No |
|
| 455 |
+
| CRF (Sha & Pereira) | 2003 | 94.30% | CRF | No |
|
| 456 |
+
| BiLSTM-CRF | 2015 | 94.46% | Neural + CRF | Yes |
|
| 457 |
+
| SVM (Kudo & Matsumoto) | 2001 | 93.91% | SVM ensemble | No |
|
| 458 |
+
|
| 459 |
+
#### Vietnamese Chunking
|
| 460 |
+
|
| 461 |
+
| Model | Year | F1 | Method | Neural? |
|
| 462 |
+
|-------|------|----|--------|---------|
|
| 463 |
+
| Lai et al. (NP only) | 2019 | 88.40% | BiLSTM-CRF + rules | Yes |
|
| 464 |
+
| Nguyen et al. (NP) | 2009 | -- | CRF/MaxEnt/SVM | No |
|
| 465 |
+
|
| 466 |
+
**Observation**: Non-neural methods dominate English chunking. CRF (94.30%) is within 0.16% of BiLSTM-CRF (94.46%). Vietnamese chunking is under-researched, with limited benchmarks.
|
| 467 |
+
|
| 468 |
+
---
|
| 469 |
+
|
| 470 |
+
## 7. Task 4: Dependency Parsing (Planned)
|
| 471 |
+
|
| 472 |
+
### 7.1 Approach
|
| 473 |
+
|
| 474 |
+
Dependency parsing identifies syntactic head-dependent relationships between words. Two non-neural paradigms are considered:
|
| 475 |
+
|
| 476 |
+
| Paradigm | Algorithm | Complexity | CPU | Example |
|
| 477 |
+
|----------|-----------|-----------|-----|---------|
|
| 478 |
+
| **Transition-based** | Arc-standard/eager | O(n) | Yes | MaltParser |
|
| 479 |
+
| **Graph-based** | MST (Chu-Liu-Edmonds) | O(n^2) | Yes | MSTParser |
|
| 480 |
+
|
| 481 |
+
Zhang & Nivre (2011) demonstrated that rich feature engineering (72 templates) achieves 92.9% UAS on English Penn Treebank with transition-based parsing -- only ~2% behind neural methods of that era.
|
| 482 |
+
|
| 483 |
+
### 7.2 Planned Feature Templates (based on Zhang & Nivre 2011)
|
| 484 |
+
|
| 485 |
+
| Feature Category | Count | Description |
|
| 486 |
+
|-----------------|-------|-------------|
|
| 487 |
+
| Stack/buffer word | ~10 | Word forms at stack top, buffer front |
|
| 488 |
+
| Stack/buffer POS | ~10 | POS tags at stack/buffer positions |
|
| 489 |
+
| Distance | ~3 | Number of tokens between head/dependent |
|
| 490 |
+
| Direction | ~3 | Left/right arc features |
|
| 491 |
+
| Valency | ~6 | Count of left/right dependents |
|
| 492 |
+
| Grandparent | ~8 | Features of head's head |
|
| 493 |
+
| Sibling | ~8 | Features of adjacent dependents |
|
| 494 |
+
| Trigram | ~12 | Head + dependent + sibling/grandparent |
|
| 495 |
+
| **Total** | **~72** | Rich non-local feature templates |
|
| 496 |
+
|
| 497 |
+
### 7.3 Reference Benchmarks
|
| 498 |
+
|
| 499 |
+
#### Vietnamese Dependency Parsing (VnDT v1.1)
|
| 500 |
+
|
| 501 |
+
| Model | Year | UAS | LAS | Method | Neural? |
|
| 502 |
+
|-------|------|-----|-----|--------|---------|
|
| 503 |
+
| PhoNLP | 2021 | 85.47 | 79.11 | PhoBERT + MTL | Yes |
|
| 504 |
+
| PhoBERT-base | 2020 | 85.22 | 78.77 | Fine-tuned biaffine | Yes |
|
| 505 |
+
| VnCoreNLP | 2018 | 77.35 | 71.38 | Hybrid | Partial |
|
| 506 |
+
| MSTParser | 2015 | 76.58 | 70.10 | Graph-based | **No** |
|
| 507 |
+
| MaltParser | 2015 | 76.08 | 69.88 | Transition-based | **No** |
|
| 508 |
+
|
| 509 |
+
#### Non-Neural Parsing (English Penn Treebank, reference)
|
| 510 |
+
|
| 511 |
+
| Model | Year | UAS | Method |
|
| 512 |
+
|-------|------|-----|--------|
|
| 513 |
+
| Zhang & Nivre | 2011 | 92.9% | Transition + 72 features |
|
| 514 |
+
| MSTParser 2nd-order | 2006 | 91.5% | Graph-based |
|
| 515 |
+
| MaltParser | 2006 | 90.1% | Transition + SVM |
|
| 516 |
+
|
| 517 |
+
**Observation**: Dependency parsing has the largest non-neural vs neural gap (~9% UAS on Vietnamese). Rich feature engineering (Zhang & Nivre 2011) narrows this gap significantly on English, suggesting room for improvement on Vietnamese with better features.
|
| 518 |
+
|
| 519 |
---
|
| 520 |
|
| 521 |
+
## 8. Training Configuration
|
| 522 |
+
|
| 523 |
+
### 8.1 Shared Parameters
|
| 524 |
|
| 525 |
+
All CRF models use the same training configuration:
|
| 526 |
+
|
| 527 |
+
| Parameter | Value | Description |
|
| 528 |
+
|-----------|-------|-------------|
|
| 529 |
+
| Algorithm | lbfgs | Limited-memory BFGS optimization |
|
| 530 |
+
| c1 | 1.0 | L1 regularization coefficient |
|
| 531 |
+
| c2 | 0.001 | L2 regularization coefficient |
|
| 532 |
+
| max_iterations | 100 | Maximum training iterations |
|
| 533 |
+
| feature.possible_transitions | True | Include all possible transitions |
|
| 534 |
+
|
| 535 |
+
### 8.2 Trainer Backends
|
| 536 |
+
|
| 537 |
+
TRE-1 supports three interchangeable CRF trainer backends:
|
| 538 |
+
|
| 539 |
+
| Backend | Language | Description |
|
| 540 |
+
|---------|----------|-------------|
|
| 541 |
+
| python-crfsuite | Python/C | Original Python bindings to CRFsuite |
|
| 542 |
+
| crfsuite-rs | Rust | Rust bindings to CRFsuite (pip install crfsuite) |
|
| 543 |
+
| underthesea-core | Rust | Underthesea's native Rust CRF with L-BFGS |
|
| 544 |
+
|
| 545 |
+
### 8.3 Implementation
|
| 546 |
+
|
| 547 |
+
**Libraries Used**:
|
| 548 |
+
- `python-crfsuite` (0.9.11) - CRF implementation
|
| 549 |
+
- `scikit-learn` (1.6.1) - Evaluation metrics
|
| 550 |
+
- `datasets` (4.5.0) - Data loading from Hugging Face
|
| 551 |
+
- `click` (8.0+) - CLI interface
|
| 552 |
+
- `underthesea` (6.8+) - Syllable tokenization
|
| 553 |
+
|
| 554 |
+
**Code Structure**:
|
| 555 |
+
```
|
| 556 |
+
tre-1/
|
| 557 |
+
+-- handler.py # Inference handler (Hugging Face endpoint)
|
| 558 |
+
+-- pos_tagger.crfsuite # Legacy POS model (for HF deployment)
|
| 559 |
+
+-- configs/
|
| 560 |
+
| +-- pos_tagger.yaml # POS training configuration
|
| 561 |
+
| +-- word_segmentation.yaml # WS training configuration
|
| 562 |
+
+-- models/
|
| 563 |
+
| +-- pos_tagger/{version}/ # Versioned POS models
|
| 564 |
+
| +-- word_segmentation/{version}/ # Versioned WS models
|
| 565 |
+
+-- scripts/
|
| 566 |
+
| +-- train.py # POS training script
|
| 567 |
+
| +-- train_word_segmentation.py # WS training script
|
| 568 |
+
| +-- evaluate.py # Evaluation with metrics & plots
|
| 569 |
+
| +-- predict.py # POS inference CLI
|
| 570 |
+
| +-- predict_word_segmentation.py # WS inference CLI
|
| 571 |
+
+-- results/
|
| 572 |
+
| +-- pos_tagger/ # POS evaluation outputs
|
| 573 |
+
| +-- word_segmentation/ # WS evaluation outputs
|
| 574 |
+
+-- references/ # Research papers and literature review
|
| 575 |
+
```
|
| 576 |
+
|
| 577 |
+
---
|
| 578 |
+
|
| 579 |
+
## 9. Error Analysis
|
| 580 |
+
|
| 581 |
+
### 9.1 POS Tagging Errors
|
| 582 |
|
| 583 |
| Error Type | True Label | Predicted | Count | Example |
|
| 584 |
|------------|------------|-----------|-------|---------|
|
| 585 |
+
| VERB -> NOUN | VERB | NOUN | 131 | "nửa tiếng" |
|
| 586 |
+
| NOUN -> VERB | NOUN | VERB | 96 | "hòa" |
|
| 587 |
+
| DET -> NOUN | DET | NOUN | 57 | "thời điểm" |
|
| 588 |
+
| NOUN -> DET | NOUN | DET | 34 | "Đại biểu" |
|
| 589 |
+
| VERB -> ADP | VERB | ADP | 32 | "Đến" |
|
| 590 |
+
| NUM -> NOUN | NUM | NOUN | 27 | "năm" |
|
| 591 |
+
| ADJ -> VERB | ADJ | VERB | 25 | "nhân đạo" |
|
| 592 |
+
| ADP -> VERB | ADP | VERB | 22 | "Vi phạm pháp luật" |
|
| 593 |
+
| ADV -> VERB | ADV | VERB | 22 | "cam kết" |
|
| 594 |
+
| ADJ -> NOUN | ADJ | NOUN | 21 | "dân sự" |
|
| 595 |
+
|
| 596 |
+
### 9.2 Error Causes
|
| 597 |
+
|
| 598 |
+
1. **Lexical Ambiguity**: Many Vietnamese words function as multiple parts of speech (e.g., "năm" can be NUM "five" or NOUN "year")
|
| 599 |
2. **Compound Words**: Multi-word expressions may be incorrectly segmented
|
| 600 |
+
3. **Context Limitation**: CRF window size (+-2 tokens) may miss long-range dependencies
|
| 601 |
4. **Domain Variation**: Legal and news domains have different vocabulary distributions
|
| 602 |
|
| 603 |
+
### 9.3 Error Propagation in Pipeline
|
| 604 |
+
|
| 605 |
+
Word segmentation errors propagate downstream. A segmentation error (e.g., splitting "bảo hành" into two words) causes cascading POS errors and would affect chunking and parsing. TRE-1 WS achieves 98.01% word F1, limiting this propagation effect.
|
| 606 |
+
|
| 607 |
---
|
| 608 |
|
| 609 |
+
## 10. Cross-Task Analysis: Non-Neural vs Neural Gap
|
| 610 |
+
|
| 611 |
+
| Task | Best Non-Neural | Best Neural | Gap | CPU Viability |
|
| 612 |
+
|------|----------------|-------------|-----|---------------|
|
| 613 |
+
| Word Segmentation | 98.06% F1 (SVM) | 97.90% F1 (jPTDP) | **+0.16%** (TRE-1: 97.17%) | Excellent |
|
| 614 |
+
| POS Tagging | 95.88% acc (CRF) | 97.2% acc (DeBERTa) | -1.32% | Good |
|
| 615 |
+
| Chunking (English) | 95.23% F1 (HMM) | 94.46% F1 (BiLSTM) | **+0.77%** | Excellent |
|
| 616 |
+
| Dep Parsing (Vietnamese) | 76.58% UAS (MST) | 85.47% UAS (PhoBERT) | -8.89% | Moderate |
|
| 617 |
+
|
| 618 |
+
**Key insight**: For 3 of 4 tasks, non-neural methods are within ~1.3% or better than neural methods. Dependency parsing is the exception with a ~9% gap, making it the primary challenge for TRE-1.
|
| 619 |
+
|
| 620 |
+
### CPU Inference Efficiency
|
| 621 |
|
| 622 |
+
| Method | Model Size | Inference | GPU | Tasks |
|
| 623 |
+
|--------|-----------|-----------|-----|-------|
|
| 624 |
+
| CRF (python-crfsuite) | 1-3 MB | Very fast | No | WS, POS, Chunk |
|
| 625 |
+
| MaltParser | ~10 MB | Fast O(n) | No | DP |
|
| 626 |
+
| MSTParser | ~10 MB | Fast O(n^2) | No | DP |
|
| 627 |
+
| PhoBERT-base | ~500 MB | Slow | Required | All |
|
| 628 |
+
| ViDeBERTa-large | ~1.2 GB | Very slow | Required | All |
|
| 629 |
+
|
| 630 |
+
---
|
| 631 |
+
|
| 632 |
+
## 11. Deployment
|
| 633 |
+
|
| 634 |
+
### 11.1 Hugging Face Model Hub
|
| 635 |
|
| 636 |
**Model URL**: [https://huggingface.co/undertheseanlp/tre-1](https://huggingface.co/undertheseanlp/tre-1)
|
| 637 |
|
| 638 |
**Files Deployed**:
|
| 639 |
| File | Size | Description |
|
| 640 |
|------|------|-------------|
|
| 641 |
+
| `pos_tagger.crfsuite` | 2.3 MB | Trained CRF POS model |
|
| 642 |
| `handler.py` | 4.5 KB | Custom inference handler |
|
| 643 |
| `requirements.txt` | 28 B | Python dependencies |
|
| 644 |
| `README.md` | 2.5 KB | Model card |
|
| 645 |
|
| 646 |
+
### 11.2 Usage
|
| 647 |
|
| 648 |
#### Python (Local)
|
| 649 |
|
| 650 |
```python
|
| 651 |
+
from handler import EndpointHandler
|
| 652 |
+
handler = EndpointHandler(path="models/pos_tagger/20260131_000000")
|
| 653 |
+
result = handler({"inputs": "Tôi yêu Việt Nam"})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 654 |
```
|
| 655 |
|
| 656 |
#### Inference API
|
|
|
|
| 669 |
print(response.json())
|
| 670 |
```
|
| 671 |
|
| 672 |
+
### 11.3 Example Predictions
|
| 673 |
|
| 674 |
+
**POS Tagging:**
|
| 675 |
| Input | Output |
|
| 676 |
|-------|--------|
|
| 677 |
| "Tôi yêu Việt Nam" | Tôi/PRON yêu/VERB Việt/PROPN Nam/PUNCT |
|
|
|
|
| 682 |
|
| 683 |
---
|
| 684 |
|
| 685 |
+
## 12. Related Work
|
| 686 |
|
| 687 |
+
### 12.1 Conditional Random Fields
|
| 688 |
|
| 689 |
+
Conditional Random Fields (CRF), introduced by Lafferty et al. (2001), are discriminative probabilistic models for sequence labeling. Unlike generative models such as HMMs, CRFs model the conditional probability $P(Y|X)$ directly, allowing rich, overlapping features without independence assumptions. CRFs address the *label bias problem* inherent in MEMMs through global normalization. TRE-1 uses python-crfsuite with L-BFGS optimization, following the standard framework described in Sutton & McCallum (2012).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 690 |
|
| 691 |
+
### 12.2 Vietnamese Word Segmentation
|
| 692 |
|
| 693 |
+
Nguyen et al. (2006) established the CRF approach for Vietnamese word segmentation using syllable-level features. UITws-v1 (Nguyen et al., 2019) achieved the current SOTA (98.06% F1 on VLSP 2013) using SVM with ambiguity reduction and suffix features. RDRsegmenter (Vu et al., 2018) achieves 97.90% with rule-based decision trees. TRE-1 follows the CRF BIO tagging approach of Nguyen et al. (2006), achieving 98.01% word F1 on UDD-1.
|
| 694 |
|
| 695 |
+
### 12.3 Vietnamese POS Tagging
|
| 696 |
|
| 697 |
+
**VnCoreNLP** (Vu et al., 2018) provides a CRF-based POS tagger (VnMarMoT) achieving 95.88% on VLSP 2013. **RDRPOSTagger** (Nguyen et al., 2014) uses Ripple Down Rules for 95.11% accuracy. TRE-1 matches VnMarMoT with 95.89% on UDD-1.
|
| 698 |
|
| 699 |
+
### 12.4 Neural Sequence Labeling
|
| 700 |
|
| 701 |
+
The BiLSTM-CRF architecture (Huang et al., 2015; Lample et al., 2016; Ma & Hovy, 2016) combines bidirectional LSTMs with a CRF output layer. For Vietnamese, neural approaches without pre-trained language models (93.52%; Nguyen et al., 2018) underperform CRF with handcrafted features (95.88%), suggesting that feature engineering remains valuable for Vietnamese.
|
| 702 |
|
| 703 |
+
### 12.5 Pre-trained Language Models
|
| 704 |
|
| 705 |
+
**PhoBERT** (Nguyen & Nguyen, 2020) achieves 96.8% on VLSP 2013 POS tagging with RoBERTa architecture. **PhoNLP** (Nguyen & Nguyen, 2021) extends PhoBERT with multi-task learning for 96.76% POS accuracy and 85.47% UAS dependency parsing. **ViDeBERTa** (Tran et al., 2023) achieves the current SOTA of 97.2% POS accuracy with DeBERTaV3 architecture, using only 23% of PhoBERT-large's parameters (86M vs 370M).
|
| 706 |
|
| 707 |
+
### 12.6 Chunking
|
| 708 |
|
| 709 |
+
Sha & Pereira (2003) demonstrated CRF effectiveness for chunking on CoNLL-2000 (94.30% F1). For Vietnamese, Nguyen et al. (2009) applied CRF/MaxEnt/SVM to noun phrase chunking, establishing the CRF approach. Lai et al. (2019) achieved 88.40% F1 with BiLSTM-CRF and grammar rules. Vietnamese chunking remains under-researched compared to English.
|
| 710 |
|
| 711 |
+
### 12.7 Dependency Parsing
|
| 712 |
|
| 713 |
+
McDonald et al. (2005) formalized graph-based parsing as maximum spanning tree search, implemented in MSTParser. Nivre (2008) established transition-based parsing with O(n) complexity, implemented in MaltParser. Zhang & Nivre (2011) achieved 92.9% UAS on English with 72 rich feature templates. For Vietnamese, Nguyen & Nguyen (2015) evaluated MSTParser (76.58% UAS) and MaltParser (76.08% UAS) on VnDT. Qian & Liu (2017) demonstrated a complete non-DNN pipeline using CRF + graph-based parsing across 49 UD languages.
|
| 714 |
|
| 715 |
+
### 12.8 CRF Effectiveness for Low-Resource Languages
|
| 716 |
|
| 717 |
+
Recent studies (2024-2025) confirm CRF effectiveness: Burmese CRF achieves 98.18% vs BiLSTM-CRF 97.85% (Thant et al., 2025); Uzbek CRF outperforms HMM by 6 points (Jamoldinova et al., 2025); Amazigh CRF outperforms all other methods (Amri et al., 2024). Darwish et al. (2017) showed feature-engineered SVM matches neural methods for Arabic POS tagging, arguing "don't abandon feature engineering just yet."
|
| 718 |
|
| 719 |
+
### 12.9 Summary
|
| 720 |
|
| 721 |
+
| Approach | Representative | Acc/F1 | Params | GPU |
|
| 722 |
+
|----------|---------------|--------|--------|-----|
|
| 723 |
+
| Rules | RDRPOSTagger | 95.11% | - | No |
|
| 724 |
+
| CRF | VnMarMoT, TRE-1 | 95.88-89% | 1-3 MB | No |
|
| 725 |
+
| BiLSTM-CRF | Nguyen et al. | 93.52% | ~10M | Yes |
|
| 726 |
+
| Transformer | ViDeBERTa-large | 97.2% | 304M | Yes |
|
| 727 |
+
| Multi-task | PhoNLP | 96.76% | 135M+ | Yes |
|
| 728 |
|
| 729 |
+
CRF-based methods remain competitive when combined with well-designed feature templates, offering a practical alternative for CPU-constrained deployment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 730 |
|
| 731 |
---
|
| 732 |
|
| 733 |
+
## 13. Limitations
|
| 734 |
|
| 735 |
+
1. **Tokenization Required**: POS tagger expects pre-tokenized input (whitespace-separated). Compound words must be joined with underscores.
|
|
|
|
|
|
|
| 736 |
|
| 737 |
2. **Machine-Annotated Data**: UDD-1 annotations are machine-generated using the Underthesea toolkit, which may introduce systematic annotation errors.
|
| 738 |
|
| 739 |
3. **Domain Coverage**: Trained primarily on legal documents and news. Performance on social media, conversational, or literary text is unknown.
|
| 740 |
|
| 741 |
+
4. **Rare POS Tags**: PART (0.11%) and X (0.13%) tags have limited training samples, leading to lower F1 scores (0.74 and 0.81 respectively).
|
| 742 |
+
|
| 743 |
+
5. **No Standard Benchmark**: Evaluation on UDD-1 (not VLSP 2013) limits direct comparison with prior Vietnamese NLP systems.
|
| 744 |
+
|
| 745 |
+
6. **Dependency Parsing Gap**: Non-neural methods trail neural by ~9% UAS on Vietnamese dependency parsing, the largest gap among the four tasks.
|
| 746 |
|
| 747 |
+
7. **Vietnamese Chunking Data**: Very limited annotated corpora for Vietnamese chunking makes evaluation difficult.
|
| 748 |
|
| 749 |
---
|
| 750 |
|
| 751 |
+
## 14. Future Work
|
| 752 |
|
| 753 |
+
### 14.1 Implemented Tasks
|
| 754 |
+
1. **VLSP 2013 POS Evaluation**: Evaluate POS tagging on the standard VLSP 2013 benchmark for direct comparison (WS evaluation completed: 97.17% word F1)
|
| 755 |
2. **Manual Annotation Verification**: Sample-based quality assessment of UDD-1 annotations
|
| 756 |
3. **Multi-domain Training**: Include social media, conversational, and literary data
|
| 757 |
+
|
| 758 |
+
### 14.2 Chunking (Next)
|
| 759 |
+
4. **CRF Chunking Model**: Implement BIO-tagged chunking using POS features from upstream TRE-1 POS model, following Sha & Pereira (2003) and Nguyen et al. (2009)
|
| 760 |
+
5. **Vietnamese Chunking Evaluation**: Evaluate on available Vietnamese NP chunking datasets
|
| 761 |
+
|
| 762 |
+
### 14.3 Dependency Parsing
|
| 763 |
+
6. **Non-Neural Parser**: Implement transition-based or graph-based dependency parsing with rich feature templates (Zhang & Nivre 2011)
|
| 764 |
+
7. **Feature Engineering**: Adapt the 72 feature templates of Zhang & Nivre (2011) for Vietnamese, using POS tags from upstream TRE-1 model
|
| 765 |
+
8. **VnDT Evaluation**: Target matching MSTParser (76.58% UAS) and MaltParser (76.08% UAS) baselines with improved features
|
| 766 |
+
|
| 767 |
+
### 14.4 Pipeline Integration
|
| 768 |
+
9. **End-to-End Pipeline**: Integrate all four tasks into a single inference pipeline
|
| 769 |
+
10. **Error Propagation Study**: Measure how upstream errors (WS, POS) affect downstream tasks (chunking, parsing)
|
| 770 |
|
| 771 |
---
|
| 772 |
|
| 773 |
+
## 15. Experiment Tracking
|
| 774 |
|
| 775 |
All experiments are logged to Weights & Biases:
|
| 776 |
|
| 777 |
+
- **POS Tagger**: [pos-tagger-vietnamese](https://wandb.ai/rain1024/pos-tagger-vietnamese)
|
| 778 |
+
- **Word Segmentation**: word-segmentation-vietnamese
|
| 779 |
+
- **Datasets**: UDD-1 (20,000 sentences), VLSP 2013 WTK (75,389 sentences)
|
| 780 |
|
| 781 |
---
|
| 782 |
|
| 783 |
+
## 16. Reproducibility
|
| 784 |
|
| 785 |
### Environment
|
| 786 |
|
|
|
|
| 791 |
|
| 792 |
### Dependencies
|
| 793 |
|
| 794 |
+
Scripts use PEP 723 inline metadata -- no separate requirements file needed for training/evaluation.
|
| 795 |
|
| 796 |
```
|
| 797 |
python-crfsuite>=0.9.11
|
|
|
|
| 800 |
matplotlib>=3.5.0
|
| 801 |
seaborn>=0.12.0
|
| 802 |
click>=8.0.0
|
| 803 |
+
underthesea>=6.8.0
|
| 804 |
```
|
| 805 |
|
| 806 |
+
### Training Commands
|
| 807 |
|
| 808 |
```bash
|
| 809 |
+
# Word Segmentation (UDD-1)
|
| 810 |
+
uv run scripts/train_word_segmentation.py
|
| 811 |
+
uv run scripts/train_word_segmentation.py --trainer crfsuite-rs
|
| 812 |
|
| 813 |
+
# Word Segmentation (VLSP 2013)
|
| 814 |
+
uv run scripts/train_word_segmentation.py --dataset VLSP-2013 --trainer underthesea-core
|
| 815 |
+
uv run scripts/train_word_segmentation.py --dataset VLSP-2013 --version my_experiment
|
| 816 |
|
| 817 |
+
# POS Tagger
|
| 818 |
+
uv run scripts/train.py
|
| 819 |
+
uv run scripts/train.py --c1 0.5 --c2 0.01 --max-iterations 200
|
| 820 |
uv run scripts/train.py --wandb
|
| 821 |
```
|
| 822 |
|
| 823 |
+
### Evaluation Commands
|
| 824 |
|
| 825 |
```bash
|
| 826 |
+
# POS Tagger evaluation with plots
|
| 827 |
+
uv run scripts/evaluate.py --save-plots
|
| 828 |
|
| 829 |
+
# Specific version
|
| 830 |
+
uv run scripts/evaluate.py --version 20260131_000000
|
| 831 |
```
|
| 832 |
|
| 833 |
+
### Inference Commands
|
| 834 |
|
| 835 |
```bash
|
| 836 |
+
# Word Segmentation
|
| 837 |
+
uv run scripts/predict_word_segmentation.py "Tôi yêu Việt Nam"
|
| 838 |
|
| 839 |
+
# POS Tagging
|
| 840 |
+
uv run scripts/predict.py "Tôi yêu Việt Nam"
|
| 841 |
uv run scripts/predict.py --format json "Hà Nội là thủ đô"
|
| 842 |
```
|
| 843 |
|
| 844 |
+
---
|
| 845 |
|
| 846 |
+
## 17. Conclusion
|
|
|
|
|
|
|
|
|
|
| 847 |
|
| 848 |
+
TRE-1 is a Vietnamese NLP pipeline using CRF and non-neural methods designed for CPU inference. The implemented components achieve competitive results:
|
| 849 |
|
| 850 |
+
- **Word Segmentation**: 98.01% word F1 on UDD-1; 97.17% word F1 on VLSP 2013 (within 0.9% of non-neural SOTA)
|
| 851 |
+
- **POS Tagging**: 95.89% accuracy (matching the best CRF-based Vietnamese tagger)
|
| 852 |
|
| 853 |
+
The pipeline architecture (WS -> POS -> Chunk -> DP) is validated by prior work and designed for modularity, interpretability, and efficiency. Chunking and dependency parsing are planned as next steps, with CRF for chunking and transition/graph-based methods for parsing.
|
| 854 |
|
| 855 |
+
Our work demonstrates that CRF-based methods remain a practical and competitive alternative to deep learning for Vietnamese NLP, particularly when computational resources are limited. For 3 of 4 tasks (word segmentation, POS tagging, chunking), non-neural methods match or exceed neural approaches. Dependency parsing presents the largest challenge, with a ~9% gap that rich feature engineering may partially close.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 856 |
|
| 857 |
+
All models and code are publicly available at [undertheseanlp/tre-1](https://huggingface.co/undertheseanlp/tre-1).
|
| 858 |
|
| 859 |
---
|
| 860 |
|
| 861 |
## References
|
| 862 |
|
| 863 |
+
1. Lafferty, J., McCallum, A., & Pereira, F. (2001). Conditional Random Fields: Probabilistic Models for Segmenting and Labeling Sequence Data. *ICML*, 282-289.
|
| 864 |
+
|
| 865 |
+
2. Kudo, T., & Matsumoto, Y. (2001). Chunking with Support Vector Machines. *NAACL*.
|
| 866 |
+
|
| 867 |
+
3. Sha, F., & Pereira, F. (2003). Shallow Parsing with Conditional Random Fields. *HLT-NAACL*, 134-141.
|
| 868 |
+
|
| 869 |
+
4. McDonald, R., Pereira, F., Ribarov, K., & Hajic, J. (2005). Non-Projective Dependency Parsing using Spanning Tree Algorithms. *HLT-EMNLP*, 523-530.
|
| 870 |
+
|
| 871 |
+
5. McDonald, R., & Pereira, F. (2006). Online Learning of Approximate Dependency Parsing Algorithms. *EACL*, 81-88.
|
| 872 |
|
| 873 |
+
6. Nguyen, C.-T., Nguyen, T., Phan, X.-H., Nguyen, L.-M., & Ha, Q.-T. (2006). Vietnamese Word Segmentation with CRFs and SVMs: An Investigation. *PACLIC*, 215-222.
|
| 874 |
|
| 875 |
+
7. Nivre, J. (2008). Algorithms for Deterministic Incremental Dependency Parsing. *Computational Linguistics*, 34(4), 513-553.
|
| 876 |
|
| 877 |
+
8. Nguyen, L. M., Nguyen, H. T., Nguyen, P. T., Ho, T. B., & Shimazu, A. (2009). Vietnamese Chunking with Discriminative Sequence Models. *ALR7 Workshop, ACL-IJCNLP*.
|
| 878 |
|
| 879 |
+
9. Zhang, Y., & Nivre, J. (2011). Transition-based Dependency Parsing with Rich Non-local Features. *ACL*, 188-193.
|
| 880 |
|
| 881 |
+
10. Sutton, C., & McCallum, A. (2012). An Introduction to Conditional Random Fields. *Foundations and Trends in Machine Learning*, 4(4), 267-373.
|
| 882 |
|
| 883 |
+
11. Nguyen, D. Q., Nguyen, D. Q., Pham, D. D., & Pham, S. B. (2014). RDRPOSTagger: A Ripple Down Rules-based Part-Of-Speech Tagger. *EACL Demonstrations*, 17-20.
|
| 884 |
|
| 885 |
+
12. Nguyen, K. V., & Nguyen, N. L.-T. (2015). Error Analysis for Vietnamese Dependency Parsing. *KSE*, 282-291.
|
| 886 |
|
| 887 |
+
13. Huang, Z., Xu, W., & Yu, K. (2015). Bidirectional LSTM-CRF Models for Sequence Tagging. *arXiv:1508.01991*.
|
| 888 |
|
| 889 |
+
14. Lample, G., Ballesteros, M., Subramanian, S., Kawakami, K., & Dyer, C. (2016). Neural Architectures for Named Entity Recognition. *NAACL-HLT*, 260-270.
|
| 890 |
|
| 891 |
+
15. Ma, X., & Hovy, E. (2016). End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF. *ACL*, 1064-1074.
|
| 892 |
|
| 893 |
+
16. Darwish, K., Mubarak, H., Abdelali, A., & Eldesouki, M. (2017). Arabic POS Tagging: Don't Abandon Feature Engineering Just Yet. *WANLP@EACL*.
|
| 894 |
|
| 895 |
+
17. Nguyen, D. Q., Vu, T., Nguyen, D. Q., Dras, M., & Johnson, M. (2017). From Word Segmentation to POS Tagging for Vietnamese. *ALTA*, 108-113.
|
| 896 |
|
| 897 |
+
18. Qian, X., & Liu, Y. (2017). A non-DNN Feature Engineering Approach to Dependency Parsing. *CoNLL Shared Task*.
|
| 898 |
|
| 899 |
+
19. Vu, T., Nguyen, D. Q., Nguyen, D. Q., Dras, M., & Johnson, M. (2018). VnCoreNLP: A Vietnamese Natural Language Processing Toolkit. *NAACL Demonstrations*, 56-60.
|
| 900 |
|
| 901 |
+
20. Nguyen, D. Q. (2019). A Neural Joint Model for Vietnamese Word Segmentation, POS Tagging and Dependency Parsing. *ALTA*.
|
| 902 |
|
| 903 |
+
21. Nguyen, D.-V., Thin, D., Nguyen, K. V., & Nguyen, N. L.-T. (2019). Vietnamese Word Segmentation with SVM: Ambiguity Reduction and Suffix Capture. *PACLING*.
|
| 904 |
+
|
| 905 |
+
22. Lai, T. et al. (2019). Vietnamese Noun Phrase Chunking Based on BiLSTM-CRF Model with Constraint Rules. *Springer LNCS*.
|
| 906 |
+
|
| 907 |
+
23. Nguyen, D. Q., & Nguyen, A. T. (2020). PhoBERT: Pre-trained language models for Vietnamese. *EMNLP Findings*, 1037-1042.
|
| 908 |
+
|
| 909 |
+
24. Wei, T., Qi, J., He, S., & Sun, S. (2021). Masked Conditional Random Fields for Sequence Labeling. *NAACL*, 2024-2035.
|
| 910 |
+
|
| 911 |
+
25. Nguyen, L. T., & Nguyen, D. Q. (2021). PhoNLP: A joint multi-task learning model for Vietnamese POS tagging, NER and dependency parsing. *NAACL Demonstrations*, 1-7.
|
| 912 |
+
|
| 913 |
+
26. Tran, C. D., Pham, N. H., Nguyen, A., & Hy, T.-S. (2023). ViDeBERTa: A powerful pre-trained language model for Vietnamese. *EACL Findings*, 1071-1078.
|
| 914 |
+
|
| 915 |
+
27. python-crfsuite. https://github.com/scrapinghub/python-crfsuite
|
| 916 |
+
|
| 917 |
+
28. Underthesea - Vietnamese NLP Toolkit. https://github.com/undertheseanlp/underthesea
|
| 918 |
|
| 919 |
---
|
| 920 |
|
|
|
|
| 922 |
|
| 923 |
### A. Feature Template Syntax
|
| 924 |
|
| 925 |
+
**POS Tagging:**
|
| 926 |
| Syntax | Meaning |
|
| 927 |
|--------|---------|
|
| 928 |
| `T[0]` | Current token |
|
|
|
|
| 934 |
| `.suffix3` | Last 3 characters |
|
| 935 |
| `.is_in_dict` | Dictionary lookup |
|
| 936 |
|
| 937 |
+
**Word Segmentation:**
|
| 938 |
+
| Syntax | Meaning |
|
| 939 |
+
|--------|---------|
|
| 940 |
+
| `S[0]` | Current syllable |
|
| 941 |
+
| `S[-1]` | Previous syllable |
|
| 942 |
+
| `S[1]` | Next syllable |
|
| 943 |
+
| `S[-1,0]` | Bigram of previous and current |
|
| 944 |
+
| `S[-1,0,1]` | Trigram |
|
| 945 |
+
| `.ispunct` | Is punctuation |
|
| 946 |
+
| `.len` | Syllable length |
|
| 947 |
+
|
| 948 |
### B. Universal POS Tags
|
| 949 |
|
| 950 |
| Tag | Description | Example |
|
| 951 |
|-----|-------------|---------|
|
| 952 |
+
| ADJ | Adjective | dep (beautiful) |
|
| 953 |
| ADP | Adposition | trong (in) |
|
| 954 |
+
| ADV | Adverb | rat (very) |
|
| 955 |
+
| AUX | Auxiliary | la (is) |
|
| 956 |
+
| CCONJ | Coordinating conjunction | va (and) |
|
| 957 |
+
| DET | Determiner | nhung (plural marker) |
|
| 958 |
+
| NOUN | Noun | nha (house) |
|
| 959 |
+
| NUM | Numeral | mot (one) |
|
| 960 |
+
| PART | Particle | a (politeness marker) |
|
| 961 |
+
| PRON | Pronoun | toi (I) |
|
| 962 |
+
| PROPN | Proper noun | Viet Nam |
|
| 963 |
| PUNCT | Punctuation | . , ? |
|
| 964 |
+
| SCONJ | Subordinating conjunction | neu (if) |
|
| 965 |
+
| VERB | Verb | di (go) |
|
| 966 |
| X | Other | - |
|
| 967 |
|
| 968 |
+
### C. BIO Tagging Scheme (Word Segmentation)
|
| 969 |
+
|
| 970 |
+
| Tag | Meaning | Example |
|
| 971 |
+
|-----|---------|---------|
|
| 972 |
+
| B | Beginning of word | "Thoi" in "Thoi han" (deadline) |
|
| 973 |
+
| I | Inside word | "han" in "Thoi han" (deadline) |
|
| 974 |
+
|
| 975 |
+
Example: `Thoi han bao hanh san pham` -> `B I B I B I` (3 compound words)
|
| 976 |
+
|
| 977 |
+
### D. Version History
|
| 978 |
|
| 979 |
+
| Version | Date | Dataset | Task | Metric | Score |
|
| 980 |
+
|---------|------|---------|------|--------|-------|
|
| 981 |
+
| 1.0 | 2025-01-31 | UDD-v0.1 (3K) | POS | Accuracy | 95.57% |
|
| 982 |
+
| **1.1** | **2026-01-31** | **UDD-1 (20K)** | **POS** | **Accuracy** | **95.89%** |
|
| 983 |
+
| **1.1** | **2026-01-31** | **UDD-1 (20K)** | **WS** | **Word F1** | **98.01%** |
|
| 984 |
+
| **1.2** | **2026-02-08** | **VLSP 2013 (75K)** | **WS** | **Word F1** | **97.17%** |
|
| 985 |
|
| 986 |
---
|
| 987 |
|
| 988 |
+
*Report generated: February 8, 2026*
|
| 989 |
*Model: undertheseanlp/tre-1*
|
| 990 |
+
*Version: 1.2*
|
TECHNICAL_REPORT_CRF.md
DELETED
|
@@ -1,377 +0,0 @@
|
|
| 1 |
-
# Technical Report: CRF Implementation and Optimization in underthesea-core
|
| 2 |
-
|
| 3 |
-
## Executive Summary
|
| 4 |
-
|
| 5 |
-
This report documents the implementation and optimization of a Conditional Random Field (CRF) trainer in Rust (`underthesea-core`). Through a series of optimizations, we achieved:
|
| 6 |
-
|
| 7 |
-
- **10x speedup** for word segmentation (from original implementation)
|
| 8 |
-
- **1.24x faster** than python-crfsuite for word segmentation
|
| 9 |
-
- **Equivalent performance** to python-crfsuite for POS tagging
|
| 10 |
-
- **Identical accuracy** to python-crfsuite
|
| 11 |
-
|
| 12 |
-
---
|
| 13 |
-
|
| 14 |
-
## 1. Introduction
|
| 15 |
-
|
| 16 |
-
### 1.1 Motivation
|
| 17 |
-
|
| 18 |
-
The original `underthesea-core` CRF trainer was significantly slower than `python-crfsuite` (CRFsuite's Python binding):
|
| 19 |
-
|
| 20 |
-
| Task | python-crfsuite | underthesea-core (original) | Slowdown |
|
| 21 |
-
|------|-----------------|----------------------------|----------|
|
| 22 |
-
| Word Segmentation | 2m 34s | 18m 33s | **7.2x slower** |
|
| 23 |
-
| POS Tagging | 4m 50s | 7m 21s | **1.5x slower** |
|
| 24 |
-
|
| 25 |
-
### 1.2 Objectives
|
| 26 |
-
|
| 27 |
-
1. Match or exceed python-crfsuite performance
|
| 28 |
-
2. Maintain identical accuracy
|
| 29 |
-
3. Keep the implementation in pure Rust (no C dependencies)
|
| 30 |
-
|
| 31 |
-
---
|
| 32 |
-
|
| 33 |
-
## 2. CRF Training Algorithm
|
| 34 |
-
|
| 35 |
-
### 2.1 L-BFGS with OWL-QN
|
| 36 |
-
|
| 37 |
-
The trainer uses Limited-memory BFGS (L-BFGS) optimization with Orthant-Wise Limited-memory Quasi-Newton (OWL-QN) extension for L1 regularization:
|
| 38 |
-
|
| 39 |
-
```
|
| 40 |
-
minimize: L(w) = -log P(y|x) + λ₁||w||₁ + λ₂||w||₂²
|
| 41 |
-
```
|
| 42 |
-
|
| 43 |
-
Where:
|
| 44 |
-
- `L(w)` = negative log-likelihood + regularization
|
| 45 |
-
- `λ₁ = 1.0` (L1 regularization coefficient)
|
| 46 |
-
- `λ₂ = 0.001` (L2 regularization coefficient)
|
| 47 |
-
|
| 48 |
-
### 2.2 Forward-Backward Algorithm
|
| 49 |
-
|
| 50 |
-
The core computation is the forward-backward algorithm for computing:
|
| 51 |
-
1. **Partition function** Z(x) via forward pass
|
| 52 |
-
2. **Marginal probabilities** P(y_t | x) via forward-backward
|
| 53 |
-
3. **Gradient** ∇L(w) = E_model[f] - E_empirical[f]
|
| 54 |
-
|
| 55 |
-
Complexity per sequence: **O(n × L²)** where:
|
| 56 |
-
- n = sequence length
|
| 57 |
-
- L = number of labels
|
| 58 |
-
|
| 59 |
-
### 2.3 Scaled Probability Space
|
| 60 |
-
|
| 61 |
-
Following CRFsuite's approach, we use **scaled probability space** instead of log-space:
|
| 62 |
-
|
| 63 |
-
```rust
|
| 64 |
-
// Instead of: log_alpha[t][y] = logsumexp(log_alpha[t-1] + log_trans + log_state)
|
| 65 |
-
// We use: alpha[t][y] = sum(alpha[t-1] * exp_trans) * exp_state * scale
|
| 66 |
-
```
|
| 67 |
-
|
| 68 |
-
Benefits:
|
| 69 |
-
- No log/exp in inner loops
|
| 70 |
-
- Better numerical stability with scaling factors
|
| 71 |
-
- Matches CRFsuite's performance characteristics
|
| 72 |
-
|
| 73 |
-
---
|
| 74 |
-
|
| 75 |
-
## 3. Optimization 1: Flat Data Structure for Feature Lookup
|
| 76 |
-
|
| 77 |
-
### 3.1 Problem
|
| 78 |
-
|
| 79 |
-
The original implementation used nested vectors for feature lookup:
|
| 80 |
-
|
| 81 |
-
```rust
|
| 82 |
-
// Original: O(1) lookup but poor cache locality
|
| 83 |
-
attr_to_features: Vec<Vec<(u32, u32)>> // attr_id -> [(label_id, feature_id), ...]
|
| 84 |
-
```
|
| 85 |
-
|
| 86 |
-
Each inner `Vec` is heap-allocated separately, causing:
|
| 87 |
-
- Cache misses on every attribute lookup
|
| 88 |
-
- Poor memory locality in hot loops
|
| 89 |
-
- Significant overhead for large feature sets (562k features)
|
| 90 |
-
|
| 91 |
-
### 3.2 Solution
|
| 92 |
-
|
| 93 |
-
Flatten into contiguous arrays with offset indexing:
|
| 94 |
-
|
| 95 |
-
```rust
|
| 96 |
-
// Optimized: Contiguous memory, excellent cache locality
|
| 97 |
-
attr_offsets: Vec<u32> // attr_id -> start index
|
| 98 |
-
attr_features_flat: Vec<(u32, u32)> // flattened (label_id, feature_id) pairs
|
| 99 |
-
|
| 100 |
-
// Lookup: O(1) with sequential memory access
|
| 101 |
-
let start = attr_offsets[attr_id];
|
| 102 |
-
let end = attr_offsets[attr_id + 1];
|
| 103 |
-
for i in start..end {
|
| 104 |
-
let (label_id, feature_id) = attr_features_flat[i];
|
| 105 |
-
// Process feature...
|
| 106 |
-
}
|
| 107 |
-
```
|
| 108 |
-
|
| 109 |
-
### 3.3 Impact
|
| 110 |
-
|
| 111 |
-
| Task | Before | After | Speedup |
|
| 112 |
-
|------|--------|-------|---------|
|
| 113 |
-
| Word Segmentation | 18m 33s | 1m 49s | **10.2x** |
|
| 114 |
-
| POS Tagging | 7m 21s | 5m 9s | **1.4x** |
|
| 115 |
-
|
| 116 |
-
The larger speedup for word segmentation (562k features vs 37k for POS) confirms the feature lookup was the bottleneck.
|
| 117 |
-
|
| 118 |
-
---
|
| 119 |
-
|
| 120 |
-
## 4. Optimization 2: Loop Unrolling for Auto-Vectorization
|
| 121 |
-
|
| 122 |
-
### 4.1 Problem
|
| 123 |
-
|
| 124 |
-
The forward-backward algorithm has O(n × L²) inner loops that dominate for tasks with many labels (POS tagging has 16 labels = 256 transitions per timestep).
|
| 125 |
-
|
| 126 |
-
### 4.2 Solution
|
| 127 |
-
|
| 128 |
-
Manual loop unrolling to enable instruction-level parallelism and auto-vectorization:
|
| 129 |
-
|
| 130 |
-
```rust
|
| 131 |
-
// Original: Sequential, no SIMD
|
| 132 |
-
for y in 0..num_labels {
|
| 133 |
-
alpha[curr + y] += alpha_prev * trans[trans_base + y];
|
| 134 |
-
}
|
| 135 |
-
|
| 136 |
-
// Optimized: 4-way unrolled for SIMD
|
| 137 |
-
let chunks = num_labels / 4;
|
| 138 |
-
for i in 0..chunks {
|
| 139 |
-
let y = i * 4;
|
| 140 |
-
let a0 = alpha[curr + y];
|
| 141 |
-
let a1 = alpha[curr + y + 1];
|
| 142 |
-
let a2 = alpha[curr + y + 2];
|
| 143 |
-
let a3 = alpha[curr + y + 3];
|
| 144 |
-
|
| 145 |
-
let t0 = trans[trans_base + y];
|
| 146 |
-
let t1 = trans[trans_base + y + 1];
|
| 147 |
-
let t2 = trans[trans_base + y + 2];
|
| 148 |
-
let t3 = trans[trans_base + y + 3];
|
| 149 |
-
|
| 150 |
-
alpha[curr + y] = a0 + alpha_prev * t0;
|
| 151 |
-
alpha[curr + y + 1] = a1 + alpha_prev * t1;
|
| 152 |
-
alpha[curr + y + 2] = a2 + alpha_prev * t2;
|
| 153 |
-
alpha[curr + y + 3] = a3 + alpha_prev * t3;
|
| 154 |
-
}
|
| 155 |
-
```
|
| 156 |
-
|
| 157 |
-
### 4.3 Impact
|
| 158 |
-
|
| 159 |
-
| Task | Before SIMD | After SIMD | Speedup |
|
| 160 |
-
|------|-------------|------------|---------|
|
| 161 |
-
| POS Tagging (10 iter) | 25.7s | 17.58s | **1.46x** |
|
| 162 |
-
|
| 163 |
-
---
|
| 164 |
-
|
| 165 |
-
## 5. Optimization 3: Unsafe Bounds-Check Elimination
|
| 166 |
-
|
| 167 |
-
### 5.1 Problem
|
| 168 |
-
|
| 169 |
-
Rust's safe array indexing includes bounds checks on every access, adding overhead in tight loops.
|
| 170 |
-
|
| 171 |
-
### 5.2 Solution
|
| 172 |
-
|
| 173 |
-
Use `unsafe` with `get_unchecked` for hot paths where indices are provably valid:
|
| 174 |
-
|
| 175 |
-
```rust
|
| 176 |
-
// Safe but slow
|
| 177 |
-
for y in 0..num_labels {
|
| 178 |
-
gradient[feature_id] += state_mexp[base + y]; // 2 bounds checks
|
| 179 |
-
}
|
| 180 |
-
|
| 181 |
-
// Unsafe but fast
|
| 182 |
-
unsafe {
|
| 183 |
-
for y in 0..num_labels {
|
| 184 |
-
*gradient.get_unchecked_mut(feature_id) +=
|
| 185 |
-
*state_mexp.get_unchecked(base + y); // 0 bounds checks
|
| 186 |
-
}
|
| 187 |
-
}
|
| 188 |
-
```
|
| 189 |
-
|
| 190 |
-
### 5.3 Safety Justification
|
| 191 |
-
|
| 192 |
-
All `unsafe` blocks are guarded by:
|
| 193 |
-
1. Loop bounds derived from array lengths
|
| 194 |
-
2. Assertions or early returns for invalid indices
|
| 195 |
-
3. Invariants maintained by the algorithm structure
|
| 196 |
-
|
| 197 |
-
---
|
| 198 |
-
|
| 199 |
-
## 6. Optimization 4: Fused Operations
|
| 200 |
-
|
| 201 |
-
### 6.1 Problem
|
| 202 |
-
|
| 203 |
-
Separate loops for related operations cause redundant memory traversals.
|
| 204 |
-
|
| 205 |
-
### 6.2 Solution
|
| 206 |
-
|
| 207 |
-
Fuse operations that access the same memory:
|
| 208 |
-
|
| 209 |
-
```rust
|
| 210 |
-
// Before: 3 separate loops, 3 memory traversals
|
| 211 |
-
for y in 0..L { alpha[y] *= exp_state[y]; }
|
| 212 |
-
for y in 0..L { sum += alpha[y]; }
|
| 213 |
-
for y in 0..L { alpha[y] *= scale; }
|
| 214 |
-
|
| 215 |
-
// After: 1 fused loop, 1 memory traversal
|
| 216 |
-
let mut sum = 0.0;
|
| 217 |
-
for y in 0..L {
|
| 218 |
-
let val = alpha[y] * exp_state[y];
|
| 219 |
-
alpha[y] = val;
|
| 220 |
-
sum += val;
|
| 221 |
-
}
|
| 222 |
-
let scale = 1.0 / sum;
|
| 223 |
-
for y in 0..L { alpha[y] *= scale; }
|
| 224 |
-
```
|
| 225 |
-
|
| 226 |
-
---
|
| 227 |
-
|
| 228 |
-
## 7. Performance Results
|
| 229 |
-
|
| 230 |
-
### 7.1 Final Comparison (200 iterations)
|
| 231 |
-
|
| 232 |
-
| Task | Features | Labels | python-crfsuite | underthesea-core | Result |
|
| 233 |
-
|------|----------|--------|-----------------|------------------|--------|
|
| 234 |
-
| Word Segmentation | 562,885 | 2 | 2m 2s | **1m 38s** | **1.24x faster** |
|
| 235 |
-
| POS Tagging | 626,723 | 16 | 4m 3s | 4m 14s | ~equal (4% slower) |
|
| 236 |
-
|
| 237 |
-
### 7.2 Accuracy Comparison
|
| 238 |
-
|
| 239 |
-
| Task | Metric | python-crfsuite | underthesea-core |
|
| 240 |
-
|------|--------|-----------------|------------------|
|
| 241 |
-
| Word Segmentation | Syllable Accuracy | 98.89% | **98.89%** |
|
| 242 |
-
| Word Segmentation | Word F1 | 98.00% | **98.00%** |
|
| 243 |
-
| POS Tagging | Accuracy | 95.98% | **95.97%** |
|
| 244 |
-
|
| 245 |
-
**Accuracy is identical** - optimizations only affected performance, not correctness.
|
| 246 |
-
|
| 247 |
-
### 7.3 Optimization Breakdown
|
| 248 |
-
|
| 249 |
-
| Optimization | Word Seg Speedup | POS Tag Speedup |
|
| 250 |
-
|--------------|------------------|-----------------|
|
| 251 |
-
| Baseline (original) | 1.0x | 1.0x |
|
| 252 |
-
| + Flat data structure | **10.2x** | 1.4x |
|
| 253 |
-
| + Loop unrolling | 10.2x | **2.1x** |
|
| 254 |
-
| + Unsafe bounds elim | ~10.2x | ~2.3x |
|
| 255 |
-
| **Total** | **10.2x** | **2.3x** |
|
| 256 |
-
|
| 257 |
-
---
|
| 258 |
-
|
| 259 |
-
## 8. Key Insights
|
| 260 |
-
|
| 261 |
-
### 8.1 Bottleneck Analysis
|
| 262 |
-
|
| 263 |
-
| Feature Set Size | Bottleneck | Best Optimization |
|
| 264 |
-
|------------------|------------|-------------------|
|
| 265 |
-
| Large (500k+) | Feature lookup (cache misses) | Flat data structure |
|
| 266 |
-
| Small (<50k) | Forward-backward O(L²) | Loop unrolling |
|
| 267 |
-
|
| 268 |
-
### 8.2 Why python-crfsuite Was Faster
|
| 269 |
-
|
| 270 |
-
CRFsuite (C implementation) has:
|
| 271 |
-
1. **Hand-optimized sparse feature storage** - similar to our flat structure
|
| 272 |
-
2. **SIMD-vectorized matrix operations** - AVX/SSE intrinsics
|
| 273 |
-
3. **Cache-optimized memory layout** - column-major for transitions
|
| 274 |
-
4. **Decades of optimization** - mature codebase
|
| 275 |
-
|
| 276 |
-
### 8.3 Lessons Learned
|
| 277 |
-
|
| 278 |
-
1. **Profile first**: The bottleneck was different for each task
|
| 279 |
-
2. **Data structure matters**: Flat arrays beat nested vectors by 10x
|
| 280 |
-
3. **Cache locality is critical**: Sequential memory access patterns enable hardware prefetching
|
| 281 |
-
4. **Unsafe Rust is justified**: When correctness is provable and performance is critical
|
| 282 |
-
|
| 283 |
-
---
|
| 284 |
-
|
| 285 |
-
## 9. Future Optimizations (Evaluated)
|
| 286 |
-
|
| 287 |
-
The following optimizations were tested but did not provide significant improvements:
|
| 288 |
-
|
| 289 |
-
### 9.1 Explicit SIMD Intrinsics (AVX2)
|
| 290 |
-
|
| 291 |
-
**Result**: No improvement
|
| 292 |
-
|
| 293 |
-
Manual AVX2 intrinsics were implemented for the forward-backward algorithm but showed no performance gain. The inner loops process only 2-16 labels, which is too small for explicit SIMD to outperform the compiler's auto-vectorization with loop unrolling.
|
| 294 |
-
|
| 295 |
-
### 9.2 Parallel Forward-Backward Across Sequences
|
| 296 |
-
|
| 297 |
-
**Result**: Overhead exceeds gains
|
| 298 |
-
|
| 299 |
-
Rayon-based parallel processing across sequences was tested with thread-local gradient accumulation. The overhead of buffer allocation per sequence and gradient merging negated the parallelism benefits. Sequential processing with buffer reuse remains faster.
|
| 300 |
-
|
| 301 |
-
### 9.3 Memory Pool for Temporary Buffers
|
| 302 |
-
|
| 303 |
-
**Result**: Already implemented
|
| 304 |
-
|
| 305 |
-
The current implementation already reuses buffers across sequences within each L-BFGS evaluation. Further pooling across evaluations showed minimal improvement.
|
| 306 |
-
|
| 307 |
-
### 9.4 Compressed Sparse Features
|
| 308 |
-
|
| 309 |
-
**Result**: Not needed
|
| 310 |
-
|
| 311 |
-
The flat data structure with offset indexing already provides efficient sparse feature access. Additional compression would add decode overhead without meaningful memory savings for the current feature set sizes.
|
| 312 |
-
|
| 313 |
-
---
|
| 314 |
-
|
| 315 |
-
## 10. Conclusion
|
| 316 |
-
|
| 317 |
-
Through systematic optimization, we transformed `underthesea-core`'s CRF trainer from **7x slower** to **competitive with python-crfsuite** while maintaining identical accuracy:
|
| 318 |
-
|
| 319 |
-
- **Word Segmentation**: 1.24x faster than python-crfsuite
|
| 320 |
-
- **POS Tagging**: Nearly identical performance (4% slower)
|
| 321 |
-
|
| 322 |
-
The key insight was that different tasks have different bottlenecks:
|
| 323 |
-
|
| 324 |
-
- **Large feature sets** → Optimize data structure for cache locality
|
| 325 |
-
- **Many labels** → Optimize forward-backward with loop unrolling
|
| 326 |
-
|
| 327 |
-
The optimized implementation is now suitable for production use in Vietnamese NLP pipelines.
|
| 328 |
-
|
| 329 |
-
---
|
| 330 |
-
|
| 331 |
-
## Appendix A: Code References
|
| 332 |
-
|
| 333 |
-
| File | Description |
|
| 334 |
-
|------|-------------|
|
| 335 |
-
| `underthesea_core/src/crf/trainer.rs` | Main CRF trainer implementation |
|
| 336 |
-
| `underthesea_core/src/crf/model.rs` | CRF model structure |
|
| 337 |
-
| `tre-1/scripts/train.py` | POS tagger training script |
|
| 338 |
-
| `tre-1/scripts/train_word_segmentation.py` | Word segmentation training script |
|
| 339 |
-
|
| 340 |
-
## Appendix B: Hyperparameters
|
| 341 |
-
|
| 342 |
-
| Parameter | Value | Description |
|
| 343 |
-
|-----------|-------|-------------|
|
| 344 |
-
| c1 (L1) | 1.0 | L1 regularization coefficient |
|
| 345 |
-
| c2 (L2) | 0.001 | L2 regularization coefficient |
|
| 346 |
-
| max_iterations | 200 | Maximum L-BFGS iterations |
|
| 347 |
-
| linesearch | Backtracking | Line search algorithm for OWL-QN |
|
| 348 |
-
| max_step_size | 1e20 | Allow large steps (critical for convergence) |
|
| 349 |
-
|
| 350 |
-
## Appendix C: Hardware
|
| 351 |
-
|
| 352 |
-
| Component | Specification |
|
| 353 |
-
|-----------|---------------|
|
| 354 |
-
| CPU | AMD EPYC 7713 64-Core Processor |
|
| 355 |
-
| Platform | Linux |
|
| 356 |
-
| Rust | 1.75+ (release mode with LTO) |
|
| 357 |
-
| Python | 3.12 |
|
| 358 |
-
|
| 359 |
-
## Appendix D: Benchmark Results (2026-01-31)
|
| 360 |
-
|
| 361 |
-
### 10-Iteration Tests
|
| 362 |
-
|
| 363 |
-
| Task | Trainer | Training Time | Accuracy |
|
| 364 |
-
|------|---------|---------------|----------|
|
| 365 |
-
| POS Tagging | python-crfsuite | 12.96s | 78.37% |
|
| 366 |
-
| POS Tagging | underthesea-core | 18.51s | 75.42% |
|
| 367 |
-
| Word Segmentation | python-crfsuite | 6.78s | 81.44% F1 |
|
| 368 |
-
| Word Segmentation | underthesea-core | 11.99s | 82.81% F1 |
|
| 369 |
-
|
| 370 |
-
### 200-Iteration Tests
|
| 371 |
-
|
| 372 |
-
| Task | Trainer | Training Time | Accuracy |
|
| 373 |
-
|------|---------|---------------|----------|
|
| 374 |
-
| POS Tagging | python-crfsuite | 243.22s | 95.98% |
|
| 375 |
-
| POS Tagging | underthesea-core | 254.07s | 95.97% |
|
| 376 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TECHNICAL_REPORT_REVIEW.md
CHANGED
|
@@ -1,190 +1,168 @@
|
|
| 1 |
-
# Technical Report
|
| 2 |
|
| 3 |
**Document**: TECHNICAL_REPORT.md
|
| 4 |
**Reviewer**: Claude Code (paper-review skill)
|
| 5 |
-
**Date**: 2026
|
| 6 |
**Review Standard**: ACL Rolling Review (ARR) Guidelines
|
| 7 |
|
| 8 |
---
|
| 9 |
|
| 10 |
## Paper Summary
|
| 11 |
|
| 12 |
-
This technical report
|
| 13 |
|
| 14 |
---
|
| 15 |
|
| 16 |
## Summary of Strengths
|
| 17 |
|
| 18 |
-
1. **
|
| 19 |
|
| 20 |
-
2. **
|
| 21 |
|
| 22 |
-
3. **Thorough
|
| 23 |
|
| 24 |
-
4. **
|
| 25 |
-
|
| 26 |
-
5. **Practical deployment**: The model is publicly accessible on Hugging Face with a custom inference handler, enabling immediate use by the Vietnamese NLP community (Section 6).
|
| 27 |
-
|
| 28 |
-
6. **Appropriate method choice for the context**: CRF is a sensible choice for a lightweight, interpretable, and fast POS tagger. The model provides good accuracy while being computationally efficient compared to transformer-based alternatives like PhoBERT.
|
| 29 |
|
| 30 |
---
|
| 31 |
|
| 32 |
## Summary of Weaknesses
|
| 33 |
|
| 34 |
-
1. **
|
| 35 |
-
|
| 36 |
-
2. **Example predictions appear incorrect**: In Section 6.3, "Tôi" (I/me) is labeled PROPN but should be PRON per Universal POS guidelines. Similarly, "đô" in "thủ đô" (capital city) is labeled ADJ, which seems inconsistent with the compound noun interpretation. These examples may mislead users.
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
---
|
| 47 |
|
| 48 |
## Scores
|
| 49 |
|
| 50 |
-
### Soundness:
|
| 51 |
-
|
| 52 |
|
| 53 |
-
### Excitement: 3
|
| 54 |
-
|
| 55 |
|
| 56 |
-
### Overall Assessment: 3
|
| 57 |
-
|
| 58 |
|
| 59 |
-
### Reproducibility: 5
|
| 60 |
-
|
| 61 |
|
| 62 |
-
### Confidence: 4
|
| 63 |
-
|
| 64 |
|
| 65 |
---
|
| 66 |
|
| 67 |
-
##
|
| 68 |
-
|
| 69 |
-
### Papers Found
|
| 70 |
-
|
| 71 |
-
| Paper | Year | Method | Results | Relevance |
|
| 72 |
-
|-------|------|--------|---------|-----------|
|
| 73 |
-
| PhoBERT (Nguyen & Nguyen) | 2020 | Transformer | 96.8% on VLSP 2013 | Current SOTA for Vietnamese POS |
|
| 74 |
-
| vELECTRA (Bui et al.) | 2020 | Transformer | 96.77% on VLSP 2013 | Neural approach comparison |
|
| 75 |
-
| VnCoreNLP/VnMarMoT (Nguyen et al.) | 2018 | CRF (MarMoT) | 95.88% on VLSP 2013 | Direct CRF baseline |
|
| 76 |
-
| RDRPOSTagger (Nguyen et al.) | 2014 | Rule-based | 95.11% on VLSP 2013 | Classic Vietnamese POS tagger |
|
| 77 |
-
| BiLSTM-CRF (Ma et al.) | 2016 | Neural | 95.40% on VLSP 2013 | Neural sequence labeling |
|
| 78 |
-
| PhoNLP (Linh et al.) | 2021 | Multi-task | Joint POS/NER/parsing | Joint modeling approach |
|
| 79 |
-
|
| 80 |
-
### Missing Citations
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
| 85 |
-
2. **VnCoreNLP** (Nguyen et al., NAACL 2018) - The most widely used Vietnamese NLP toolkit with 95.88% accuracy
|
| 86 |
-
3. **VLSP shared task papers** - The standard Vietnamese NLP evaluation benchmarks
|
| 87 |
|
| 88 |
-
|
| 89 |
|
| 90 |
-
|
| 91 |
-
- **Actual SOTA on VLSP 2013**: PhoBERT-large achieves 96.8%, VnMarMoT achieves 95.88%
|
| 92 |
-
- **Assessment**: The paper does not claim SOTA, which is appropriate. However, the lack of comparison to established systems makes it difficult to assess the relative contribution. The 95.57% accuracy on UDD-v0.1 cannot be directly compared to 95.88% (VnMarMoT) or 96.8% (PhoBERT) on VLSP 2013 due to different datasets.
|
| 93 |
|
| 94 |
-
###
|
| 95 |
|
| 96 |
-
The
|
| 97 |
-
- A new dataset (not VLSP 2013 benchmark)
|
| 98 |
-
- Machine-annotated using underthesea toolkit
|
| 99 |
-
- Domain-specific (legal documents)
|
| 100 |
-
- 3,000 sentences (vs. 27,870 in VLSP 2013)
|
| 101 |
|
| 102 |
-
|
| 103 |
|
| 104 |
-
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
-
|
| 109 |
|
| 110 |
-
|
| 111 |
|
| 112 |
-
|
| 113 |
|
| 114 |
-
###
|
| 115 |
|
| 116 |
-
The
|
| 117 |
|
| 118 |
-
|
| 119 |
|
| 120 |
-
|
| 121 |
|
| 122 |
-
|
| 123 |
|
| 124 |
-
|
| 125 |
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
-
|
| 129 |
-
- Dataset: Public on HuggingFace (undertheseanlp/UDD-v0.1)
|
| 130 |
-
- Code: Training, evaluation, and inference scripts provided
|
| 131 |
-
- Dependencies: PEP 723 inline metadata (no requirements.txt drift)
|
| 132 |
-
- Random seed: 42 for train/test split
|
| 133 |
-
- Hyperparameters: Fully specified in Section 3.3
|
| 134 |
-
- Model: Deployed on HuggingFace for verification
|
| 135 |
|
| 136 |
-
|
|
|
|
| 137 |
|
| 138 |
-
|
| 139 |
-
- Tokenization requirement (pre-segmented input)
|
| 140 |
-
- Domain bias (legal documents)
|
| 141 |
-
- Poor performance on rare tags
|
| 142 |
-
- No word segmentation capability
|
| 143 |
|
| 144 |
-
|
|
|
|
|
|
|
|
|
|
| 145 |
|
| 146 |
---
|
| 147 |
|
| 148 |
## Questions for Authors
|
| 149 |
|
| 150 |
-
1.
|
| 151 |
|
| 152 |
-
2.
|
| 153 |
|
| 154 |
-
3.
|
| 155 |
|
| 156 |
-
4.
|
| 157 |
|
| 158 |
-
5.
|
| 159 |
|
| 160 |
---
|
| 161 |
|
| 162 |
## Minor Issues
|
| 163 |
|
| 164 |
-
-
|
| 165 |
-
- Section
|
| 166 |
-
-
|
|
|
|
|
|
|
| 167 |
|
| 168 |
---
|
| 169 |
|
| 170 |
## Suggestions for Improvement
|
| 171 |
|
| 172 |
-
|
|
|
|
| 173 |
|
| 174 |
-
|
|
|
|
| 175 |
|
| 176 |
-
|
|
|
|
| 177 |
|
| 178 |
-
|
|
|
|
| 179 |
|
| 180 |
-
|
|
|
|
| 181 |
|
| 182 |
-
|
|
|
|
| 183 |
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
- VnCoreNLP (Nguyen et al., NAACL 2018) - Widely used Vietnamese NLP toolkit
|
| 187 |
-
- VLSP 2013 shared task overview paper
|
| 188 |
|
| 189 |
---
|
| 190 |
|
|
@@ -192,28 +170,93 @@ The domain limitation is particularly important - legal document training may no
|
|
| 192 |
|
| 193 |
| Priority | Section | Action |
|
| 194 |
|----------|---------|--------|
|
| 195 |
-
| High | 4.
|
| 196 |
-
| High |
|
| 197 |
-
| High | 2 |
|
| 198 |
-
| Medium |
|
| 199 |
-
| Medium |
|
| 200 |
-
| Medium |
|
| 201 |
-
|
|
| 202 |
-
| Low |
|
|
|
|
|
|
|
| 203 |
|
| 204 |
---
|
| 205 |
|
| 206 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 207 |
|
| 208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
|
| 210 |
-
- [
|
| 211 |
-
- [
|
| 212 |
-
- [
|
| 213 |
-
- [
|
| 214 |
-
- [
|
| 215 |
-
- [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 216 |
|
| 217 |
---
|
| 218 |
|
| 219 |
-
*Review conducted following ACL Rolling Review guidelines*
|
|
|
|
|
|
| 1 |
+
# Paper Review: Technical Report -- Vietnamese NLP Pipeline (TRE-1)
|
| 2 |
|
| 3 |
**Document**: TECHNICAL_REPORT.md
|
| 4 |
**Reviewer**: Claude Code (paper-review skill)
|
| 5 |
+
**Date**: February 7, 2026
|
| 6 |
**Review Standard**: ACL Rolling Review (ARR) Guidelines
|
| 7 |
|
| 8 |
---
|
| 9 |
|
| 10 |
## Paper Summary
|
| 11 |
|
| 12 |
+
This technical report presents TRE-1, a Vietnamese NLP pipeline using CRF and non-neural methods optimized for CPU inference. The system covers four tasks -- word segmentation (98.01% word F1), POS tagging (95.89% accuracy), chunking (planned), and dependency parsing (planned) -- and is deployed on Hugging Face. The report argues that CRF-based methods remain competitive with neural approaches for Vietnamese NLP, particularly for resource-constrained deployment.
|
| 13 |
|
| 14 |
---
|
| 15 |
|
| 16 |
## Summary of Strengths
|
| 17 |
|
| 18 |
+
1. **Clear practical motivation and well-scoped contribution (Sections 1.2, 10)**: The CPU-first design philosophy is well-justified. The cross-task analysis in Section 10 effectively demonstrates that non-neural methods are within 1.3% or better for 3 of 4 tasks, making a compelling case for lightweight deployment. The total pipeline footprint (<20 MB) vs PhoBERT (500 MB+) is a meaningful engineering contribution.
|
| 19 |
|
| 20 |
+
2. **Competitive empirical results (Sections 4.3, 5.3)**: Word segmentation achieves 98.01% word F1 (near non-neural SOTA of 98.06%) and POS tagging at 95.89% matches VnMarMoT (95.88%), the best CRF system. These results validate that well-engineered feature-based CRF remains practical for Vietnamese. The detailed per-tag breakdown (Table 5.3) and error analysis (Section 9) provide useful diagnostic information.
|
| 21 |
|
| 22 |
+
3. **Thorough literature coverage and honest benchmarking (Sections 5.6, 12)**: The report surveys 28 references spanning CRF foundations through modern transformers. Comparisons are fair -- the authors correctly note that TRE-1 is evaluated on UDD-1 rather than VLSP 2013 (Section 5.6 note), and they do not overstate claims. The cross-language CRF evidence in Section 12.8 strengthens the methodological choice.
|
| 23 |
|
| 24 |
+
4. **Reproducibility (Section 16)**: Training commands, hyperparameters, dependencies, and PEP 723 inline metadata are provided. The three interchangeable trainer backends (python-crfsuite, crfsuite-rs, underthesea-core) demonstrate engineering maturity. Code and models are publicly available.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
---
|
| 27 |
|
| 28 |
## Summary of Weaknesses
|
| 29 |
|
| 30 |
+
1. **No evaluation on standard benchmarks (Sections 4.4, 5.6)**: Both WS and POS are evaluated only on UDD-1, a machine-annotated dataset created by the authors' own toolkit (Underthesea). This creates a circular evaluation concern: the model is trained on data annotated by the same framework. No results on VLSP 2013 (the standard Vietnamese NLP benchmark) are provided, making all cross-system comparisons in Tables 4.4 and 5.6 apples-to-oranges. This is the report's most significant limitation and is acknowledged (Limitation 5) but not addressed experimentally.
|
|
|
|
|
|
|
| 31 |
|
| 32 |
+
2. **Half the pipeline is unimplemented (Sections 6, 7)**: Chunking and dependency parsing are described as "Planned" with no experimental results. Sections 6-7 are literature surveys rather than system descriptions. The report title ("Vietnamese NLP Pipeline") and pipeline diagram (Section 3) create an impression of a complete system that does not yet exist. The contribution would be more accurately scoped as "Vietnamese WS and POS Tagging with CRF."
|
| 33 |
|
| 34 |
+
3. **Missing ablation studies and analysis**: There is no feature ablation showing the contribution of individual feature groups (e.g., dictionary features, n-grams, context window size). For 27 POS features and 21 WS features, understanding which features drive performance is essential. There is no comparison of different CRF regularization settings beyond the single configuration (c1=1.0, c2=0.001). There is no learning curve analysis showing how performance scales with training data size.
|
| 35 |
|
| 36 |
+
4. **Machine-annotated training data quality unquantified (Section 2.1)**: UDD-1 is described as "machine-generated using Underthesea toolkit" but no inter-annotator agreement, annotation quality assessment, or error rate estimation is provided. The 95.89% POS accuracy may partially reflect overfitting to Underthesea's annotation patterns rather than linguistic ground truth.
|
| 37 |
|
| 38 |
+
5. **Important recent work not cited**: The AAAI 2025 paper "Vietnamese Words Are Not Constructed from Syllables: Rethinking the Role of Word Segmentation in NLP for Vietnamese Texts" (Nguyen et al., 2025) directly challenges TRE-1's syllable-based BIO word segmentation approach. This paper argues that word segmentation may not be appropriate for Vietnamese and proposes ViWordFormer. This is a significant omission given TRE-1's word segmentation is the first pipeline stage.
|
| 39 |
|
| 40 |
---
|
| 41 |
|
| 42 |
## Scores
|
| 43 |
|
| 44 |
+
### Soundness: 3/5
|
| 45 |
+
The implemented components (WS, POS) are technically sound with clearly described methodology. However, the lack of standard benchmark evaluation and the circular evaluation on machine-annotated data from the same toolkit reduce confidence in the claimed results.
|
| 46 |
|
| 47 |
+
### Excitement: 3/5
|
| 48 |
+
The work addresses a genuine practical need (CPU-first Vietnamese NLP) and achieves competitive results. However, CRF-based Vietnamese NLP is well-explored territory (VnMarMoT, VnCoreNLP), and the contribution is primarily engineering integration rather than methodological novelty. The incomplete pipeline reduces impact.
|
| 49 |
|
| 50 |
+
### Overall Assessment: 3/5
|
| 51 |
+
Solid engineering work with clear practical value, appropriate for a Findings track or systems paper venue. The incomplete pipeline and lack of standard benchmark evaluation prevent a higher rating. Addressing VLSP 2013 evaluation would significantly strengthen the work.
|
| 52 |
|
| 53 |
+
### Reproducibility: 4/5
|
| 54 |
+
Training commands, hyperparameters, code, and models are provided. Minor concerns: exact dataset version/preprocessing details could be more precise, and the underthesea-core backend requires building from source with a hardcoded wheel path.
|
| 55 |
|
| 56 |
+
### Confidence: 4/5
|
| 57 |
+
Familiar with Vietnamese NLP landscape, CRF methods, and the benchmark ecosystem. Verified SOTA claims against published results.
|
| 58 |
|
| 59 |
---
|
| 60 |
|
| 61 |
+
## Detailed Comments
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
### Technical Soundness
|
| 64 |
|
| 65 |
+
The CRF formulation (Section 5.1) and feature engineering (Sections 4.2, 5.2) are standard and correctly described. The L-BFGS training with c1=1.0, c2=0.001 uses aggressive L1 regularization (100x the L2 penalty), which promotes feature sparsity. This is a reasonable choice but the sensitivity to these hyperparameters is not explored.
|
|
|
|
|
|
|
| 66 |
|
| 67 |
+
The BIO tagging scheme for word segmentation (Section 4.1) omits the "O" tag -- using only B and I. This is correct for Vietnamese where every syllable belongs to a word, but should be explicitly noted. The scheme is actually BI rather than BIO.
|
| 68 |
|
| 69 |
+
The pipeline error propagation analysis (Section 9.3) is qualitative. A quantitative analysis (e.g., oracle POS tagging performance given gold vs predicted word segmentation) would strengthen the argument.
|
|
|
|
|
|
|
| 70 |
|
| 71 |
+
### Novelty and Contribution
|
| 72 |
|
| 73 |
+
The primary contribution is an engineering integration of known techniques (CRF for WS/POS) into a deployable pipeline with modern tooling (HuggingFace, PEP 723, multiple backends). This is valuable practical work but limited in novelty -- VnCoreNLP (Vu et al., 2018) already provides a similar CRF-based pipeline with comparable performance.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
The feature template designs (21 WS, 27 POS) closely follow established patterns from VnMarMoT and underthesea. The dictionary features (T[0].is_in_dict, etc.) are a distinguishing element but their contribution is not isolated through ablation.
|
| 76 |
|
| 77 |
+
### Clarity and Presentation
|
| 78 |
|
| 79 |
+
The report is well-structured and clearly written. The pipeline diagram (Section 3) effectively communicates the architecture. Tables are informative and consistently formatted. The cross-task analysis (Section 10) is a particularly useful contribution for practitioners deciding between neural and non-neural approaches.
|
| 80 |
|
| 81 |
+
However, the mixed scope (2 implemented + 2 planned tasks) creates structural issues. Sections 6-7 read as literature review rather than system description, and their placement between implemented results and error analysis disrupts the narrative flow.
|
| 82 |
|
| 83 |
+
### Reproducibility Assessment
|
| 84 |
|
| 85 |
+
Strong on most dimensions: exact hyperparameters (Section 8.1), training commands (Section 16), public code and models. The PEP 723 inline metadata is a nice modern touch. Weaknesses: (1) the `underthesea-core` trainer references a hardcoded local wheel path (line 12 of `train_word_segmentation.py`); (2) exact preprocessing steps for converting UDD-1 to syllable-level sequences should be more explicit; (3) no random seeds specified.
|
| 86 |
|
| 87 |
+
### Limitations and Ethics
|
| 88 |
|
| 89 |
+
The limitations section (Section 13) is comprehensive and honest -- covering tokenization requirements, machine annotation quality, domain coverage, rare tags, benchmark comparability, and the DP gap. The machine annotation concern (Limitation 2) deserves more attention given its fundamental impact on result interpretation.
|
| 90 |
|
| 91 |
+
No ethical concerns specific to this work. The CC-BY-SA-4.0 licensing is appropriate.
|
| 92 |
|
| 93 |
+
---
|
| 94 |
|
| 95 |
+
## Related Work Research
|
| 96 |
|
| 97 |
+
### Papers Found
|
| 98 |
|
| 99 |
+
| Paper | Year | Method | Results | Relevance |
|
| 100 |
+
|-------|------|--------|---------|-----------|
|
| 101 |
+
| ViWordFormer (Nguyen et al.) | AAAI 2025 | Transformer-based word formation | Challenges syllable-based WS | Directly challenges TRE-1's WS approach |
|
| 102 |
+
| ViDeBERTa (Tran et al.) | EACL 2023 | DeBERTaV3 | 97.2% POS acc | SOTA POS -- cited correctly |
|
| 103 |
+
| PhoNLP (Nguyen & Nguyen) | NAACL 2021 | PhoBERT+MTL | 84.95-85.18% UAS | SOTA DP -- cited, UAS figure slightly varies |
|
| 104 |
+
| Conversational POS Dataset (Pham et al.) | 2022 | New dataset | N/A | Domain extension for Vietnamese POS |
|
| 105 |
|
| 106 |
+
### Missing Citations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
|
| 108 |
+
- **Nguyen, Nguyen, & Nguyen (AAAI 2025)**: "Vietnamese Words Are Not Constructed from Syllables" -- directly challenges the syllable-based BIO tagging used in TRE-1's word segmentation. Should be discussed.
|
| 109 |
+
- **Pham et al. (2022)**: "Introducing a Large-Scale Dataset for Vietnamese POS Tagging on Conversational Texts" -- relevant to Limitation 3 (domain coverage).
|
| 110 |
|
| 111 |
+
### SOTA Verification
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
|
| 113 |
+
- **POS tagging SOTA**: Claimed ViDeBERTa-large 97.2% -- **Confirmed** (Table 2 of arXiv:2301.10439)
|
| 114 |
+
- **WS non-neural SOTA**: Claimed UITws-v1 98.06% -- **Confirmed**, still best non-neural as of 2026
|
| 115 |
+
- **DP SOTA**: Claimed PhoNLP 85.47% UAS -- **Approximately confirmed** (84.95-85.18% in some reports; exact figure may depend on evaluation split)
|
| 116 |
+
- **VnMarMoT best CRF**: Claimed 95.88% -- **Confirmed**
|
| 117 |
|
| 118 |
---
|
| 119 |
|
| 120 |
## Questions for Authors
|
| 121 |
|
| 122 |
+
1. Have you evaluated TRE-1 on VLSP 2013 for either WS or POS? If not, what prevents this evaluation? The comparison tables would be significantly stronger with same-benchmark results.
|
| 123 |
|
| 124 |
+
2. What is the estimated annotation quality of UDD-1? Even a small manual verification sample (e.g., 100 sentences) would help assess whether the 95.89% accuracy reflects linguistic correctness or toolkit agreement.
|
| 125 |
|
| 126 |
+
3. How do the 3 dictionary features contribute to POS tagging performance? An ablation removing these features would clarify whether dictionary lookup is essential or marginal.
|
| 127 |
|
| 128 |
+
4. The AAAI 2025 paper by Nguyen et al. argues that syllable-based word segmentation is not appropriate for Vietnamese NLP. How would you position TRE-1's approach in light of this critique?
|
| 129 |
|
| 130 |
+
5. PhoNLP (2021) reports POS tagging accuracy of 96.76% on VLSP 2013, but the research notes reference 96.91% elsewhere. Which is the correct figure?
|
| 131 |
|
| 132 |
---
|
| 133 |
|
| 134 |
## Minor Issues
|
| 135 |
|
| 136 |
+
- Section 5.6 table header: `Accuracy` column has inconsistent alignment markup
|
| 137 |
+
- Section 11.3 example output: "Nam/PUNCT" appears incorrect -- "Nam" in "Viet Nam" should likely be tagged PROPN, not PUNCT. This may indicate a model error worth noting.
|
| 138 |
+
- Appendix B: Vietnamese examples lack diacritics (e.g., "dep" should be "dep", "rat" should be "rat") -- likely intentional for ASCII compatibility but worth noting.
|
| 139 |
+
- Section 4.1: The tagging scheme is described as "BIO" but only B and I tags are used (no O tag). This is technically a BI scheme.
|
| 140 |
+
- Reference 13 (Huang et al., 2015) is an arXiv preprint that was never formally published -- consider noting this.
|
| 141 |
|
| 142 |
---
|
| 143 |
|
| 144 |
## Suggestions for Improvement
|
| 145 |
|
| 146 |
+
### Priority 1: Evaluate on VLSP 2013
|
| 147 |
+
Evaluate both WS and POS on VLSP 2013. This single addition would transform the comparison tables from suggestive to definitive and address the most significant weakness.
|
| 148 |
|
| 149 |
+
### Priority 2: Add feature ablation studies
|
| 150 |
+
Remove feature groups (dictionary, n-grams, context windows) one at a time to show their individual contributions. This would strengthen the feature engineering narrative.
|
| 151 |
|
| 152 |
+
### Priority 3: Quantify UDD-1 annotation quality
|
| 153 |
+
Manually annotate 100-200 sentences and compute agreement with the machine annotations. Report the estimated annotation accuracy.
|
| 154 |
|
| 155 |
+
### Priority 4: Restructure to separate implemented vs planned
|
| 156 |
+
Consider moving Sections 6-7 (planned work) to an extended "Future Work" section. This would prevent the impression that the pipeline is complete.
|
| 157 |
|
| 158 |
+
### Priority 5: Add inference speed benchmarks
|
| 159 |
+
The report claims "fast inference" (Sections 1.2, 3) but provides no latency measurements. Report sentences/second or tokens/second on a reference CPU to substantiate the efficiency claims.
|
| 160 |
|
| 161 |
+
### Priority 6: Discuss ViWordFormer (AAAI 2025)
|
| 162 |
+
Address the recent challenge to syllable-based word segmentation to show awareness of evolving perspectives on Vietnamese word formation.
|
| 163 |
|
| 164 |
+
### Priority 7: Hyperparameter sensitivity
|
| 165 |
+
Show performance across 3-5 different (c1, c2) configurations to demonstrate robustness or motivate the chosen values.
|
|
|
|
|
|
|
| 166 |
|
| 167 |
---
|
| 168 |
|
|
|
|
| 170 |
|
| 171 |
| Priority | Section | Action |
|
| 172 |
|----------|---------|--------|
|
| 173 |
+
| **High** | 4.4, 5.6 | Evaluate on VLSP 2013 for direct comparison |
|
| 174 |
+
| **High** | New | Add feature ablation studies |
|
| 175 |
+
| **High** | 2.1 | Quantify UDD-1 annotation quality |
|
| 176 |
+
| **Medium** | 6, 7 | Restructure: move planned tasks to Future Work |
|
| 177 |
+
| **Medium** | 3, 10 | Add inference speed benchmarks (sentences/sec) |
|
| 178 |
+
| **Medium** | 12 | Cite and discuss ViWordFormer (AAAI 2025) |
|
| 179 |
+
| **Medium** | 8 | Add hyperparameter sensitivity analysis |
|
| 180 |
+
| **Low** | 4.1 | Clarify BI vs BIO tagging scheme |
|
| 181 |
+
| **Low** | 11.3 | Verify example predictions (Nam/PUNCT) |
|
| 182 |
+
| **Low** | App B | Add diacritics to Vietnamese examples |
|
| 183 |
|
| 184 |
---
|
| 185 |
|
| 186 |
+
## Evaluation Checklist
|
| 187 |
+
|
| 188 |
+
### Methodology
|
| 189 |
+
- [x] Research questions clearly stated
|
| 190 |
+
- [x] Methods appropriate for research questions
|
| 191 |
+
- [ ] Baselines appropriate and fairly compared (different datasets)
|
| 192 |
+
- [ ] Statistical significance properly addressed (not reported)
|
| 193 |
+
- [x] Limitations of approach acknowledged
|
| 194 |
+
|
| 195 |
+
### Experiments
|
| 196 |
+
- [x] Datasets properly described (source, size, splits, preprocessing)
|
| 197 |
+
- [x] Evaluation metrics appropriate for the task
|
| 198 |
+
- [x] Training details sufficient for reproduction
|
| 199 |
+
- [ ] Ablation studies or analysis provided
|
| 200 |
+
- [x] Results support the claims made
|
| 201 |
+
|
| 202 |
+
### Presentation
|
| 203 |
+
- [x] Abstract accurately summarizes contributions
|
| 204 |
+
- [x] Introduction motivates the problem
|
| 205 |
+
- [x] Related work comprehensive and fair
|
| 206 |
+
- [x] Figures/tables readable and informative
|
| 207 |
+
- [ ] Conclusion matches actual contributions (overstates pipeline completeness)
|
| 208 |
+
|
| 209 |
+
### Related Work Verification
|
| 210 |
+
- [x] Key prior work on same task is cited
|
| 211 |
+
- [x] Baseline comparisons use current methods
|
| 212 |
+
- [x] SOTA claims are accurate and up-to-date
|
| 213 |
+
- [ ] No significant missing references (AAAI 2025 missing)
|
| 214 |
+
- [x] Fair characterization of competing approaches
|
| 215 |
+
|
| 216 |
+
### Responsible NLP
|
| 217 |
+
- [x] Limitations section present and substantive
|
| 218 |
+
- [ ] Potential negative impacts discussed (not addressed)
|
| 219 |
+
- [ ] Data collection ethics addressed (machine annotation)
|
| 220 |
+
- [ ] Bias considerations mentioned (domain bias not discussed)
|
| 221 |
+
|
| 222 |
+
---
|
| 223 |
+
|
| 224 |
+
## Comparison with Previous Review (January 31, 2026)
|
| 225 |
+
|
| 226 |
+
The report has been substantially improved since the previous review:
|
| 227 |
|
| 228 |
+
| Issue from Previous Review | Status |
|
| 229 |
+
|---------------------------|--------|
|
| 230 |
+
| Missing referenced visualizations (confusion_matrix.png) | **Fixed** -- references now present |
|
| 231 |
+
| Incorrect example predictions (Toi -> PROPN) | **Partially fixed** -- examples updated but Nam/PUNCT may still be incorrect |
|
| 232 |
+
| Limited baseline comparison | **Fixed** -- comprehensive comparison tables added (Sections 4.4, 5.6) |
|
| 233 |
+
| Missing PhoBERT, VnCoreNLP citations | **Fixed** -- both now cited with detailed discussion |
|
| 234 |
+
| Dataset not standard benchmark | **Unchanged** -- still UDD-1 only, VLSP 2013 evaluation remains the top priority |
|
| 235 |
+
| Machine-annotated data concern | **Acknowledged** -- listed in Limitations (Section 13.2) but not quantified |
|
| 236 |
+
| Scope limited to POS only | **Expanded** -- now covers WS (implemented) + chunking/DP (planned) |
|
| 237 |
+
|
| 238 |
+
**New issues identified in this review:**
|
| 239 |
+
- Missing AAAI 2025 citation (ViWordFormer)
|
| 240 |
+
- No feature ablation studies
|
| 241 |
+
- No inference speed measurements
|
| 242 |
+
- Planned tasks create misleading impression of completeness
|
| 243 |
+
|
| 244 |
+
---
|
| 245 |
+
|
| 246 |
+
## Reference Links
|
| 247 |
|
| 248 |
+
- [ViDeBERTa (EACL 2023)](https://aclanthology.org/2023.findings-eacl.79/) -- Verified 97.2% POS accuracy
|
| 249 |
+
- [ViDeBERTa arXiv](https://arxiv.org/abs/2301.10439) -- Table 2 confirms exact figures
|
| 250 |
+
- [ViWordFormer (AAAI 2025)](https://ojs.aaai.org/index.php/AAAI/article/view/34581) -- Challenges syllable-based WS
|
| 251 |
+
- [NLP-Vietnamese-progress](https://github.com/undertheseanlp/NLP-Vietnamese-progress) -- Benchmark tracking
|
| 252 |
+
- [VnCoreNLP](https://github.com/vncorenlp/VnCoreNLP) -- VnMarMoT 95.88%
|
| 253 |
+
- [PhoBERT](https://github.com/VinAIResearch/PhoBERT) -- 96.8% POS accuracy
|
| 254 |
+
- [UITws-v1](https://github.com/vuducnguyen/UITws-v1) -- 98.06% WS F1
|
| 255 |
+
- [PhoNLP (NAACL 2021)](https://aclanthology.org/2021.naacl-demos.1/) -- 85.47% UAS
|
| 256 |
+
- [UDD-1 Dataset](https://huggingface.co/datasets/undertheseanlp/UDD-1) -- Training data
|
| 257 |
+
- [VLSP 2013 Resources](https://vlsp.org.vn/resources-vlsp2013) -- Standard benchmark
|
| 258 |
|
| 259 |
---
|
| 260 |
|
| 261 |
+
*Review conducted following ACL Rolling Review guidelines.*
|
| 262 |
+
*SOTA claims verified against published results (arXiv:2301.10439, NAACL 2021, PACLING 2019).*
|
datasets/c7veardo0e/test.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
datasets/c7veardo0e/train.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba7e6eeaae21b56965ceb92b01912f4ccb6b454b9cfa6c8206f80454cdc97fa8
|
| 3 |
+
size 20669392
|
models/word_segmentation/ablation/all-bigram/metadata.yaml
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- type
|
| 21 |
+
- morphology
|
| 22 |
+
- left
|
| 23 |
+
- right
|
| 24 |
+
- trigram
|
| 25 |
+
num_feature_templates: 18
|
| 26 |
+
feature_templates:
|
| 27 |
+
- S[0]
|
| 28 |
+
- S[0].lower
|
| 29 |
+
- S[0].istitle
|
| 30 |
+
- S[0].isupper
|
| 31 |
+
- S[0].isdigit
|
| 32 |
+
- S[0].ispunct
|
| 33 |
+
- S[0].len
|
| 34 |
+
- S[0].prefix2
|
| 35 |
+
- S[0].suffix2
|
| 36 |
+
- S[-1]
|
| 37 |
+
- S[-1].lower
|
| 38 |
+
- S[-2]
|
| 39 |
+
- S[-2].lower
|
| 40 |
+
- S[1]
|
| 41 |
+
- S[1].lower
|
| 42 |
+
- S[2]
|
| 43 |
+
- S[2].lower
|
| 44 |
+
- S[-1,0,1]
|
| 45 |
+
duration_seconds: 289.31
|
| 46 |
+
performance:
|
| 47 |
+
syllable_accuracy: 0.9684
|
| 48 |
+
syllable_f1: 0.9682
|
| 49 |
+
word_precision: 0.9356
|
| 50 |
+
word_recall: 0.9508
|
| 51 |
+
word_f1: 0.9431
|
| 52 |
+
environment:
|
| 53 |
+
platform: Linux
|
| 54 |
+
cpu_model: Unknown
|
| 55 |
+
python_version: 3.12.3
|
| 56 |
+
created_at: '2026-02-08 01:36:16'
|
| 57 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/all-bigram/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:453aa7e73c036c15279f03f408359d50bf6e3dc5d8fc5a09226fb6ec97b19a50
|
| 3 |
+
size 89880808
|
models/word_segmentation/ablation/all-left/metadata.yaml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- type
|
| 21 |
+
- morphology
|
| 22 |
+
- right
|
| 23 |
+
- bigram
|
| 24 |
+
- trigram
|
| 25 |
+
num_feature_templates: 16
|
| 26 |
+
feature_templates:
|
| 27 |
+
- S[0]
|
| 28 |
+
- S[0].lower
|
| 29 |
+
- S[0].istitle
|
| 30 |
+
- S[0].isupper
|
| 31 |
+
- S[0].isdigit
|
| 32 |
+
- S[0].ispunct
|
| 33 |
+
- S[0].len
|
| 34 |
+
- S[0].prefix2
|
| 35 |
+
- S[0].suffix2
|
| 36 |
+
- S[1]
|
| 37 |
+
- S[1].lower
|
| 38 |
+
- S[2]
|
| 39 |
+
- S[2].lower
|
| 40 |
+
- S[-1,0]
|
| 41 |
+
- S[0,1]
|
| 42 |
+
- S[-1,0,1]
|
| 43 |
+
duration_seconds: 285.8
|
| 44 |
+
performance:
|
| 45 |
+
syllable_accuracy: 0.9783
|
| 46 |
+
syllable_f1: 0.9782
|
| 47 |
+
word_precision: 0.9504
|
| 48 |
+
word_recall: 0.969
|
| 49 |
+
word_f1: 0.9596
|
| 50 |
+
environment:
|
| 51 |
+
platform: Linux
|
| 52 |
+
cpu_model: Unknown
|
| 53 |
+
python_version: 3.12.3
|
| 54 |
+
created_at: '2026-02-08 01:26:27'
|
| 55 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/all-left/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0aca9363bed4fe3645b095328c88da501a8c4eca82cfd2010379a117ced4855a
|
| 3 |
+
size 133976612
|
models/word_segmentation/ablation/all-morphology/metadata.yaml
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- type
|
| 21 |
+
- left
|
| 22 |
+
- right
|
| 23 |
+
- bigram
|
| 24 |
+
- trigram
|
| 25 |
+
num_feature_templates: 18
|
| 26 |
+
feature_templates:
|
| 27 |
+
- S[0]
|
| 28 |
+
- S[0].lower
|
| 29 |
+
- S[0].istitle
|
| 30 |
+
- S[0].isupper
|
| 31 |
+
- S[0].isdigit
|
| 32 |
+
- S[0].ispunct
|
| 33 |
+
- S[0].len
|
| 34 |
+
- S[-1]
|
| 35 |
+
- S[-1].lower
|
| 36 |
+
- S[-2]
|
| 37 |
+
- S[-2].lower
|
| 38 |
+
- S[1]
|
| 39 |
+
- S[1].lower
|
| 40 |
+
- S[2]
|
| 41 |
+
- S[2].lower
|
| 42 |
+
- S[-1,0]
|
| 43 |
+
- S[0,1]
|
| 44 |
+
- S[-1,0,1]
|
| 45 |
+
duration_seconds: 339.72
|
| 46 |
+
performance:
|
| 47 |
+
syllable_accuracy: 0.985
|
| 48 |
+
syllable_f1: 0.9849
|
| 49 |
+
word_precision: 0.966
|
| 50 |
+
word_recall: 0.9769
|
| 51 |
+
word_f1: 0.9714
|
| 52 |
+
environment:
|
| 53 |
+
platform: Linux
|
| 54 |
+
cpu_model: Unknown
|
| 55 |
+
python_version: 3.12.3
|
| 56 |
+
created_at: '2026-02-08 01:21:36'
|
| 57 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/all-morphology/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8a9ae84a273603a1658c0aa45af4d9bcd1211af4c4203daa8295fb55fc091b9
|
| 3 |
+
size 137078948
|
models/word_segmentation/ablation/all-right/metadata.yaml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- type
|
| 21 |
+
- morphology
|
| 22 |
+
- left
|
| 23 |
+
- bigram
|
| 24 |
+
- trigram
|
| 25 |
+
num_feature_templates: 16
|
| 26 |
+
feature_templates:
|
| 27 |
+
- S[0]
|
| 28 |
+
- S[0].lower
|
| 29 |
+
- S[0].istitle
|
| 30 |
+
- S[0].isupper
|
| 31 |
+
- S[0].isdigit
|
| 32 |
+
- S[0].ispunct
|
| 33 |
+
- S[0].len
|
| 34 |
+
- S[0].prefix2
|
| 35 |
+
- S[0].suffix2
|
| 36 |
+
- S[-1]
|
| 37 |
+
- S[-1].lower
|
| 38 |
+
- S[-2]
|
| 39 |
+
- S[-2].lower
|
| 40 |
+
- S[-1,0]
|
| 41 |
+
- S[0,1]
|
| 42 |
+
- S[-1,0,1]
|
| 43 |
+
duration_seconds: 291.64
|
| 44 |
+
performance:
|
| 45 |
+
syllable_accuracy: 0.9843
|
| 46 |
+
syllable_f1: 0.9843
|
| 47 |
+
word_precision: 0.9645
|
| 48 |
+
word_recall: 0.9763
|
| 49 |
+
word_f1: 0.9704
|
| 50 |
+
environment:
|
| 51 |
+
platform: Linux
|
| 52 |
+
cpu_model: Unknown
|
| 53 |
+
python_version: 3.12.3
|
| 54 |
+
created_at: '2026-02-08 01:31:23'
|
| 55 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/all-right/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d002c402ad82dcb6546bb6ea2e1dc1e09b149e534dadba870a4ce7cfea7d5b5
|
| 3 |
+
size 133681248
|
models/word_segmentation/ablation/all-trigram/metadata.yaml
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- type
|
| 21 |
+
- morphology
|
| 22 |
+
- left
|
| 23 |
+
- right
|
| 24 |
+
- bigram
|
| 25 |
+
num_feature_templates: 19
|
| 26 |
+
feature_templates:
|
| 27 |
+
- S[0]
|
| 28 |
+
- S[0].lower
|
| 29 |
+
- S[0].istitle
|
| 30 |
+
- S[0].isupper
|
| 31 |
+
- S[0].isdigit
|
| 32 |
+
- S[0].ispunct
|
| 33 |
+
- S[0].len
|
| 34 |
+
- S[0].prefix2
|
| 35 |
+
- S[0].suffix2
|
| 36 |
+
- S[-1]
|
| 37 |
+
- S[-1].lower
|
| 38 |
+
- S[-2]
|
| 39 |
+
- S[-2].lower
|
| 40 |
+
- S[1]
|
| 41 |
+
- S[1].lower
|
| 42 |
+
- S[2]
|
| 43 |
+
- S[2].lower
|
| 44 |
+
- S[-1,0]
|
| 45 |
+
- S[0,1]
|
| 46 |
+
duration_seconds: 295.52
|
| 47 |
+
performance:
|
| 48 |
+
syllable_accuracy: 0.9849
|
| 49 |
+
syllable_f1: 0.9848
|
| 50 |
+
word_precision: 0.9658
|
| 51 |
+
word_recall: 0.9764
|
| 52 |
+
word_f1: 0.9711
|
| 53 |
+
environment:
|
| 54 |
+
platform: Linux
|
| 55 |
+
cpu_model: Unknown
|
| 56 |
+
python_version: 3.12.3
|
| 57 |
+
created_at: '2026-02-08 01:41:16'
|
| 58 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/all-trigram/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d1bcf80f18f44aa50246480f2223e0f1c8c8a59f478884a14e2132c7f52609e
|
| 3 |
+
size 58544324
|
models/word_segmentation/ablation/all-type/metadata.yaml
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- morphology
|
| 21 |
+
- left
|
| 22 |
+
- right
|
| 23 |
+
- bigram
|
| 24 |
+
- trigram
|
| 25 |
+
num_feature_templates: 15
|
| 26 |
+
feature_templates:
|
| 27 |
+
- S[0]
|
| 28 |
+
- S[0].lower
|
| 29 |
+
- S[0].prefix2
|
| 30 |
+
- S[0].suffix2
|
| 31 |
+
- S[-1]
|
| 32 |
+
- S[-1].lower
|
| 33 |
+
- S[-2]
|
| 34 |
+
- S[-2].lower
|
| 35 |
+
- S[1]
|
| 36 |
+
- S[1].lower
|
| 37 |
+
- S[2]
|
| 38 |
+
- S[2].lower
|
| 39 |
+
- S[-1,0]
|
| 40 |
+
- S[0,1]
|
| 41 |
+
- S[-1,0,1]
|
| 42 |
+
duration_seconds: 318.8
|
| 43 |
+
performance:
|
| 44 |
+
syllable_accuracy: 0.9853
|
| 45 |
+
syllable_f1: 0.9852
|
| 46 |
+
word_precision: 0.9668
|
| 47 |
+
word_recall: 0.9769
|
| 48 |
+
word_f1: 0.9718
|
| 49 |
+
environment:
|
| 50 |
+
platform: Linux
|
| 51 |
+
cpu_model: Unknown
|
| 52 |
+
python_version: 3.12.3
|
| 53 |
+
created_at: '2026-02-08 01:15:52'
|
| 54 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/all-type/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f67cc2ae135e7e9ff00eb671c74593ca2b6bd97db2d8af7d8d3b9b2f539f0a2d
|
| 3 |
+
size 137443024
|
models/word_segmentation/ablation/form+ctx+bi+type+morph/metadata.yaml
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- type
|
| 21 |
+
- morphology
|
| 22 |
+
- left
|
| 23 |
+
- right
|
| 24 |
+
- bigram
|
| 25 |
+
num_feature_templates: 19
|
| 26 |
+
feature_templates:
|
| 27 |
+
- S[0]
|
| 28 |
+
- S[0].lower
|
| 29 |
+
- S[0].istitle
|
| 30 |
+
- S[0].isupper
|
| 31 |
+
- S[0].isdigit
|
| 32 |
+
- S[0].ispunct
|
| 33 |
+
- S[0].len
|
| 34 |
+
- S[0].prefix2
|
| 35 |
+
- S[0].suffix2
|
| 36 |
+
- S[-1]
|
| 37 |
+
- S[-1].lower
|
| 38 |
+
- S[-2]
|
| 39 |
+
- S[-2].lower
|
| 40 |
+
- S[1]
|
| 41 |
+
- S[1].lower
|
| 42 |
+
- S[2]
|
| 43 |
+
- S[2].lower
|
| 44 |
+
- S[-1,0]
|
| 45 |
+
- S[0,1]
|
| 46 |
+
duration_seconds: 313.36
|
| 47 |
+
performance:
|
| 48 |
+
syllable_accuracy: 0.9849
|
| 49 |
+
syllable_f1: 0.9848
|
| 50 |
+
word_precision: 0.9658
|
| 51 |
+
word_recall: 0.9764
|
| 52 |
+
word_f1: 0.9711
|
| 53 |
+
environment:
|
| 54 |
+
platform: Linux
|
| 55 |
+
cpu_model: Unknown
|
| 56 |
+
python_version: 3.12.3
|
| 57 |
+
created_at: '2026-02-08 01:59:05'
|
| 58 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/form+ctx+bi+type+morph/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f443068f8e8221faef5f93038b84d8b3f955f2902b165e77f8e78b921c61120
|
| 3 |
+
size 58544324
|
models/word_segmentation/ablation/form+ctx+bi+type/metadata.yaml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- type
|
| 21 |
+
- left
|
| 22 |
+
- right
|
| 23 |
+
- bigram
|
| 24 |
+
num_feature_templates: 17
|
| 25 |
+
feature_templates:
|
| 26 |
+
- S[0]
|
| 27 |
+
- S[0].lower
|
| 28 |
+
- S[0].istitle
|
| 29 |
+
- S[0].isupper
|
| 30 |
+
- S[0].isdigit
|
| 31 |
+
- S[0].ispunct
|
| 32 |
+
- S[0].len
|
| 33 |
+
- S[-1]
|
| 34 |
+
- S[-1].lower
|
| 35 |
+
- S[-2]
|
| 36 |
+
- S[-2].lower
|
| 37 |
+
- S[1]
|
| 38 |
+
- S[1].lower
|
| 39 |
+
- S[2]
|
| 40 |
+
- S[2].lower
|
| 41 |
+
- S[-1,0]
|
| 42 |
+
- S[0,1]
|
| 43 |
+
duration_seconds: 271.25
|
| 44 |
+
performance:
|
| 45 |
+
syllable_accuracy: 0.9847
|
| 46 |
+
syllable_f1: 0.9846
|
| 47 |
+
word_precision: 0.9656
|
| 48 |
+
word_recall: 0.9761
|
| 49 |
+
word_f1: 0.9708
|
| 50 |
+
environment:
|
| 51 |
+
platform: Linux
|
| 52 |
+
cpu_model: Unknown
|
| 53 |
+
python_version: 3.12.3
|
| 54 |
+
created_at: '2026-02-08 01:53:48'
|
| 55 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/form+ctx+bi+type/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1525bdada63cf4a1b81c12e5d20eff7d44b077e73947175bba11a536719af766
|
| 3 |
+
size 58177204
|
models/word_segmentation/ablation/form+ctx+bigram/metadata.yaml
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- left
|
| 21 |
+
- right
|
| 22 |
+
- bigram
|
| 23 |
+
num_feature_templates: 12
|
| 24 |
+
feature_templates:
|
| 25 |
+
- S[0]
|
| 26 |
+
- S[0].lower
|
| 27 |
+
- S[-1]
|
| 28 |
+
- S[-1].lower
|
| 29 |
+
- S[-2]
|
| 30 |
+
- S[-2].lower
|
| 31 |
+
- S[1]
|
| 32 |
+
- S[1].lower
|
| 33 |
+
- S[2]
|
| 34 |
+
- S[2].lower
|
| 35 |
+
- S[-1,0]
|
| 36 |
+
- S[0,1]
|
| 37 |
+
duration_seconds: 229.42
|
| 38 |
+
performance:
|
| 39 |
+
syllable_accuracy: 0.9844
|
| 40 |
+
syllable_f1: 0.9844
|
| 41 |
+
word_precision: 0.9648
|
| 42 |
+
word_recall: 0.9754
|
| 43 |
+
word_f1: 0.9701
|
| 44 |
+
environment:
|
| 45 |
+
platform: Linux
|
| 46 |
+
cpu_model: Unknown
|
| 47 |
+
python_version: 3.12.3
|
| 48 |
+
created_at: '2026-02-08 01:49:13'
|
| 49 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/form+ctx+bigram/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:82773585654ebd7e926cc072fde4760941ce2e002f97bccad3fca68dbe3c378f
|
| 3 |
+
size 58180040
|
models/word_segmentation/ablation/form+left+right/metadata.yaml
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- left
|
| 21 |
+
- right
|
| 22 |
+
num_feature_templates: 10
|
| 23 |
+
feature_templates:
|
| 24 |
+
- S[0]
|
| 25 |
+
- S[0].lower
|
| 26 |
+
- S[-1]
|
| 27 |
+
- S[-1].lower
|
| 28 |
+
- S[-2]
|
| 29 |
+
- S[-2].lower
|
| 30 |
+
- S[1]
|
| 31 |
+
- S[1].lower
|
| 32 |
+
- S[2]
|
| 33 |
+
- S[2].lower
|
| 34 |
+
duration_seconds: 115.47
|
| 35 |
+
performance:
|
| 36 |
+
syllable_accuracy: 0.9585
|
| 37 |
+
syllable_f1: 0.9583
|
| 38 |
+
word_precision: 0.9159
|
| 39 |
+
word_recall: 0.9345
|
| 40 |
+
word_f1: 0.9251
|
| 41 |
+
environment:
|
| 42 |
+
platform: Linux
|
| 43 |
+
cpu_model: Unknown
|
| 44 |
+
python_version: 3.12.3
|
| 45 |
+
created_at: '2026-02-08 01:45:20'
|
| 46 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/form+left+right/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:601431e3e3727d6fe8262832128a4f48568ec1f2d61623864f02f9cab96750cc
|
| 3 |
+
size 10422468
|
models/word_segmentation/ablation/form+left/metadata.yaml
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- left
|
| 21 |
+
num_feature_templates: 6
|
| 22 |
+
feature_templates:
|
| 23 |
+
- S[0]
|
| 24 |
+
- S[0].lower
|
| 25 |
+
- S[-1]
|
| 26 |
+
- S[-1].lower
|
| 27 |
+
- S[-2]
|
| 28 |
+
- S[-2].lower
|
| 29 |
+
duration_seconds: 76.77
|
| 30 |
+
performance:
|
| 31 |
+
syllable_accuracy: 0.956
|
| 32 |
+
syllable_f1: 0.9556
|
| 33 |
+
word_precision: 0.9101
|
| 34 |
+
word_recall: 0.9331
|
| 35 |
+
word_f1: 0.9215
|
| 36 |
+
environment:
|
| 37 |
+
platform: Linux
|
| 38 |
+
cpu_model: Unknown
|
| 39 |
+
python_version: 3.12.3
|
| 40 |
+
created_at: '2026-02-08 01:43:22'
|
| 41 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/form+left/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a84db03c6620314e82aa04580cbfb48ced38e4463bbcba8c8e54ff1efab208c
|
| 3 |
+
size 6418608
|
models/word_segmentation/ablation/form_only/metadata.yaml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
num_feature_templates: 2
|
| 21 |
+
feature_templates:
|
| 22 |
+
- S[0]
|
| 23 |
+
- S[0].lower
|
| 24 |
+
duration_seconds: 43.31
|
| 25 |
+
performance:
|
| 26 |
+
syllable_accuracy: 0.8356
|
| 27 |
+
syllable_f1: 0.8315
|
| 28 |
+
word_precision: 0.7146
|
| 29 |
+
word_recall: 0.7648
|
| 30 |
+
word_f1: 0.7388
|
| 31 |
+
environment:
|
| 32 |
+
platform: Linux
|
| 33 |
+
cpu_model: Unknown
|
| 34 |
+
python_version: 3.12.3
|
| 35 |
+
created_at: '2026-02-08 01:42:03'
|
| 36 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/form_only/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a63cf9d9fc35d64e3559b38397fbc110ffff47f6fa199c5eab7ecd2c2be733e8
|
| 3 |
+
size 2475944
|
models/word_segmentation/ablation/full/metadata.yaml
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- type
|
| 21 |
+
- morphology
|
| 22 |
+
- left
|
| 23 |
+
- right
|
| 24 |
+
- bigram
|
| 25 |
+
- trigram
|
| 26 |
+
num_feature_templates: 20
|
| 27 |
+
feature_templates:
|
| 28 |
+
- S[0]
|
| 29 |
+
- S[0].lower
|
| 30 |
+
- S[0].istitle
|
| 31 |
+
- S[0].isupper
|
| 32 |
+
- S[0].isdigit
|
| 33 |
+
- S[0].ispunct
|
| 34 |
+
- S[0].len
|
| 35 |
+
- S[0].prefix2
|
| 36 |
+
- S[0].suffix2
|
| 37 |
+
- S[-1]
|
| 38 |
+
- S[-1].lower
|
| 39 |
+
- S[-2]
|
| 40 |
+
- S[-2].lower
|
| 41 |
+
- S[1]
|
| 42 |
+
- S[1].lower
|
| 43 |
+
- S[2]
|
| 44 |
+
- S[2].lower
|
| 45 |
+
- S[-1,0]
|
| 46 |
+
- S[0,1]
|
| 47 |
+
- S[-1,0,1]
|
| 48 |
+
duration_seconds: 408.33
|
| 49 |
+
performance:
|
| 50 |
+
syllable_accuracy: 0.9852
|
| 51 |
+
syllable_f1: 0.9851
|
| 52 |
+
word_precision: 0.9664
|
| 53 |
+
word_recall: 0.977
|
| 54 |
+
word_f1: 0.9717
|
| 55 |
+
environment:
|
| 56 |
+
platform: Linux
|
| 57 |
+
cpu_model: Unknown
|
| 58 |
+
python_version: 3.12.3
|
| 59 |
+
created_at: '2026-02-08 01:10:29'
|
| 60 |
+
author: undertheseanlp
|
models/word_segmentation/ablation/full/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a6f7c927e599b5d6f223a455e7132d37ae28220b0723f2693d05565b2dcc462d
|
| 3 |
+
size 137434620
|
models/word_segmentation/vlsp2013/metadata.yaml
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
name: Vietnamese Word Segmentation
|
| 3 |
+
type: CRF (Conditional Random Field)
|
| 4 |
+
framework: underthesea-core
|
| 5 |
+
tagging_scheme: BIO
|
| 6 |
+
training:
|
| 7 |
+
dataset: VLSP-2013-WTK
|
| 8 |
+
train_sentences: 75389
|
| 9 |
+
train_syllables: 2193827
|
| 10 |
+
val_sentences: 0
|
| 11 |
+
val_syllables: 0
|
| 12 |
+
test_sentences: 2120
|
| 13 |
+
test_syllables: 96457
|
| 14 |
+
hyperparameters:
|
| 15 |
+
c1: 1.0
|
| 16 |
+
c2: 0.001
|
| 17 |
+
max_iterations: 100
|
| 18 |
+
feature_groups:
|
| 19 |
+
- form
|
| 20 |
+
- type
|
| 21 |
+
- morphology
|
| 22 |
+
- left
|
| 23 |
+
- right
|
| 24 |
+
- bigram
|
| 25 |
+
- trigram
|
| 26 |
+
num_feature_templates: 20
|
| 27 |
+
feature_templates:
|
| 28 |
+
- S[0]
|
| 29 |
+
- S[0].lower
|
| 30 |
+
- S[0].istitle
|
| 31 |
+
- S[0].isupper
|
| 32 |
+
- S[0].isdigit
|
| 33 |
+
- S[0].ispunct
|
| 34 |
+
- S[0].len
|
| 35 |
+
- S[0].prefix2
|
| 36 |
+
- S[0].suffix2
|
| 37 |
+
- S[-1]
|
| 38 |
+
- S[-1].lower
|
| 39 |
+
- S[-2]
|
| 40 |
+
- S[-2].lower
|
| 41 |
+
- S[1]
|
| 42 |
+
- S[1].lower
|
| 43 |
+
- S[2]
|
| 44 |
+
- S[2].lower
|
| 45 |
+
- S[-1,0]
|
| 46 |
+
- S[0,1]
|
| 47 |
+
- S[-1,0,1]
|
| 48 |
+
duration_seconds: 412.7
|
| 49 |
+
performance:
|
| 50 |
+
syllable_accuracy: 0.9852
|
| 51 |
+
syllable_f1: 0.9851
|
| 52 |
+
word_precision: 0.9664
|
| 53 |
+
word_recall: 0.977
|
| 54 |
+
word_f1: 0.9717
|
| 55 |
+
environment:
|
| 56 |
+
platform: Linux
|
| 57 |
+
cpu_model: Unknown
|
| 58 |
+
python_version: 3.12.3
|
| 59 |
+
created_at: '2026-02-08 01:00:36'
|
| 60 |
+
author: undertheseanlp
|
models/word_segmentation/vlsp2013/model.crf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dac520463652e2fde942bb9ea4ce8661f8fb60c195f041d966cf453c88c59b90
|
| 3 |
+
size 137434620
|
references/2003.naacl.sha/paper.md
ADDED
|
@@ -0,0 +1,1051 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: "Shallow Parsing with Conditional Random Fields"
|
| 3 |
+
authors:
|
| 4 |
+
- "Fei Sha"
|
| 5 |
+
- "Fernando Pereira"
|
| 6 |
+
year: 2003
|
| 7 |
+
venue: "HLT-NAACL 2003"
|
| 8 |
+
url: "https://aclanthology.org/N03-1028/"
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
Proceedings of HLT-NAACL 2003
|
| 13 |
+
Main Papers, pp. 134-141
|
| 14 |
+
Edmonton, May-June 2003
|
| 15 |
+
|
| 16 |
+
# **Shallow Parsing with Conditional Random Fields**
|
| 17 |
+
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
**Fei Sha** and **Fernando Pereira**
|
| 21 |
+
Department of Computer and Information Science
|
| 22 |
+
University of Pennsylvania
|
| 23 |
+
200 South 33rd Street, Philadelphia, PA 19104
|
| 24 |
+
(feisha|pereira)@cis.upenn.edu
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
**Abstract**
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
Conditional random fields for sequence labeling offer advantages over both generative models like HMMs and classifiers applied at each
|
| 32 |
+
sequence position. Among sequence labeling
|
| 33 |
+
tasks in language processing, shallow parsing
|
| 34 |
+
has received much attention, with the development of standard evaluation datasets and extensive comparison among methods. We show
|
| 35 |
+
here how to train a conditional random field to
|
| 36 |
+
achieve performance as good as any reported
|
| 37 |
+
base noun-phrase chunking method on the
|
| 38 |
+
CoNLL task, and better than any reported single model. Improved training methods based
|
| 39 |
+
on modern optimization algorithms were critical in achieving these results. We present extensive comparisons between models and training methods that confirm and strengthen previous results on shallow parsing and training
|
| 40 |
+
methods for maximum-entropy models.
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
**1** **Introduction**
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
Sequence analysis tasks in language and biology are often described as mappings from input sequences to sequences of labels encoding the analysis. In language processing, examples of such tasks include part-of-speech
|
| 47 |
+
tagging, named-entity recognition, and the task we shall
|
| 48 |
+
focus on here, shallow parsing. Shallow parsing identifies the non-recursive cores of various phrase types in
|
| 49 |
+
text, possibly as a precursor to full parsing or information extraction (Abney, 1991). The paradigmatic shallowparsing problem is _NP chunking_, which finds the nonrecursive cores of noun phrases called _base NPs_ . The
|
| 50 |
+
pioneering work of Ramshaw and Marcus (1995) introduced NP chunking as a machine-learning problem,
|
| 51 |
+
with standard datasets and evaluation metrics. The task
|
| 52 |
+
was extended to additional phrase types for the CoNLL2000 shared task (Tjong Kim Sang and Buchholz, 2000),
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
which is now the standard evaluation task for shallow
|
| 57 |
+
parsing.
|
| 58 |
+
Most previous work used two main machine-learning
|
| 59 |
+
approaches to sequence labeling. The first approach relies on k-order generative probabilistic models of paired
|
| 60 |
+
input sequences and label sequences, for instance hidden
|
| 61 |
+
Markov models (HMMs) (Freitag and McCallum, 2000;
|
| 62 |
+
Kupiec, 1992) or multilevel Markov models (Bikel et al.,
|
| 63 |
+
1999). The second approach views the sequence labeling
|
| 64 |
+
problem as a sequence of classification problems, one for
|
| 65 |
+
each of the labels in the sequence. The classification result at each position may depend on the whole input and
|
| 66 |
+
on the previous k classifications. [1]
|
| 67 |
+
|
| 68 |
+
The generative approach provides well-understood
|
| 69 |
+
training and decoding algorithms for HMMs and more
|
| 70 |
+
general graphical models. However, effective generative models require stringent conditional independence
|
| 71 |
+
assumptions. For instance, it is not practical to make the
|
| 72 |
+
label at a given position depend on a window on the input sequence as well as the surrounding labels, since the
|
| 73 |
+
inference problem for the corresponding graphical model
|
| 74 |
+
would be intractable. Non-independent features of the
|
| 75 |
+
inputs, such as capitalization, suffixes, and surrounding
|
| 76 |
+
words, are important in dealing with words unseen in
|
| 77 |
+
training, but they are difficult to represent in generative
|
| 78 |
+
models.
|
| 79 |
+
The sequential classification approach can handle
|
| 80 |
+
many correlated features, as demonstrated in work on
|
| 81 |
+
maximum-entropy (McCallum et al., 2000; Ratnaparkhi,
|
| 82 |
+
1996) and a variety of other linear classifiers, including
|
| 83 |
+
winnow (Punyakanok and Roth, 2001), AdaBoost (Abney et al., 1999), and support-vector machines (Kudo and
|
| 84 |
+
Matsumoto, 2001). Furthermore, they are trained to minimize some function related to labeling error, leading to
|
| 85 |
+
smaller error in practice if enough training data are available. In contrast, generative models are trained to maximize the joint probability of the training data, which is
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
1Ramshaw and Marcus (1995) used transformation-based
|
| 89 |
+
learning (Brill, 1995), which for the present purposes can be
|
| 90 |
+
tought of as a classification-based method.
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
not as closely tied to the accuracy metrics of interest if the
|
| 94 |
+
actual data was not generated by the model, as is always
|
| 95 |
+
the case in practice.
|
| 96 |
+
However, since sequential classifiers are trained to
|
| 97 |
+
make the best local decision, unlike generative models they cannot trade off decisions at different positions
|
| 98 |
+
against each other. In other words, sequential classifiers
|
| 99 |
+
are myopic about the impact of their current decision
|
| 100 |
+
on later decisions (Bottou, 1991; Lafferty et al., 2001).
|
| 101 |
+
This forced the best sequential classifier systems to resort to heuristic combinations of forward-moving and
|
| 102 |
+
backward-moving sequential classifiers (Kudo and Matsumoto, 2001).
|
| 103 |
+
Conditional random fields (CRFs) bring together the
|
| 104 |
+
best of generative and classification models. Like classification models, they can accommodate many statistically
|
| 105 |
+
correlated features of the inputs, and they are trained discriminatively. But like generative models, they can trade
|
| 106 |
+
off decisions at different sequence positions to obtain a
|
| 107 |
+
globally optimal labeling. Lafferty et al. (2001) showed
|
| 108 |
+
that CRFs beat related classification models as well as
|
| 109 |
+
HMMs on synthetic data and on a part-of-speech tagging
|
| 110 |
+
task.
|
| 111 |
+
In the present work, we show that CRFs beat all reported single-model NP chunking results on the standard
|
| 112 |
+
evaluation dataset, and are statistically indistinguishable
|
| 113 |
+
from the previous best performer, a voting arrangement of
|
| 114 |
+
24 forward- and backward-looking support-vector classifiers (Kudo and Matsumoto, 2001). To obtain these
|
| 115 |
+
results, we had to abandon the original iterative scaling CRF training algorithm for convex optimization algorithms with better convergence properties. We provide
|
| 116 |
+
detailed comparisons between training methods.
|
| 117 |
+
The generalized perceptron proposed by Collins
|
| 118 |
+
(2002) is closely related to CRFs, but the best CRF training methods seem to have a slight edge over the generalized perceptron.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
**2** **Conditional Random Fields**
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
We focus here on conditional random fields on sequences,
|
| 125 |
+
although the notion can be used more generally (Lafferty et al., 2001; Taskar et al., 2002). Such CRFs define
|
| 126 |
+
conditional probability distributions p(Y |X) of label sequences given input sequences. We assume that the random variable sequences X and Y have the same length,
|
| 127 |
+
and use x = x1 · · · xn and y = y1 · · · yn for the generic
|
| 128 |
+
input sequence and label sequence, respectively.
|
| 129 |
+
A CRF on (X, Y ) is specified by a vector f of _local_
|
| 130 |
+
_features_ and a corresponding _weight vector_ λ. Each local
|
| 131 |
+
feature is either a _state feature_ s(y, x, i) or a _transition_
|
| 132 |
+
_feature_ t(y, y [′], x, i), where y, y [′] are labels, x an input
|
| 133 |
+
sequence, and i an input position. To make the notation
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
more uniform, we also write
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
s(y, y [′], x, i) = s(y [′], x, i)
|
| 141 |
+
s(y, x, i) = s�(yi, x, i)
|
| 142 |
+
|
| 143 |
+
t(y, x, i) = t(yi−1, yi, x, i) i > 1
|
| 144 |
+
0 i = 1
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
for any state feature s and transition feature t. Typically,
|
| 148 |
+
features depend on the inputs around the given position,
|
| 149 |
+
although they may also depend on global properties of the
|
| 150 |
+
input, or be non-zero only at some positions, for instance
|
| 151 |
+
features that pick out the first or last labels.
|
| 152 |
+
The CRF’s _global feature vector_ for input sequence x
|
| 153 |
+
and label sequence y is given by
|
| 154 |
+
|
| 155 |
+
F (y, x) = f (y, x, i)
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
i
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
where i ranges over input positions. The conditional
|
| 162 |
+
probability distribution defined by the CRF is then
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
pλ(Y |X) = [exp][ λ][ ·][ F][ (][Y][,][ X][)] (1)
|
| 166 |
+
|
| 167 |
+
Zλ(X)
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
where Zλ(x) = exp λ · F (y, x)
|
| 172 |
+
|
| 173 |
+
|
| 174 |
+
y
|
| 175 |
+
|
| 176 |
+
Any positive conditional distribution p(Y |X) that obeys
|
| 177 |
+
the _Markov property_
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
p(Yi|{Yj}j=i, X) = p(Yi|Yi−1, Yi+1, X)
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
can be written in the form (1) for appropriate choice of
|
| 184 |
+
feature functions and weight vector (Hammersley and
|
| 185 |
+
Clifford, 1971).
|
| 186 |
+
The most probable label sequence for input sequence
|
| 187 |
+
x is
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
yˆ = arg max pλ(y|x) = arg max λ · F (y, x)
|
| 191 |
+
y y
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
because Zλ(x) does not depend on y. F (y, x) decomposes into a sum of terms for consecutive pairs of labels,
|
| 195 |
+
so the most likely y can be found with the Viterbi algorithm.
|
| 196 |
+
We train a CRF by maximizing the log-likelihood of a
|
| 197 |
+
given training set T = {(xk, yk)} [N] k=1 [, which we assume]
|
| 198 |
+
fixed for the rest of this section:
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
|
| 203 |
+
Lλ = �k [log][ p][λ][(][y] k [|][x][k][)]
|
| 204 |
+
= [[][λ][ ·][ F][ (][y] [,][ x][k]
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
k [[][λ][ ·][ F][ (][y] k [,][ x][k][)][ −] [log][ Z][λ][(][x][k][)]]
|
| 209 |
+
|
| 210 |
+
|
| 211 |
+
|
| 212 |
+
To perform this optimization, we seek the zero of the gradient
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
∇Lλ =
|
| 217 |
+
|
| 218 |
+
|
| 219 |
+
|
| 220 |
+
k
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
- F (yk, xk) − Epλ(Y |xk )F (Y, xk) (2)
|
| 226 |
+
|
| 227 |
+
|
| 228 |
+
In words, the maximum of the training data likelihood
|
| 229 |
+
is reached when the empirical average of the global feature vector equals its model expectation. The expectation
|
| 230 |
+
Epλ(Y |x)F (Y, x) can be computed efficiently using a
|
| 231 |
+
variant of the forward-backward algorithm. For a given
|
| 232 |
+
x, define the _transition matrix_ for position i as
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
Mi[y, y [′] ] = exp λ · f (y, y [′], x, i)
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
Let f be any local feature,� fi[y, y [′] ] = f (y, y [′], x, i),
|
| 239 |
+
F (y, x) = i [f] [(][y][i][−][1][, y][i][,][ x][, i][)][, and let][ ∗] [denote]
|
| 240 |
+
|
| 241 |
+
component-wise matrix product. Then
|
| 242 |
+
|
| 243 |
+
Epλ(Y |x)F (Y, x) = pλ(y|x)F (y, x)
|
| 244 |
+
|
| 245 |
+
y
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
=
|
| 251 |
+
|
| 252 |
+
|
| 253 |
+
i
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
αi−1(fi ∗ Mi)β [⊤] i
|
| 258 |
+
Zλ(x)
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
Zλ(x) = αn · 1 [⊤]
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
where αi and βi the forward and backward state-cost
|
| 266 |
+
vectors defined by
|
| 267 |
+
|
| 268 |
+
αi = α1 i−1Mi i0 = 0 < i ≤ n
|
| 269 |
+
|
| 270 |
+
β [⊤] i = M1 i+1β [⊤] i+1 i1 = ≤ ni < n
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
Therefore, we can use a forward pass to compute the αi
|
| 274 |
+
and a backward bass to compute the βi and accumulate
|
| 275 |
+
the feature expectations.
|
| 276 |
+
To avoid overfitting, we penalize the likelihood with
|
| 277 |
+
a spherical Gaussian weight prior (Chen and Rosenfeld,
|
| 278 |
+
1999):
|
| 279 |
+
|
| 280 |
+
L [′] λ [=] [λ · F (yk, xk) �� log Zλ(xk)]
|
| 281 |
+
|
| 282 |
+
k
|
| 283 |
+
|
| 284 |
+
- [∥][λ][∥][2]
|
| 285 |
+
|
| 286 |
+
2σ [2][ +][ const]
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
with gradient
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
∇L [′] λ [=]
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
k
|
| 298 |
+
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
- F (yk, xk) − Epλ(Y |xk )F (Y, xk) - σ [λ][2]
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
**3** **Training Methods**
|
| 307 |
+
|
| 308 |
+
Lafferty et al. (2001) used iterative scaling algorithms
|
| 309 |
+
for CRF training, following earlier work on maximumentropy models for natural language (Berger et al., 1996;
|
| 310 |
+
Della Pietra et al., 1997). Those methods are very simple and guaranteed to converge, but as Minka (2001) and
|
| 311 |
+
Malouf (2002) showed for classification, their convergence is much slower than that of general-purposeconvex
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
|
| 315 |
+
optimization algorithms when many correlated features
|
| 316 |
+
are involved. Concurrently with the present work, Wallach (2002) tested conjugate gradient and second-order
|
| 317 |
+
methods for CRF training, showing significant training
|
| 318 |
+
speed advantages over iterative scaling on a small shallow parsing problem. Our work shows that preconditioned conjugate-gradient (CG) (Shewchuk, 1994) or
|
| 319 |
+
limited-memory quasi-Newton (L-BFGS) (Nocedal and
|
| 320 |
+
Wright, 1999) perform comparably on very large problems (around 3.8 million features). We compare those
|
| 321 |
+
algorithms to generalized iterative scaling (GIS) (Darroch and Ratcliff, 1972), non-preconditioned CG, and
|
| 322 |
+
voted perceptron training (Collins, 2002). All algorithms
|
| 323 |
+
except voted perceptron maximize the penalized loglikelihood: λ [∗] = arg maxλ Lλ [′] [. However, for ease of]
|
| 324 |
+
exposition, this discussion of training methods uses the
|
| 325 |
+
unpenalized log-likelihood Lλ.
|
| 326 |
+
|
| 327 |
+
|
| 328 |
+
**3.1** **Preconditioned Conjugate Gradient**
|
| 329 |
+
|
| 330 |
+
Conjugate-gradient (CG) methods have been shown to
|
| 331 |
+
be very effective in linear and non-linear optimization
|
| 332 |
+
(Shewchuk, 1994). Instead of searching along the gradient, conjugate gradient searches along a carefully chosen linear combination of the gradient and the previous
|
| 333 |
+
search direction.
|
| 334 |
+
CG methods can be accelerated by linearly transforming the variables with _preconditioner_ (Nocedal and
|
| 335 |
+
Wright, 1999; Shewchuk, 1994). The purpose of the preconditioner is to improve the condition number of the
|
| 336 |
+
quadratic form that locally approximates the objective
|
| 337 |
+
function, so the inverse of Hessian is reasonable preconditioner. However, this is not applicable to CRFs for two
|
| 338 |
+
reasons. First, the size of the Hessian is dim(λ) [2], leading to unacceptable space and time requirements for the
|
| 339 |
+
inversion. In such situations, it is common to use instead
|
| 340 |
+
the (inverse of) the diagonal of the Hessian. However in
|
| 341 |
+
our case the Hessian has the form
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
def
|
| 345 |
+
Hλ = ∇ [2] �Lλ
|
| 346 |
+
= - {E [F (Y, xk) × F (Y, xk)]
|
| 347 |
+
|
| 348 |
+
|
| 349 |
+
k
|
| 350 |
+
|
| 351 |
+
−EF (Y, xk) × EF (Y, xk)}
|
| 352 |
+
|
| 353 |
+
|
| 354 |
+
where the expectations are taken with respect to
|
| 355 |
+
pλ(Y |xk). Therefore, every Hessian element, including the diagonal ones, involve the expectation of a product of global feature values. Unfortunately, computing
|
| 356 |
+
those expectations is quadratic on sequence length, as the
|
| 357 |
+
forward-backward algorithm can only compute expectations of quantities that are additive along label sequences.
|
| 358 |
+
We solve both problems by discarding the off-diagonal
|
| 359 |
+
terms and approximating expectation of the square of a
|
| 360 |
+
global feature by the expectation of the sum of squares of
|
| 361 |
+
the corresponding local features at each position. The ap
|
| 362 |
+
|
| 363 |
+
proximated diagonal term Hf for feature f has the form
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
Hf = Ef (Y, xk) [2]
|
| 368 |
+
|
| 369 |
+
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
|
| 373 |
+
2
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
|
| 379 |
+
|
| 380 |
+
|
| 381 |
+
i
|
| 382 |
+
|
| 383 |
+
|
| 384 |
+
|
| 385 |
+
[�]
|
| 386 |
+
|
| 387 |
+
|
| 388 |
+
y,y `[′]`
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
|
| 392 |
+
Mi[y, y [′] ]
|
| 393 |
+
|
| 394 |
+
Zλ(x) [f] [(][Y][,][ x][k][)]
|
| 395 |
+
|
| 396 |
+
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
|
| 402 |
+
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
If this approximation is semidefinite, which is trivial to
|
| 406 |
+
check, its inverse is an excellent preconditioner for early
|
| 407 |
+
iterations of CG training. However, when the model is
|
| 408 |
+
close to the maximum, the approximation becomes unstable, which is not surprising since it is based on feature independence assumptions that become invalid as
|
| 409 |
+
the weights of interaction features move away from zero.
|
| 410 |
+
Therefore, we disable the preconditioner after a certain
|
| 411 |
+
number of iterations, determined from held-out data. We
|
| 412 |
+
call this strategy _mixed_ CG training.
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
**3.2** **Limited-Memory Quasi-Newton**
|
| 416 |
+
|
| 417 |
+
Newton methods for nonlinear optimization use secondorder (curvature) information to find search directions.
|
| 418 |
+
As discussed in the previous section, it is not practical to obtain exact curvature information for CRF training. Limited-memory BFGS (L-BFGS) is a second-order
|
| 419 |
+
method that estimates the curvature numerically from
|
| 420 |
+
previous gradients and updates, avoiding the need for
|
| 421 |
+
an exact Hessian inverse computation. Compared with
|
| 422 |
+
preconditioned CG, L-BFGS can also handle large-scale
|
| 423 |
+
problems but does not require a specialized Hessian approximations. An earlier study indicates that L-BFGS
|
| 424 |
+
performs well in maximum-entropy classifier training
|
| 425 |
+
(Malouf, 2002).
|
| 426 |
+
There is no theoretical guidance on how much information from previous steps we should keep to obtain
|
| 427 |
+
sufficiently accurate curvature estimates. In our experiments, storing 3 to 10 pairs of previous gradients and
|
| 428 |
+
updates worked well, so the extra memory required over
|
| 429 |
+
preconditioned CG was modest. A more detailed description of this method can be found elsewhere (Nocedal and
|
| 430 |
+
Wright, 1999).
|
| 431 |
+
|
| 432 |
+
|
| 433 |
+
**3.3** **Voted Perceptron**
|
| 434 |
+
|
| 435 |
+
Unlike other methods discussed so far, voted perceptron
|
| 436 |
+
training (Collins, 2002) attempts to minimize the difference between the global feature vector for a training instance and the same feature vector for the best-scoring
|
| 437 |
+
labeling of that instance according to the current model.
|
| 438 |
+
More precisely, for each training instance the method
|
| 439 |
+
computes a weight update
|
| 440 |
+
|
| 441 |
+
|
| 442 |
+
λt+1 = λt + F (yk, xk) − F (ˆyk, xk) (3)
|
| 443 |
+
|
| 444 |
+
|
| 445 |
+
in which ˆyk is the Viterbi path
|
| 446 |
+
|
| 447 |
+
|
| 448 |
+
yˆk = arg max λt · F (y,xk)
|
| 449 |
+
y
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
|
| 453 |
+
Like the familiar perceptron algorithm, this algorithm repeatedly sweeps over the training instances, updating the
|
| 454 |
+
weight vector as it considers each instance. Instead of
|
| 455 |
+
taking just the final weight vector, the voted perceptron
|
| 456 |
+
algorithm takes the average of the λt. Collins (2002) reported and we confirmed that this averaging reduces overfitting considerably.
|
| 457 |
+
|
| 458 |
+
|
| 459 |
+
**4** **Shallow Parsing**
|
| 460 |
+
|
| 461 |
+
Figure 1 shows the base NPs in an example sentence. Following Ramshaw and Marcus (1995), the input to the
|
| 462 |
+
NP chunker consists of the words in a sentence annotated automatically with part-of-speech (POS) tags. The
|
| 463 |
+
chunker’s task is to label each word with a label indicating whether the word is outside a chunk (O), starts
|
| 464 |
+
a chunk (B), or continues a chunk (I). For example,
|
| 465 |
+
the tokens in first line of Figure 1 would be labeled
|
| 466 |
+
BIIBIIOBOBIIO.
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
**4.1** **Data Preparation**
|
| 470 |
+
|
| 471 |
+
NP chunking results have been reported on two slightly
|
| 472 |
+
different data sets: the original RM data set of Ramshaw
|
| 473 |
+
and Marcus (1995), and the modified CoNLL-2000 version of Tjong Kim Sang and Buchholz (2000). Although
|
| 474 |
+
the chunk tags in the RM and CoNLL-2000 are somewhat
|
| 475 |
+
different, we found no significant accuracy differences
|
| 476 |
+
between models trained on these two data sets. Therefore, all our results are reported on the CoNLL-2000 data
|
| 477 |
+
set. We also used a development test set, provided by
|
| 478 |
+
Michael Collins, derived from WSJ section 21 tagged
|
| 479 |
+
with the Brill (1995) POS tagger.
|
| 480 |
+
|
| 481 |
+
|
| 482 |
+
**4.2** **CRFs for Shallow Parsing**
|
| 483 |
+
|
| 484 |
+
Our chunking CRFs have a second-order Markov dependency between chunk tags. This is easily encoded by
|
| 485 |
+
making the CRF labels pairs of consecutive chunk tags.
|
| 486 |
+
That is, the label at position i is yi = ci−1ci, where ci is
|
| 487 |
+
the chunk tag of word i, one of O, B, or I. Since B must be
|
| 488 |
+
used to start a chunk, the label OI is impossible. In addition, successive labels are constrained: yi−1 = ci−2ci−1,
|
| 489 |
+
yi = ci−1ci, and c0 = O. These contraints on the model
|
| 490 |
+
topology are enforced by giving appropriate features a
|
| 491 |
+
weight of −∞, forcing all the forbidden labelings to have
|
| 492 |
+
zero probability.
|
| 493 |
+
Our choice of features was mainly governed by computing power, since we do not use feature selection and
|
| 494 |
+
all features are used in training and testing. We use the
|
| 495 |
+
following factored representation for features
|
| 496 |
+
|
| 497 |
+
|
| 498 |
+
f (yi−1, yi, x, i) = p(x, i)q(yi−1, yi) (4)
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
where p(x, i) is a predicate on the input sequence x and
|
| 502 |
+
current position i and q(yi−1, yi) is a predicate on pairs
|
| 503 |
+
of labels. For instance, p(x, i) might be “word at position i is the” or “the POS tags at positions i − 1, i are
|
| 504 |
+
|
| 505 |
+
|
| 506 |
+
Rockwell International Corp. ’s Tulsa unit said it signed a tentative agreement extending
|
| 507 |
+
|
| 508 |
+
|
| 509 |
+
its contract with Boeing Co. to provide structural parts for Boeing ’s 747 jetliners .
|
| 510 |
+
|
| 511 |
+
|
| 512 |
+
Figure 1: NP chunks
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
|
| 516 |
+
q(yi−1, yi) p(x, i)
|
| 517 |
+
yi = y true
|
| 518 |
+
yi = y, yi−1 = y [′]
|
| 519 |
+
|
| 520 |
+
c(yi) = c
|
| 521 |
+
|
| 522 |
+
yi = y wi = w
|
| 523 |
+
or wi−1 = w
|
| 524 |
+
c(yi) = c wi+1 = w
|
| 525 |
+
wi−2 = w
|
| 526 |
+
wi+2 = w
|
| 527 |
+
wi−1 = w [′], wi = w
|
| 528 |
+
wi+1 = w [′], wi = w
|
| 529 |
+
|
| 530 |
+
ti = t
|
| 531 |
+
ti−1 = t
|
| 532 |
+
ti+1 = t
|
| 533 |
+
ti−2 = t
|
| 534 |
+
ti+2 = t
|
| 535 |
+
ti−1 = t [′], ti = t
|
| 536 |
+
ti−2 = t [′], ti−1 = t
|
| 537 |
+
|
| 538 |
+
ti = t [′], ti+1 = t
|
| 539 |
+
ti+1 = t [′], ti+2 = t
|
| 540 |
+
ti−2 = t [′′], ti−1 = t [′], ti = t
|
| 541 |
+
ti−1 = t [′′], ti = t [′], ti+1 = t
|
| 542 |
+
ti = t [′′], ti+1 = t [′], ti+2 = t
|
| 543 |
+
|
| 544 |
+
|
| 545 |
+
Table 1: Shallow parsing features
|
| 546 |
+
|
| 547 |
+
|
| 548 |
+
DT, NN.” Because the label set is finite, such a factoring
|
| 549 |
+
of f (yi−1, yi, x, i) is always possible, and it allows each
|
| 550 |
+
input predicate to be evaluated just once for many features that use it, making it possible to work with millions
|
| 551 |
+
of features on large training sets.
|
| 552 |
+
|
| 553 |
+
Table 1 summarizes the feature set. For a given position i, wi is the word, ti its POS tag, and yi its label.
|
| 554 |
+
For any label y = c [′] c, c(y) = c is the corresponding
|
| 555 |
+
chunk tag. For example, c(OB) = B. The use of chunk
|
| 556 |
+
tags as well as labels provides a form of backoff from
|
| 557 |
+
the very small feature counts that may arise in a secondorder model, while allowing significant associations between tag pairs and input predicates to be modeled. To
|
| 558 |
+
save time in some of our experiments, we used only the
|
| 559 |
+
820,000 features that are _supported_ in the CoNLL training set, that is, the features that are on at least once. For
|
| 560 |
+
our highest F score, we used the _complete_ feature set,
|
| 561 |
+
around 3.8 million in the CoNLL training set, which contains all the features whose predicate is on at least once in
|
| 562 |
+
the training set. The complete feature set may in principle perform better because it can place negative weights
|
| 563 |
+
on transitions that should be discouraged if a given predicate is on.
|
| 564 |
+
|
| 565 |
+
|
| 566 |
+
|
| 567 |
+
**4.3** **Parameter Tuning**
|
| 568 |
+
|
| 569 |
+
|
| 570 |
+
As discussed previously, we need a Gaussian weight prior
|
| 571 |
+
to reduce overfitting. We also need to choose the number of training iterations since we found that the best F
|
| 572 |
+
score is attained while the log-likelihood is still improving. The reasons for this are not clear, but the Gaussian
|
| 573 |
+
prior may not be enough to keep the optimization from
|
| 574 |
+
making weight adjustments that slighly improve training
|
| 575 |
+
log-likelihood but cause large F score fluctuations. We
|
| 576 |
+
used the development test set mentioned in Section 4.1 to
|
| 577 |
+
set the prior and the number of iterations.
|
| 578 |
+
|
| 579 |
+
|
| 580 |
+
**4.4** **Evaluation Metric**
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
The standard evaluation metrics for a chunker are precision P (fraction of output chunks that exactly match the
|
| 584 |
+
reference chunks), recall R (fraction of reference chunks
|
| 585 |
+
returned by the chunker), and their harmonic mean, the
|
| 586 |
+
F1 score F1 = 2 ∗ P ∗ R/(P + R) (which we call just
|
| 587 |
+
F score in what follows). The relationships between F
|
| 588 |
+
score and labeling error or log-likelihood are not direct,
|
| 589 |
+
so we report both F score and the other metrics for the
|
| 590 |
+
models we tested. For comparisons with other reported
|
| 591 |
+
results we use F score.
|
| 592 |
+
|
| 593 |
+
|
| 594 |
+
**4.5** **Significance Tests**
|
| 595 |
+
|
| 596 |
+
|
| 597 |
+
Ideally, comparisons among chunkers would control for
|
| 598 |
+
feature sets, data preparation, training and test procedures, and parameter tuning, and estimate the statistical
|
| 599 |
+
significance of performance differences. Unfortunately,
|
| 600 |
+
reported results sometimes leave out details needed for
|
| 601 |
+
accurate comparisons. We report F scores for comparison
|
| 602 |
+
with previous work, but we also give statistical significance estimates using McNemar’s test for those methods
|
| 603 |
+
that we evaluated directly.
|
| 604 |
+
|
| 605 |
+
Testing the significance of F scores is tricky because
|
| 606 |
+
the wrong chunks generated by two chunkers are not
|
| 607 |
+
directly comparable. Yeh (2000) examined randomized
|
| 608 |
+
tests for estimating the significance of F scores, and in
|
| 609 |
+
particular the bootstrap over the test set (Efron and Tibshirani, 1993; Sang, 2002). However, bootstrap variances
|
| 610 |
+
in preliminary experiments were too high to allow any
|
| 611 |
+
conclusions, so we used instead a McNemar paired test
|
| 612 |
+
on labeling disagreements (Gillick and Cox, 1989).
|
| 613 |
+
|
| 614 |
+
|
| 615 |
+
Model F score
|
| 616 |
+
SVM combination 94.39%
|
| 617 |
+
(Kudo and Matsumoto, 2001)
|
| 618 |
+
|
| 619 |
+
CRF 94.38%
|
| 620 |
+
Generalized winnow 93.89%
|
| 621 |
+
(Zhang et al., 2002)
|
| 622 |
+
|
| 623 |
+
Voted perceptron 94.09%
|
| 624 |
+
MEMM 93.70%
|
| 625 |
+
|
| 626 |
+
|
| 627 |
+
Table 2: NP chunking F scores
|
| 628 |
+
|
| 629 |
+
|
| 630 |
+
**5** **Results**
|
| 631 |
+
|
| 632 |
+
All the experiments were performed with our Java implementation of CRFs,designed to handle millions of features, on 1.7 GHz Pentium IV processors with Linux and
|
| 633 |
+
IBM Java 1.3.0. Minor variants support voted perceptron
|
| 634 |
+
(Collins, 2002) and MEMMs (McCallum et al., 2000)
|
| 635 |
+
with the same efficient feature encoding. GIS, CG, and
|
| 636 |
+
L-BFGS were used to train CRFs and MEMMs.
|
| 637 |
+
|
| 638 |
+
|
| 639 |
+
**5.1** **F Scores**
|
| 640 |
+
|
| 641 |
+
Table 2 gives representative NP chunking F scores for
|
| 642 |
+
previous work and for our best model, with the complete set of 3.8 million features. The last row of the table
|
| 643 |
+
gives the score for an MEMM trained with the mixed CG
|
| 644 |
+
method using an approximate preconditioner. The published F score for voted perceptron is 93.53% with a different feature set (Collins, 2002). The improved result
|
| 645 |
+
given here is for the supported feature set; the complete
|
| 646 |
+
feature set gives a slightly lower score of 94.07%. Zhang
|
| 647 |
+
et al. (2002) reported a higher F score (94.38%) with generalized winnow using additional linguistic features that
|
| 648 |
+
were not available to us.
|
| 649 |
+
|
| 650 |
+
|
| 651 |
+
**5.2** **Convergence Speed**
|
| 652 |
+
|
| 653 |
+
All the results in the rest of this section are for the smaller
|
| 654 |
+
supported set of 820,000 features. Figures 2a and 2b
|
| 655 |
+
show how preconditioning helps training convergence.
|
| 656 |
+
Since each CG iteration involves a line search that may
|
| 657 |
+
require several forward-backward procedures (typically
|
| 658 |
+
between 4 and 5 in our experiments), we plot the progress
|
| 659 |
+
of penalized log-likelihood L [′] λ [with respect to the num-]
|
| 660 |
+
ber of forward-backwardevaluations. The objective function increases rapidly, achieving close proximity to the
|
| 661 |
+
maximum in a few iterations (typically 10). In contrast,
|
| 662 |
+
GIS training increases L [′] λ [rather slowly, never reaching]
|
| 663 |
+
the value achieved by CG. The relative slowness of iterative scaling is also documented in a recent evaluation
|
| 664 |
+
of training methods for maximum-entropy classification
|
| 665 |
+
(Malouf, 2002). In theory, GIS would eventually converge to the L [′] λ [optimum, but in practice convergence]
|
| 666 |
+
may be so slow that L [′] λ [improvements may fall below]
|
| 667 |
+
numerical accuracy, falsely indicating convergence.
|
| 668 |
+
|
| 669 |
+
|
| 670 |
+
|
| 671 |
+
training method time F score L [′] λ
|
| 672 |
+
Precond. CG 130 94.19% -2968
|
| 673 |
+
Mixed CG 540 94.20% -2990
|
| 674 |
+
Plain CG 648 94.04% -2967
|
| 675 |
+
L-BFGS 84 94.19% -2948
|
| 676 |
+
GIS 3700 93.55% -5668
|
| 677 |
+
|
| 678 |
+
|
| 679 |
+
Table 3: Runtime for various training methods
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
null hypothesis p-value
|
| 683 |
+
CRF vs. SVM 0.469
|
| 684 |
+
CRF vs. MEMM 0.00109
|
| 685 |
+
CRF vs. voted perceptron 0.116
|
| 686 |
+
MEMM vs. voted perceptron 0.0734
|
| 687 |
+
|
| 688 |
+
|
| 689 |
+
Table 4: McNemar’s tests on labeling disagreements
|
| 690 |
+
|
| 691 |
+
|
| 692 |
+
Mixed CG training converges slightly more slowly
|
| 693 |
+
than preconditioned CG. On the other hand, CG without
|
| 694 |
+
preconditioner converges much more slowly than both
|
| 695 |
+
preconditioned CG and mixed CG training. However, it
|
| 696 |
+
is still much faster than GIS. We believe that the superior
|
| 697 |
+
convergence rate of preconditioned CG is due to the use
|
| 698 |
+
of approximate second-order information. This is confirmed by the performance of L-BFGS, which also uses
|
| 699 |
+
approximate second-order information. [2]
|
| 700 |
+
|
| 701 |
+
Although there is no direct relationship between F
|
| 702 |
+
scores and log-likelihood, in these experiments F score
|
| 703 |
+
tends to follow log-likelihood. Indeed, Figure 3 shows
|
| 704 |
+
that preconditioned CG training improves test F scores
|
| 705 |
+
much more rapidly than GIS training.
|
| 706 |
+
Table 3 compares run times (in minutes) for reaching a
|
| 707 |
+
target penalized log-likelihood for various training methods with prior σ = 1.0. GIS is the only method that failed
|
| 708 |
+
to reach the target, after 3,700 iterations. We cannot place
|
| 709 |
+
the voted perceptron in this table, as it does not optimize log-likelihood and does not use a prior. However,
|
| 710 |
+
it reaches a fairly good F-score above 93% in just two
|
| 711 |
+
training sweeps, but after that it improves more slowly, to
|
| 712 |
+
a somewhat lower score, than preconditioned CG training.
|
| 713 |
+
|
| 714 |
+
|
| 715 |
+
**5.3** **Labeling Accuracy**
|
| 716 |
+
|
| 717 |
+
The accuracy rate for individual labeling decisions is
|
| 718 |
+
over-optimistic as an accuracy measure for shallow parsing. For instance, if the chunk BIIIIIII is labled as
|
| 719 |
+
OIIIIIII, the labeling accuracy is 87.5%, but recall is
|
| 720 |
+
0. However, individual labeling errors provide a more
|
| 721 |
+
convenient basis for statistical significance tests. One
|
| 722 |
+
|
| 723 |
+
|
| 724 |
+
2Although L-BFGS has a slightly higher penalized loglikelihood, its log-likelihood on the data is actually lower than
|
| 725 |
+
that of preconditioned CG and mixed CG training.
|
| 726 |
+
|
| 727 |
+
|
| 728 |
+
Comparison of CG Methods to GIS
|
| 729 |
+
|
| 730 |
+
|
| 731 |
+
|
| 732 |
+
|
| 733 |
+
|
| 734 |
+
0
|
| 735 |
+
|
| 736 |
+
|
| 737 |
+
−5000
|
| 738 |
+
|
| 739 |
+
|
| 740 |
+
−10000
|
| 741 |
+
|
| 742 |
+
|
| 743 |
+
−15000
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
−20000
|
| 747 |
+
|
| 748 |
+
|
| 749 |
+
−25000
|
| 750 |
+
|
| 751 |
+
|
| 752 |
+
−30000
|
| 753 |
+
|
| 754 |
+
|
| 755 |
+
|
| 756 |
+
Comparison of Fast Training Algorithms for CRF
|
| 757 |
+
|
| 758 |
+
|
| 759 |
+
|
| 760 |
+
|
| 761 |
+
|
| 762 |
+
0
|
| 763 |
+
|
| 764 |
+
|
| 765 |
+
−20000
|
| 766 |
+
|
| 767 |
+
|
| 768 |
+
−40000
|
| 769 |
+
|
| 770 |
+
|
| 771 |
+
−60000
|
| 772 |
+
|
| 773 |
+
|
| 774 |
+
−80000
|
| 775 |
+
|
| 776 |
+
|
| 777 |
+
−100000
|
| 778 |
+
|
| 779 |
+
|
| 780 |
+
−120000
|
| 781 |
+
|
| 782 |
+
|
| 783 |
+
−140000
|
| 784 |
+
|
| 785 |
+
|
| 786 |
+
−160000
|
| 787 |
+
|
| 788 |
+
|
| 789 |
+
−180000
|
| 790 |
+
|
| 791 |
+
|
| 792 |
+
|
| 793 |
+
−200000
|
| 794 |
+
0 50 100 150 200 250 300 350 400 450 500
|
| 795 |
+
|
| 796 |
+
|
| 797 |
+
|
| 798 |
+
−35000
|
| 799 |
+
6 56 106 156 206 256
|
| 800 |
+
|
| 801 |
+
|
| 802 |
+
|
| 803 |
+
# of Forward−backward evaluations
|
| 804 |
+
|
| 805 |
+
|
| 806 |
+
|
| 807 |
+
# of Forward−backward evaluations
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
|
| 811 |
+
(a) L [′] λ [: CG (precond., mixed), L-BFGS]
|
| 812 |
+
|
| 813 |
+
|
| 814 |
+
|
| 815 |
+
(b) L [′] λ [: CG (precond., plain), GIS]
|
| 816 |
+
|
| 817 |
+
|
| 818 |
+
|
| 819 |
+
Figure 2: Training convergence for various methods
|
| 820 |
+
|
| 821 |
+
|
| 822 |
+
|
| 823 |
+
0.95
|
| 824 |
+
|
| 825 |
+
|
| 826 |
+
0.9
|
| 827 |
+
|
| 828 |
+
|
| 829 |
+
0.85
|
| 830 |
+
|
| 831 |
+
|
| 832 |
+
0.8
|
| 833 |
+
|
| 834 |
+
|
| 835 |
+
0.75
|
| 836 |
+
|
| 837 |
+
|
| 838 |
+
0.7
|
| 839 |
+
|
| 840 |
+
|
| 841 |
+
0.65
|
| 842 |
+
|
| 843 |
+
|
| 844 |
+
0.6
|
| 845 |
+
|
| 846 |
+
|
| 847 |
+
0.55
|
| 848 |
+
|
| 849 |
+
|
| 850 |
+
0.5
|
| 851 |
+
|
| 852 |
+
|
| 853 |
+
|
| 854 |
+
Comparison of CG Methods to GIS
|
| 855 |
+
|
| 856 |
+
|
| 857 |
+
|
| 858 |
+
|
| 859 |
+
|
| 860 |
+
0.45
|
| 861 |
+
0 50 100 150 200 250 300 350 400 450 500
|
| 862 |
+
|
| 863 |
+
|
| 864 |
+
|
| 865 |
+
# of Forward−backward evaluations
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
|
| 869 |
+
Figure 3: Test F scores _vs._ training time
|
| 870 |
+
|
| 871 |
+
|
| 872 |
+
such test is McNemar test on paired observations (Gillick
|
| 873 |
+
and Cox, 1989).
|
| 874 |
+
With McNemar’s test, we compare the correctness of
|
| 875 |
+
the labeling decisions of two models. The null hypothesis
|
| 876 |
+
is that the disagreements (correct _vs._ incorrect) are due to
|
| 877 |
+
chance. Table 4 summarizes the results of tests between
|
| 878 |
+
the models for which we had labeling decisions. These
|
| 879 |
+
tests suggest that MEMMs are significantly less accurate,
|
| 880 |
+
but that there are no significant differences in accuracy
|
| 881 |
+
among the other models.
|
| 882 |
+
|
| 883 |
+
|
| 884 |
+
**6** **Conclusions**
|
| 885 |
+
|
| 886 |
+
We have shown that (log-)linear sequence labeling models trained discriminatively with general-purpose optimization methods are a simple, competitive solution to
|
| 887 |
+
learning shallow parsers. These models combine the best
|
| 888 |
+
|
| 889 |
+
|
| 890 |
+
|
| 891 |
+
features of generative finite-state models and discriminative (log-)linear classifiers, and do NP chunking as well
|
| 892 |
+
as or better than “ad hoc” classifier combinations, which
|
| 893 |
+
were the most accurate approach until now. In a longer
|
| 894 |
+
version of this work we will also describe shallow parsing results for other phrase types. There is no reason why
|
| 895 |
+
the same techniques cannot be used equally successfully
|
| 896 |
+
for the other types or for other related tasks, such as POS
|
| 897 |
+
tagging or named-entity recognition.
|
| 898 |
+
On the machine-learning side, it would be interesting to generalize the ideas of large-margin classification
|
| 899 |
+
to sequence models, strengthening the results of Collins
|
| 900 |
+
(2002) and leading to new optimal training algorithms
|
| 901 |
+
with stronger guarantees against overfitting.
|
| 902 |
+
On the application side, (log-)linear parsing models
|
| 903 |
+
have the potential to supplant the currently dominant
|
| 904 |
+
lexicalized PCFG models for parsing by allowing much
|
| 905 |
+
richer feature sets and simpler smoothing, while avoiding the label bias problem that may have hindered earlier
|
| 906 |
+
classifier-based parsers (Ratnaparkhi, 1997). However,
|
| 907 |
+
work in that direction has so far addressed only parse
|
| 908 |
+
reranking (Collins and Duffy, 2002; Riezler et al., 2002).
|
| 909 |
+
Full discriminative parser training faces significant algorithmic challenges in the relationship between parsing alternatives and feature values (Geman and Johnson, 2002)
|
| 910 |
+
and in computing feature expectations.
|
| 911 |
+
|
| 912 |
+
|
| 913 |
+
**Acknowledgments**
|
| 914 |
+
|
| 915 |
+
John Lafferty and Andrew McCallum worked with the
|
| 916 |
+
second author on developing CRFs. McCallum helped
|
| 917 |
+
by the second author implemented the first conjugategradient trainer for CRFs, which convinced us that training of large CRFs on large datasets would be practical.
|
| 918 |
+
Michael Collins helped us reproduce his generalized per
|
| 919 |
+
|
| 920 |
+
cepton results and compare his method with ours. Erik
|
| 921 |
+
Tjong Kim Sang, who has created the best online resources on shallow parsing, helped us with details of the
|
| 922 |
+
CoNLL-2000 shared task. Taku Kudo provided the output of his SVM chunker for the significance test.
|
| 923 |
+
|
| 924 |
+
|
| 925 |
+
**References**
|
| 926 |
+
|
| 927 |
+
S. Abney. Parsing by chunks. In R. Berwick, S. Abney, and
|
| 928 |
+
C. Tenny, editors, _Principle-based Parsing_ . Kluwer Academic Publishers, 1991.
|
| 929 |
+
|
| 930 |
+
S. Abney, R. E. Schapire, and Y. Singer. Boosting applied to
|
| 931 |
+
tagging and PP attachment. In _Proc. EMNLP-VLC_, New
|
| 932 |
+
Brunswick, New Jersey, 1999. ACL.
|
| 933 |
+
|
| 934 |
+
A. L. Berger, S. A. Della Pietra, and V. J. Della Pietra. A maximum entropy approach to natural language processing. _Com-_
|
| 935 |
+
_putational Linguistics_, 22(1), 1996.
|
| 936 |
+
|
| 937 |
+
D. M. Bikel, R. L. Schwartz, and R. M. Weischedel. An algorithm that learns what’s in a name. _Machine Learning_, 34:
|
| 938 |
+
211–231, 1999.
|
| 939 |
+
|
| 940 |
+
L. Bottou. _Une Approche th´eorique de l’Apprentissage Con-_
|
| 941 |
+
_nexionniste: Applications `a la Reconnaissance de la Parole_ .
|
| 942 |
+
PhD thesis, Universit´e de Paris XI, 1991.
|
| 943 |
+
|
| 944 |
+
E. Brill. Transformation-based error-driven learning and natural
|
| 945 |
+
language processing: a case study in part of speech tagging.
|
| 946 |
+
_Computational Linguistics_, 21:543–565, 1995.
|
| 947 |
+
|
| 948 |
+
S. F. Chen and R. Rosenfeld. A Gaussian prior for smoothing
|
| 949 |
+
maximum entropy models. Technical Report CMU-CS-99108, Carnegie Mellon University, 1999.
|
| 950 |
+
|
| 951 |
+
M. Collins. Discriminative training methods for hidden Markov
|
| 952 |
+
models: Theory and experiments with perceptron algorithms. In _Proc. EMNLP 2002_ . ACL, 2002.
|
| 953 |
+
|
| 954 |
+
M. Collins and N. Duffy. New ranking algorithms for parsing
|
| 955 |
+
and tagging: Kernels over discrete structures, and the voted
|
| 956 |
+
perceptron. In _Proc. 40th ACL_, 2002.
|
| 957 |
+
|
| 958 |
+
J. N. Darroch and D. Ratcliff. Generalized iterative scaling for
|
| 959 |
+
log-linear models. _The Annals of Mathematical Statistics_, 43
|
| 960 |
+
(5):1470–1480, 1972.
|
| 961 |
+
|
| 962 |
+
S. Della Pietra, V. Della Pietra, and J. Lafferty. Inducing features of random fields. _IEEE PAMI_, 19(4):380–393, 1997.
|
| 963 |
+
|
| 964 |
+
B. Efron and R. J. Tibshirani. _An Introduction to the Bootstrap_ .
|
| 965 |
+
Chapman & Hall/CRC, 1993.
|
| 966 |
+
|
| 967 |
+
D. Freitag and A. McCallum. Information extraction with
|
| 968 |
+
HMM structures learned by stochastic optimization. In
|
| 969 |
+
_Proc. AAAI 2000_, 2000.
|
| 970 |
+
|
| 971 |
+
S. Geman and M. Johnson. Dynamic programming for parsing
|
| 972 |
+
and estimation of stochastic unification-based grammars. In
|
| 973 |
+
_Proc. 40th ACL_, 2002.
|
| 974 |
+
|
| 975 |
+
L. Gillick and S. Cox. Some statistical issues in the compairson
|
| 976 |
+
of speech recognition algorithms. In _International Confer-_
|
| 977 |
+
_ence on Acoustics Speech and Signal Processing_, volume 1,
|
| 978 |
+
pages 532–535, 1989.
|
| 979 |
+
|
| 980 |
+
J. Hammersley and P. Clifford. Markov fields on finite graphs
|
| 981 |
+
and lattices. Unpublished manuscript, 1971.
|
| 982 |
+
|
| 983 |
+
T. Kudo and Y. Matsumoto. Chunking with support vector machines. In _Proc. NAACL 2001_ . ACL, 2001.
|
| 984 |
+
|
| 985 |
+
|
| 986 |
+
|
| 987 |
+
J. Kupiec. Robust part-of-speech tagging using a hidden
|
| 988 |
+
Markov model. _Computer Speech and Language_, 6:225–242,
|
| 989 |
+
1992.
|
| 990 |
+
|
| 991 |
+
J. Lafferty, A. McCallum, and F. Pereira. Conditional random
|
| 992 |
+
fields: Probabilistic models for segmenting and labeling sequence data. In _Proc. ICML-01_, pages 282–289, 2001.
|
| 993 |
+
|
| 994 |
+
R. Malouf. A comparison of algorithms for maximum entropy
|
| 995 |
+
parameter estimation. In _Proc. CoNLL-2002_, 2002.
|
| 996 |
+
|
| 997 |
+
A. McCallum, D. Freitag, and F. Pereira. Maximum entropy
|
| 998 |
+
Markov models for information extraction and segmentation.
|
| 999 |
+
In _Proc. ICML 2000_, pages 591–598, Stanford, California,
|
| 1000 |
+
2000.
|
| 1001 |
+
|
| 1002 |
+
T. P. Minka. Algorithms for maximum-likelihood logistic regression. Technical Report 758, CMU Statistics Department,
|
| 1003 |
+
2001.
|
| 1004 |
+
|
| 1005 |
+
J. Nocedal and S. J. Wright. _Numerical Optimization_ . Springer,
|
| 1006 |
+
1999.
|
| 1007 |
+
|
| 1008 |
+
V. Punyakanok and D. Roth. The use of classifiers in sequential
|
| 1009 |
+
inference. In _NIPS 13_, pages 995–1001. MIT Press, 2001.
|
| 1010 |
+
|
| 1011 |
+
L. A. Ramshaw and M. P. Marcus. Text chunking using
|
| 1012 |
+
transformation-based learning. In _Proc. Third Workshop on_
|
| 1013 |
+
_Very Large Corpora_ . ACL, 1995.
|
| 1014 |
+
|
| 1015 |
+
A. Ratnaparkhi. A maximum entropy model for part-of-speech
|
| 1016 |
+
tagging. In _Proc. EMNLP_, New Brunswick, New Jersey,
|
| 1017 |
+
1996. ACL.
|
| 1018 |
+
|
| 1019 |
+
A. Ratnaparkhi. A linear observed time statistical parser
|
| 1020 |
+
based on maximum entropy models. In C. Cardie and
|
| 1021 |
+
R. Weischedel, editors, _EMNLP-2_ . ACL, 1997.
|
| 1022 |
+
|
| 1023 |
+
S. Riezler, T. H. King, R. M. Kaplan, R. Crouch, J. T.
|
| 1024 |
+
Maxwell III, and M. Johnson. Parsing the Wall Street Journal
|
| 1025 |
+
using a lexical-functional grammar and discriminative estimation techniques. In _Proc. 40th ACL_, 2002.
|
| 1026 |
+
|
| 1027 |
+
E. F. T. K. Sang. Memory-based shallow parsing. _Journal of_
|
| 1028 |
+
_Machine Learning Research_, 2:559–594, 2002.
|
| 1029 |
+
|
| 1030 |
+
J. R. Shewchuk. An introduction to the conjugate gradient
|
| 1031 |
+
method without the agonizing pain, 1994. URL http://
|
| 1032 |
+
www-2.cs.cmu.edu/˜jrs/jrspapers.html#cg.
|
| 1033 |
+
|
| 1034 |
+
B. Taskar, P. Abbeel, and D. Koller. Discriminative probabilistic models for relational data. In _Eighteenth Conference on_
|
| 1035 |
+
_Uncertainty in Artificial Intelligence_, 2002.
|
| 1036 |
+
|
| 1037 |
+
E. F. Tjong Kim Sang and S. Buchholz. Introduction to the
|
| 1038 |
+
CoNLL-2000 shared task: Chunking. In _Proc. CoNLL-2000_,
|
| 1039 |
+
pages 127–132, 2000.
|
| 1040 |
+
|
| 1041 |
+
H. Wallach. Efficient training of conditional random fields. In
|
| 1042 |
+
_Proc. 6th Annual CLUK Research Colloquium_, 2002.
|
| 1043 |
+
|
| 1044 |
+
A. Yeh. More accurate tests for the statistical significance of
|
| 1045 |
+
result differences. In _COLING-2000_, pages 947–953, Saarbruecken, Germany, 2000.
|
| 1046 |
+
|
| 1047 |
+
T. Zhang, F. Damerau, and D. Johnson. Text chunking based
|
| 1048 |
+
on a generalization of winnow. _Journal of Machine Learning_
|
| 1049 |
+
_Research_, 2:615–637, 2002.
|
| 1050 |
+
|
| 1051 |
+
|
references/2003.naacl.sha/paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
o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ajic"
|
| 8 |
+
year: 2005
|
| 9 |
+
venue: "HLT-EMNLP 2005"
|
| 10 |
+
url: "https://aclanthology.org/H05-1066/"
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# **Non-projective Dependency Parsing using Spanning Tree Algorithms**
|
| 14 |
+
|
| 15 |
+
**Ryan McDonald** **Fernando Pereira**
|
| 16 |
+
Department of Computer and Information Science
|
| 17 |
+
University of Pennsylvania
|
| 18 |
+
_{_ `ryantm,pereira` _}_ `@cis.upenn.edu`
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
**Kiril Ribarov** **Jan Hajiˇc**
|
| 22 |
+
Institute of Formal and Applied Linguistics
|
| 23 |
+
Charles University
|
| 24 |
+
_{_ `ribarov,hajic` _}_ `@ufal.ms.mff.cuni.cz`
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
**Abstract**
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
We formalize weighted dependency parsing as searching for maximum spanning
|
| 32 |
+
trees (MSTs) in directed graphs. Using
|
| 33 |
+
this representation, the parsing algorithm
|
| 34 |
+
of Eisner (1996) is sufficient for searching over all projective trees in _O_ ( _n_ [3] ) time.
|
| 35 |
+
More surprisingly, the representation is
|
| 36 |
+
extended naturally to non-projective parsing using Chu-Liu-Edmonds (Chu and
|
| 37 |
+
Liu, 1965; Edmonds, 1967) MST algorithm, yielding an _O_ ( _n_ [2] ) parsing algorithm. We evaluate these methods
|
| 38 |
+
on the Prague Dependency Treebank using online large-margin learning techniques (Crammer et al., 2003; McDonald
|
| 39 |
+
et al., 2005) and show that MST parsing
|
| 40 |
+
increases efficiency and accuracy for languages with non-projective dependencies.
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
**1** **Introduction**
|
| 44 |
+
|
| 45 |
+
Dependency parsing has seen a surge of interest lately for applications such as relation extraction (Culotta and Sorensen, 2004), machine translation (Ding and Palmer, 2005), synonym generation (Shinyama et al., 2002), and lexical resource
|
| 46 |
+
augmentation (Snow et al., 2004). The primary
|
| 47 |
+
reasons for using dependency structures instead of
|
| 48 |
+
more informative lexicalized phrase structures is
|
| 49 |
+
that they are more efficient to learn and parse while
|
| 50 |
+
still encoding much of the predicate-argument information needed in applications.
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
523
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
Figure 1: An example dependency tree.
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
Dependency representations, which link words to
|
| 61 |
+
their arguments, have a long history (Hudson, 1984).
|
| 62 |
+
Figure 1 shows a dependency tree for the sentence
|
| 63 |
+
_John hit the ball with the bat_ . We restrict ourselves
|
| 64 |
+
to _dependency tree_ analyses, in which each word depends on exactly one parent, either another word or a
|
| 65 |
+
dummy root symbol as shown in the figure. The tree
|
| 66 |
+
in Figure 1 is _projective_, meaning that if we put the
|
| 67 |
+
words in their linear order, preceded by the root, the
|
| 68 |
+
edges can be drawn above the words without crossings, or, equivalently, a word and its descendants
|
| 69 |
+
form a contiguous substring of the sentence.
|
| 70 |
+
|
| 71 |
+
In English, projective trees are sufficient to analyze most sentence types. In fact, the largest source
|
| 72 |
+
of English dependency trees is automatically generated from the Penn Treebank (Marcus et al., 1993)
|
| 73 |
+
and is by convention exclusively projective. However, there are certain examples in which a nonprojective tree is preferable. Consider the sentence
|
| 74 |
+
_John saw a dog yesterday which was a Yorkshire Ter-_
|
| 75 |
+
_rier_ . Here the relative clause _which was a Yorkshire_
|
| 76 |
+
_Terrier_ and the object it modifies (the _dog_ ) are separated by an adverb. There is no way to draw the
|
| 77 |
+
dependency tree for this sentence in the plane with
|
| 78 |
+
no crossing edges, as illustrated in Figure 2. In languages with more flexible word order than English,
|
| 79 |
+
such as German, Dutch and Czech, non-projective
|
| 80 |
+
dependencies are more frequent. Rich inflection
|
| 81 |
+
systems reduce reliance on word order to express
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
_Proceedings of Human Language Technology Conference and Conference on Empirical Methods in Natural Language_
|
| 86 |
+
_Processing (HLT/EMNLP)_, pages 523–530, Vancouver, October 2005. c _⃝_ 2005 Association for Computational Linguistics
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
_He is mostly not even interested in the new things and in most cases, he has no money for it either._
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
Figure 2: Non-projective dependency trees in English and Czech.
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
grammatical relations, allowing non-projective dependencies that we need to represent and parse efficiently. A non-projective example from the Czech
|
| 97 |
+
Prague Dependency Treebank (Hajiˇc et al., 2001) is
|
| 98 |
+
also shown in Figure 2.
|
| 99 |
+
|
| 100 |
+
Most previous dependency parsing models have
|
| 101 |
+
focused on projective trees, including the work
|
| 102 |
+
of Eisner (1996), Collins et al. (1999), Yamada and
|
| 103 |
+
Matsumoto (2003), Nivre and Scholz (2004), and
|
| 104 |
+
McDonald et al. (2005). These systems have shown
|
| 105 |
+
that accurate projective dependency parsers can be
|
| 106 |
+
automatically learned from parsed data. However,
|
| 107 |
+
non-projective analyses have recently attracted some
|
| 108 |
+
interest, not only for languages with freer word order
|
| 109 |
+
but also for English. In particular, Wang and Harper
|
| 110 |
+
(2004) describe a broad coverage non-projective
|
| 111 |
+
parser for English based on a hand-constructed constraint dependency grammar rich in lexical and syntactic information. Nivre and Nilsson (2005) presented a parsing model that allows for the introduction of non-projective edges into dependency trees
|
| 112 |
+
through learned edge transformations within their
|
| 113 |
+
memory-based parser. They test this system on
|
| 114 |
+
Czech and show improved accuracy relative to a projective parser. Our approach differs from those earlier efforts in searching optimally and efficiently the
|
| 115 |
+
full space of non-projective trees.
|
| 116 |
+
|
| 117 |
+
The main idea of our method is that dependency
|
| 118 |
+
parsing can be formalized as the search for a maximum spanning tree in a directed graph. This formalization generalizes standard projective parsing models based on the Eisner algorithm (Eisner, 1996) to
|
| 119 |
+
yield efficient _O_ ( _n_ [2] ) exact parsing methods for nonprojective languages like Czech. Using this spanning tree representation, we extend the work of McDonald et al. (2005) on online large-margin discrim
|
| 120 |
+
|
| 121 |
+
524
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
inative training methods to non-projective dependencies.
|
| 126 |
+
The present work is related to that of Hirakawa
|
| 127 |
+
(2001) who, like us, reduces the problem of dependency parsing to spanning tree search. However, his
|
| 128 |
+
parsing method uses a branch and bound algorithm
|
| 129 |
+
that is exponential in the worst case, even though
|
| 130 |
+
it appears to perform reasonably in limited experiments. Furthermore, his work does not adequately
|
| 131 |
+
address learning or measure parsing accuracy on
|
| 132 |
+
held-out data.
|
| 133 |
+
Section 2 describes an edge-based factorization
|
| 134 |
+
of dependency trees and uses it to equate dependency parsing to the problem of finding maximum
|
| 135 |
+
spanning trees in directed graphs. Section 3 outlines the online large-margin learning framework
|
| 136 |
+
used to train our dependency parsers. Finally, in
|
| 137 |
+
Section 4 we present parsing results for Czech. The
|
| 138 |
+
trees in Figure 1 and Figure 2 are untyped, that
|
| 139 |
+
is, edges are not partitioned into types representing
|
| 140 |
+
additional syntactic information such as grammatical function. We study untyped dependency trees
|
| 141 |
+
mainly, but edge types can be added with simple extensions to the methods discussed here.
|
| 142 |
+
|
| 143 |
+
**2** **Dependency Parsing and Spanning Trees**
|
| 144 |
+
|
| 145 |
+
**2.1** **Edge Based Factorization**
|
| 146 |
+
|
| 147 |
+
In what follows, _**x**_ = _x_ 1 · · · _xn_ represents a generic
|
| 148 |
+
input sentence, and _**y**_ represents a generic dependency tree for sentence _**x**_ . Seeing _**y**_ as the set of tree
|
| 149 |
+
edges, we write ( _i, j_ ) ∈ _**y**_ if there is a dependency
|
| 150 |
+
in _**y**_ from word _xi_ to word _xj_ .
|
| 151 |
+
In this paper we follow a common method of factoring the score of a dependency tree as the sum of
|
| 152 |
+
the scores of all edges in the tree. In particular, we
|
| 153 |
+
define the score of an edge to be the dot product be
|
| 154 |
+
|
| 155 |
+
tween a high dimensional feature representation of
|
| 156 |
+
the edge and a weight vector,
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
_s_ ( _i, j_ ) = **w** - **f** ( _i, j_ )
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
Thus the score of a dependency tree _**y**_ for sentence
|
| 163 |
+
_**x**_ is,
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
_s_ ( _**x**_ _,_ _**y**_ ) =
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
- _s_ ( _i, j_ ) =
|
| 172 |
+
( _i,j_ ) _∈_ _**y**_ ( _i,j_ ) _∈_
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
- **w** - **f** ( _i, j_ )
|
| 178 |
+
|
| 179 |
+
( _i,j_ ) _∈_ _**y**_
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
Assuming an appropriate feature representation as
|
| 184 |
+
well as a weight vector **w**, dependency parsing is the
|
| 185 |
+
task of finding the dependency tree _**y**_ with highest
|
| 186 |
+
score for a given sentence _**x**_ .
|
| 187 |
+
For the rest of this section we assume that the
|
| 188 |
+
weight vector **w** is known and thus we know the
|
| 189 |
+
score _s_ ( _i, j_ ) of each possible edge. In Section 3 we
|
| 190 |
+
present a method for learning the weight vector.
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
**2.2** **Maximum Spanning Trees**
|
| 194 |
+
|
| 195 |
+
We represent the generic directed graph _G_ = ( _V, E_ )
|
| 196 |
+
by its vertex set _V_ = { _v_ 1 _, . . ., vn_ } and set _E_ ⊆ [1 :
|
| 197 |
+
_n_ ] × [1 : _n_ ] of pairs ( _i, j_ ) of directed edges _vi_ → _vj_ .
|
| 198 |
+
Each such edge has a score _s_ ( _i, j_ ). Since _G_ is directed, _s_ ( _i, j_ ) does not necessarily equal _s_ ( _j, i_ ). A
|
| 199 |
+
_maximum spanning tree_ (MST) of _G_ is a tree _**y**_ ⊆ _E_
|
| 200 |
+
every vertex inthat maximizes the value _V_ appears in [�] _**y**_ ( _i,j_ . The maximum) _∈_ _**y**_ _[s]_ [(] _[i, j]_ [)][ such that] _pro-_
|
| 201 |
+
_jective_ spanning tree of _G_ is constructed similarly
|
| 202 |
+
except that it can only contain projective edges relative to some total order on the vertices of _G_ . The
|
| 203 |
+
MST problem for directed graphs is also known as
|
| 204 |
+
the maximum arborescence problem.
|
| 205 |
+
For each sentence _**x**_ we define the directed graph
|
| 206 |
+
_G_ _**x**_ = ( _V_ _**x**_ _, E_ _**x**_ ) given by
|
| 207 |
+
|
| 208 |
+
_V_ _**x**_ = { _x_ 0 = root _, x_ 1 _, . . ., xn_ }
|
| 209 |
+
_E_ _**x**_ = {( _i, j_ ) : _i_ ̸= _j,_ ( _i, j_ ) ∈ [0 : _n_ ] × [1 : _n_ ]}
|
| 210 |
+
|
| 211 |
+
That is, _G_ _**x**_ is a graph with the sentence words and
|
| 212 |
+
the dummy root symbol as vertices and a directed
|
| 213 |
+
edge between every pair of distinct words and from
|
| 214 |
+
the root symbol to every word. It is clear that dependency trees for _**x**_ and spanning trees for _G_ _**x**_ coincide, since both kinds of trees are required to be
|
| 215 |
+
rooted at the dummy root and reach all the words
|
| 216 |
+
in the sentence. Hence, finding a (projective) dependency tree with highest score is equivalent to finding
|
| 217 |
+
a maximum (projective) spanning tree in _G_ _**x**_ .
|
| 218 |
+
|
| 219 |
+
|
| 220 |
+
525
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
**Chu-Liu-Edmonds** ( _G, s_ )
|
| 225 |
+
Graph _G_ = ( _V, E_ )
|
| 226 |
+
Edge weight function _s_ : _E →_ R
|
| 227 |
+
1. Let _M_ = _{_ ( _x_ _[∗]_ _, x_ ) : _x ∈_ _V, x_ _[∗]_ = arg max _x′ s_ ( _x_ _[′]_ _, x_ ) _}_
|
| 228 |
+
2. Let _GM_ = ( _V, M_ )
|
| 229 |
+
3. If _GM_ has no cycles, then it is an MST: return _GM_
|
| 230 |
+
4. Otherwise, find a cycle _C_ in _GM_
|
| 231 |
+
5. Let _GC_ = contract( _G, C, s_ )
|
| 232 |
+
6. Let y = Chu-Liu-Edmonds( _GC, s_ )
|
| 233 |
+
7. Find a vertex _x ∈_ _C_ s. t. ( _x_ _[′]_ _, x_ ) _∈_ y _,_ ( _x_ _[′′]_ _, x_ ) _∈_ _C_
|
| 234 |
+
8. return y _∪_ _C −{_ ( _x_ _[′′]_ _, x_ ) _}_
|
| 235 |
+
**contract** ( _G_ = ( _V, E_ ) _, C, s_ )
|
| 236 |
+
1. Let _GC_ be the subgraph of _G_ excluding nodes in _C_
|
| 237 |
+
2. Add a node _c_ to _GC_ representing cycle _C_
|
| 238 |
+
3. For _x ∈_ _V −_ _C_ : _∃x′∈C_ ( _x_ _[′]_ _, x_ ) _∈_ _E_
|
| 239 |
+
Add edge ( _c, x_ ) to _GC_ with
|
| 240 |
+
_s_ ( _c, x_ ) = max _x′∈C s_ ( _x_ _[′]_ _, x_ )
|
| 241 |
+
4. For _x ∈_ _V −_ _C_ : _∃x′∈C_ ( _x, x_ _[′]_ ) _∈_ _E_
|
| 242 |
+
Add edge ( _x, c_ ) to _GC_ with
|
| 243 |
+
_s_ ( _x, c_ ) = max _x′∈C_ [ _s_ ( _x, x_ _[′]_ ) _−_ _s_ ( _a_ ( _x_ _[′]_ ) _, x_ _[′]_ ) + _s_ ( _C_ )]
|
| 244 |
+
where _a_ ( _v_ ) is the predecessor of _v_ in _C_
|
| 245 |
+
and _s_ ( _C_ ) = [P] _v∈C_ _[s]_ [(] _[a]_ [(] _[v]_ [)] _[, v]_ [)]
|
| 246 |
+
|
| 247 |
+
5. return _GC_
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
Figure 3: Chu-Liu-Edmonds algorithm for finding
|
| 251 |
+
maximum spanning trees in directed graphs.
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
**2.2.1** **Non-projective Trees**
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
To find the highest scoring non-projective tree we
|
| 258 |
+
simply search the entire space of spanning trees with
|
| 259 |
+
no restrictions. Well-known algorithms exist for the
|
| 260 |
+
less general case of finding spanning trees in undirected graphs (Cormen et al., 1990).
|
| 261 |
+
|
| 262 |
+
Efficient algorithms for the directed case are less
|
| 263 |
+
well known, but they exist. We will use here the
|
| 264 |
+
Chu-Liu-Edmonds algorithm (Chu and Liu, 1965;
|
| 265 |
+
Edmonds, 1967), sketched in Figure 3 following Leonidas (2003). Informally, the algorithm has
|
| 266 |
+
each vertex in the graph greedily select the incoming
|
| 267 |
+
edge with highest weight. If a tree results, it must be
|
| 268 |
+
the maximum spanning tree. If not, there must be a
|
| 269 |
+
cycle. The procedure identifies a cycle and contracts
|
| 270 |
+
it into a single vertex and recalculates edge weights
|
| 271 |
+
going into and out of the cycle. It can be shown that
|
| 272 |
+
a maximum spanning tree on the contracted graph is
|
| 273 |
+
equivalent to a maximum spanning tree in the original graph (Leonidas, 2003). Hence the algorithm
|
| 274 |
+
can recursively call itself on the new graph. Naively,
|
| 275 |
+
this algorithm runs in _O_ ( _n_ [3] ) time since each recursive call takes _O_ ( _n_ [2] ) to find the highest incoming
|
| 276 |
+
edge for each word and to contract the graph. There
|
| 277 |
+
are at most _O_ ( _n_ ) recursive calls since we cannot
|
| 278 |
+
contract the graph more then _n_ times. However,
|
| 279 |
+
|
| 280 |
+
|
| 281 |
+
Tarjan (1977) gives an efficient implementation of
|
| 282 |
+
the algorithm with _O_ ( _n_ [2] ) time complexity for dense
|
| 283 |
+
graphs, which is what we need here.
|
| 284 |
+
To find the highest scoring non-projective tree for
|
| 285 |
+
a sentence, _**x**_, we simply construct the graph _G_ _**x**_
|
| 286 |
+
and run it through the Chu-Liu-Edmonds algorithm.
|
| 287 |
+
The resulting spanning tree is the best non-projective
|
| 288 |
+
dependency tree. We illustrate here the application
|
| 289 |
+
of the Chu-Liu-Edmonds algorithm to dependency
|
| 290 |
+
parsing on the simple example _**x**_ = _John saw Mary_,
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
This is a tree and thus the MST of this graph. We
|
| 295 |
+
now need to go up a level and reconstruct the graph.
|
| 296 |
+
The edge from _wjs_ to _Mary_ originally was from the
|
| 297 |
+
word _saw_, so we include that edge. Furthermore, the
|
| 298 |
+
edge from _root_ to _wjs_ represented a tree from _root_ to
|
| 299 |
+
_saw_ to _John_, so we include all those edges to get the
|
| 300 |
+
final (and correct) MST,
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
_root_
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
|
| 321 |
+
|
| 322 |
+
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
|
| 331 |
+
|
| 332 |
+
|
| 333 |
+
word, the highest scoring incoming edge
|
| 334 |
+
|
| 335 |
+
|
| 336 |
+
_root_
|
| 337 |
+
|
| 338 |
+
|
| 339 |
+
maximum spanning tree. However, in this case we
|
| 340 |
+
have a cycle, so we will contract it into a single node
|
| 341 |
+
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
|
| 345 |
+
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
|
| 349 |
+
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
|
| 360 |
+
vertices _John_ and _saw_ . The edge from _wjs_ to _Mary_
|
| 361 |
+
is 30 since that is the highest scoring edge from any
|
| 362 |
+
vertex in _wjs_ . The edge from _root_ into _wjs_ is set to
|
| 363 |
+
40 since this represents the score of the best spanning tree originating from _root_ and including only
|
| 364 |
+
the vertices in _wjs_ . The same leads to the edge
|
| 365 |
+
from _Mary_ to _wjs_ . The fundamental property of the
|
| 366 |
+
Chu-Liu-Edmonds algorithm is that an MST in this
|
| 367 |
+
graph can be transformed into an MST in the original graph (Leonidas, 2003). Thus, we recursively
|
| 368 |
+
call the algorithm on this graph. Note that we need
|
| 369 |
+
to keep track of the real endpoints of the edges into
|
| 370 |
+
and out of _wjs_ for reconstruction later. Running the
|
| 371 |
+
algorithm, we must find the best incoming edge to
|
| 372 |
+
all words
|
| 373 |
+
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
_saw_
|
| 377 |
+
|
| 378 |
+
|
| 379 |
+
_John_ _Mary_
|
| 380 |
+
|
| 381 |
+
A possible concern with searching the entire space
|
| 382 |
+
of spanning trees is that we have not used any syntactic constraints to guide the search. Many languages that allow non-projectivity are still primarily
|
| 383 |
+
projective. By searching all possible non-projective
|
| 384 |
+
trees, we run the risk of finding extremely bad trees.
|
| 385 |
+
We address this concern in Section 4.
|
| 386 |
+
|
| 387 |
+
**2.2.2** **Projective Trees**
|
| 388 |
+
It is well known that projective dependency parsing using edge based factorization can be handled
|
| 389 |
+
with the Eisner algorithm (Eisner, 1996). This algorithm has a runtime of _O_ ( _n_ [3] ) and has been employed successfully in both generative and discriminative parsing models (Eisner, 1996; McDonald et
|
| 390 |
+
al., 2005). Furthermore, it is trivial to show that
|
| 391 |
+
the Eisner algorithm solves the maximum projective
|
| 392 |
+
spanning tree problem.
|
| 393 |
+
The Eisner algorithm differs significantly from
|
| 394 |
+
the Chu-Liu-Edmonds algorithm. First of all, it is a
|
| 395 |
+
bottom-up dynamic programming algorithm as opposed to a greedy recursive one. A bottom-up algorithm is necessary for the projective case since it
|
| 396 |
+
must maintain the nested structural constraint, which
|
| 397 |
+
is unnecessary for the non-projective case.
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
**2.3** **Dependency Trees as MSTs: Summary**
|
| 401 |
+
|
| 402 |
+
In the preceding discussion, we have shown that natural language dependency parsing can be reduced to
|
| 403 |
+
finding maximum spanning trees in directed graphs.
|
| 404 |
+
This reduction results from edge-based factorization and can be applied to projective languages with
|
| 405 |
+
|
| 406 |
+
|
| 407 |
+
|
| 408 |
+
526
|
| 409 |
+
|
| 410 |
+
|
| 411 |
+
the Eisner parsing algorithm and non-projective languages with the Chu-Liu-Edmonds maximum spanning tree algorithm. The only remaining problem is
|
| 412 |
+
how to learn the weight vector **w** .
|
| 413 |
+
A major advantage of our approach over other
|
| 414 |
+
dependency parsing models is its uniformity and
|
| 415 |
+
simplicity. By viewing dependency structures as
|
| 416 |
+
spanning trees, we have provided a general framework for parsing trees for both projective and nonprojective languages. Furthermore, the resulting
|
| 417 |
+
parsing algorithms are more efficient than lexicalized phrase structure approaches to dependency
|
| 418 |
+
parsing, allowing us to search the entire space without any pruning. In particular the non-projective
|
| 419 |
+
parsing algorithm based on the Chu-Liu-Edmonds
|
| 420 |
+
MST algorithm provides _true_ non-projective parsing. This is in contrast to other non-projective methods, such as that of Nivre and Nilsson (2005), who
|
| 421 |
+
implement non-projectivity in a _pseudo-projective_
|
| 422 |
+
parser with edge transformations. This formulation
|
| 423 |
+
also dispels the notion that non-projective parsing is
|
| 424 |
+
“harder” than projective parsing. In fact, it is easier since non-projective parsing does not need to enforce the non-crossing constraint of projective trees.
|
| 425 |
+
As a result, non-projective parsing complexity is just
|
| 426 |
+
_O_ ( _n_ [2] ), against the _O_ ( _n_ [3] ) complexity of the Eisner dynamic programming algorithm, which by construction enforces the non-crossing constraint.
|
| 427 |
+
|
| 428 |
+
|
| 429 |
+
**3** **Online Large Margin Learning**
|
| 430 |
+
|
| 431 |
+
|
| 432 |
+
In this section, we review the work of McDonald et
|
| 433 |
+
al. (2005) for online large-margin dependency parsing. As usual for supervised learning, we assume a
|
| 434 |
+
training set T = {( _**x**_ _t,_ _**y**_ _t_ )} _[T]_ _t_ =1 [, consisting of pairs]
|
| 435 |
+
of a sentence _**x**_ _t_ and its correct dependency tree _**y**_ _t_ .
|
| 436 |
+
In what follows, dt( _**x**_ ) denotes the set of possible
|
| 437 |
+
dependency trees for sentence _**x**_ .
|
| 438 |
+
The basic idea is to extend the Margin Infused
|
| 439 |
+
Relaxed Algorithm (MIRA) (Crammer and Singer,
|
| 440 |
+
2003; Crammer et al., 2003) to learning with structured outputs, in the present case dependency trees.
|
| 441 |
+
Figure 4 gives pseudo-code for the MIRA algorithm
|
| 442 |
+
as presented by McDonald et al. (2005). An online learning algorithm considers a single training
|
| 443 |
+
instance at each update to **w** . The auxiliary vector
|
| 444 |
+
**v** accumulates the successive values of **w**, so that the
|
| 445 |
+
final weight vector is the _average_ of the weight vec
|
| 446 |
+
|
| 447 |
+
527
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
Training data: _T_ = _{_ (x _t,_ y _t_ ) _}_ _[T]_ _t_ =1
|
| 452 |
+
1. **w** 0 = 0; **v** = 0; _i_ = 0
|
| 453 |
+
|
| 454 |
+
2. for _n_ : 1 _..N_
|
| 455 |
+
|
| 456 |
+
3. for _t_ : 1 _..T_
|
| 457 |
+
4. min ‚‚‚ **w** ( _i_ +1) _−_ **w** ( _i_ )‚‚‚
|
| 458 |
+
s.t. _s_ (x _t,_ y _t_ ) _−_ _s_ (x _t,_ y _[′]_ ) _≥_ _L_ (y _t,_ y _[′]_ ) _, ∀_ y _[′]_ _∈_ dt(x _t_ )
|
| 459 |
+
|
| 460 |
+
5. **v** = **v** + **w** [(] _[i]_ [+1)]
|
| 461 |
+
|
| 462 |
+
6. _i_ = _i_ + 1
|
| 463 |
+
|
| 464 |
+
7. **w** = **v** _/_ ( _N ∗_ _T_ )
|
| 465 |
+
|
| 466 |
+
|
| 467 |
+
Figure 4: MIRA learning algorithm.
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
tors after each iteration. This averaging effect has
|
| 471 |
+
been shown to help overfitting (Collins, 2002).
|
| 472 |
+
On each update, MIRA attempts to keep the new
|
| 473 |
+
weight vector as close as possible to the old weight
|
| 474 |
+
vector, subject to correctly classifying the instance
|
| 475 |
+
under consideration with a margin given by the loss
|
| 476 |
+
of the incorrect classifications. For dependency
|
| 477 |
+
trees, the loss of a tree is defined to be the number
|
| 478 |
+
of words with incorrect parents relative to the correct
|
| 479 |
+
tree. This is closely related to the Hamming loss that
|
| 480 |
+
is often used for sequences (Taskar et al., 2003).
|
| 481 |
+
For arbitrary inputs, there are typically exponentially many possible parses and thus exponentially
|
| 482 |
+
many margin constraints in line 4 of Figure 4.
|
| 483 |
+
|
| 484 |
+
**3.1** **Single-best MIRA**
|
| 485 |
+
|
| 486 |
+
One solution for the exponential blow-up in number
|
| 487 |
+
of trees is to relax the optimization by using only the
|
| 488 |
+
single margin constraint for the tree with the highest
|
| 489 |
+
score, _s_ ( _**x**_ _,_ _**y**_ ). The resulting online update (to be
|
| 490 |
+
inserted in Figure 4, line 4) would then be:
|
| 491 |
+
|
| 492 |
+
min �� **w** ( _i_ +1) − **w** ( _i_ )��
|
| 493 |
+
s.t. _s_ ( _**x**_ _t,_ _**y**_ _t_ ) − _s_ ( _**x**_ _t,_ _**y**_ _[′]_ ) ≥ _L_ ( _**y**_ _t,_ _**y**_ _[′]_ )
|
| 494 |
+
where _**y**_ _[′]_ = arg max _y′ s_ ( _**x**_ _t,_ _**y**_ _[′]_ )
|
| 495 |
+
|
| 496 |
+
McDonald et al. (2005) used a similar update with
|
| 497 |
+
_k_ constraints for the _k_ highest-scoring trees, and
|
| 498 |
+
showed that small values of _k_ are sufficient to
|
| 499 |
+
achieve the best accuracy for these methods. However, here we stay with a single best tree because _k_ best extensions to the Chu-Liu-Edmonds algorithm
|
| 500 |
+
are too inefficient (Hou, 1996).
|
| 501 |
+
This model is related to the averaged perceptron
|
| 502 |
+
algorithm of Collins (2002). In that algorithm, the
|
| 503 |
+
single highest scoring tree (or structure) is used to
|
| 504 |
+
update the weight vector. However, MIRA aggressively updates **w** to maximize the margin between
|
| 505 |
+
|
| 506 |
+
|
| 507 |
+
the correct tree and the highest scoring tree, which
|
| 508 |
+
has been shown to lead to increased accuracy.
|
| 509 |
+
|
| 510 |
+
|
| 511 |
+
**3.2** **Factored MIRA**
|
| 512 |
+
|
| 513 |
+
It is also possible to exploit the structure of the output space and factor the exponential number of margin constraints into a polynomial number of local
|
| 514 |
+
constraints (Taskar et al., 2003; Taskar et al., 2004).
|
| 515 |
+
For the directed maximum spanning tree problem,
|
| 516 |
+
we can factor the output by edges to obtain the following constraints:
|
| 517 |
+
|
| 518 |
+
min �� **w** ( _i_ +1) − **w** ( _i_ )��
|
| 519 |
+
s.t. _s_ ( _l, j_ ) − _s_ ( _k, j_ ) ≥ 1
|
| 520 |
+
∀( _l, j_ ) ∈ _**y**_ _t,_ ( _k, j_ ) _/_ ∈ _**y**_ _t_
|
| 521 |
+
|
| 522 |
+
|
| 523 |
+
This states that the weight of the correct incoming
|
| 524 |
+
edge to the word _xj_ and the weight of all other incoming edges must be separated by a margin of 1.
|
| 525 |
+
It is easy to show that when all these constraints
|
| 526 |
+
are satisfied, the correct spanning tree and all incorrect spanning trees are separated by a score at least
|
| 527 |
+
as large as the number of incorrect incoming edges.
|
| 528 |
+
This is because the scores for all the correct arcs cancel out, leaving only the scores for the errors causing
|
| 529 |
+
the difference in overall score. Since each single error results in a score increase of at least 1, the entire
|
| 530 |
+
score difference must be at least the number of errors. For sequences, this form of factorization has
|
| 531 |
+
been called local lattice preference (Crammer et al.,
|
| 532 |
+
2004). Let _n_ be the number of nodes in graph _G_ _**x**_ .
|
| 533 |
+
Then the number of constraints is _O_ ( _n_ [2] ), since for
|
| 534 |
+
each node we must maintain _n_ - 1 constraints.
|
| 535 |
+
The factored constraints are in general more restrictive than the original constraints, so they may
|
| 536 |
+
rule out the optimal solution to the original problem. McDonald et al. (2005) examines briefly factored MIRA for projective English dependency parsing, but for that application, _k_ -best MIRA performs
|
| 537 |
+
as well or better, and is much faster to train.
|
| 538 |
+
|
| 539 |
+
|
| 540 |
+
**4** **Experiments**
|
| 541 |
+
|
| 542 |
+
We performed experiments on the Czech Prague Dependency Treebank (PDT) (Hajiˇc, 1998; Hajiˇc et al.,
|
| 543 |
+
2001). We used the predefined training, development and testing split of this data set. Furthermore,
|
| 544 |
+
we used the automatically generated POS tags that
|
| 545 |
+
are provided with the data. Czech POS tags are very
|
| 546 |
+
|
| 547 |
+
|
| 548 |
+
528
|
| 549 |
+
|
| 550 |
+
|
| 551 |
+
|
| 552 |
+
complex, consisting of a series of slots that may or
|
| 553 |
+
may not be filled with some value. These slots represent lexical and grammatical properties such as
|
| 554 |
+
standard POS, case, gender, and tense. The result
|
| 555 |
+
is that Czech POS tags are rich in information, but
|
| 556 |
+
quite sparse when viewed as a whole. To reduce
|
| 557 |
+
sparseness, our features rely only on the reduced
|
| 558 |
+
POS tag set from Collins et al. (1999). The number of features extracted from the PDT training set
|
| 559 |
+
was 13 _,_ 450 _,_ 672, using the feature set outlined by
|
| 560 |
+
McDonald et al. (2005).
|
| 561 |
+
Czech has more flexible word order than English
|
| 562 |
+
and as a result the PDT contains non-projective dependencies. On average, 23% of the sentences in
|
| 563 |
+
the training, development and test sets have at least
|
| 564 |
+
one non-projective dependency. However, less than
|
| 565 |
+
2% of total edges are actually non-projective. Therefore, handling non-projective edges correctly has a
|
| 566 |
+
relatively small effect on overall accuracy. To show
|
| 567 |
+
the effect more clearly, we created two Czech data
|
| 568 |
+
sets. The first, Czech-A, consists of the entire PDT.
|
| 569 |
+
The second, Czech-B, includes only the 23% of sentences with at least one non-projective dependency.
|
| 570 |
+
This second set will allow us to analyze the effectiveness of the algorithms on non-projective material. We compared the following systems:
|
| 571 |
+
|
| 572 |
+
1. **COLL1999:** The projective lexicalized phrase-structure
|
| 573 |
+
parser of Collins et al. (1999).
|
| 574 |
+
|
| 575 |
+
2. **N&N2005:** The pseudo-projective parser of Nivre and
|
| 576 |
+
Nilsson (2005).
|
| 577 |
+
|
| 578 |
+
3. **McD2005:** The projective parser of McDonald et al.
|
| 579 |
+
(2005) that uses the Eisner algorithm for both training and
|
| 580 |
+
testing. This system uses _k_ -best MIRA with _k_ =5.
|
| 581 |
+
|
| 582 |
+
4. **Single-best MIRA:** In this system we use the Chu-LiuEdmonds algorithm to find the best dependency tree for
|
| 583 |
+
Single-best MIRA training and testing.
|
| 584 |
+
|
| 585 |
+
5. **Factored MIRA:** Uses the quadratic set of constraints
|
| 586 |
+
based on edge factorization as described in Section 3.2.
|
| 587 |
+
We use the Chu-Liu-Edmonds algorithm to find the best
|
| 588 |
+
tree for the test data.
|
| 589 |
+
|
| 590 |
+
|
| 591 |
+
**4.1** **Results**
|
| 592 |
+
|
| 593 |
+
Results are shown in Table 1. There are two main
|
| 594 |
+
metrics. The first and most widely recognized is _Ac-_
|
| 595 |
+
_curacy_, which measures the number of words that
|
| 596 |
+
correctly identified their parent in the tree. _Complete_
|
| 597 |
+
measures the number of sentences in which the resulting tree was completely correct.
|
| 598 |
+
Clearly, there is an advantage in using the ChuLiu-Edmonds algorithm for Czech dependency pars
|
| 599 |
+
|
| 600 |
+
**Czech-A** **Czech-B**
|
| 601 |
+
**Accuracy** **Complete** **Accuracy** **Complete**
|
| 602 |
+
COLL1999 82.8 - - N&N2005 80.0 31.8 - McD2005 83.3 31.3 74.8 0.0
|
| 603 |
+
Single-best MIRA 84.1 32.2 81.0 **14.9**
|
| 604 |
+
Factored MIRA **84.4** **32.3** **81.5** 14.3
|
| 605 |
+
|
| 606 |
+
|
| 607 |
+
Table 1: Dependency parsing results for Czech. Czech-B is the subset of Czech-A containing only sentences
|
| 608 |
+
with at least one non-projective dependency.
|
| 609 |
+
|
| 610 |
+
|
| 611 |
+
|
| 612 |
+
ing. Even though less than 2% of all dependencies
|
| 613 |
+
are non-projective, we still see an absolute improvement of up to 1 _._ 1% in overall accuracy over the
|
| 614 |
+
projective model. Furthermore, when we focus on
|
| 615 |
+
the subset of data that only contains sentences with
|
| 616 |
+
at least one non-projective dependency, the effect
|
| 617 |
+
is amplified. Another major improvement here is
|
| 618 |
+
that the Chu-Liu-Edmonds non-projective MST algorithm has a parsing complexity of _O_ ( _n_ [2] ), versus
|
| 619 |
+
the _O_ ( _n_ [3] ) complexity of the projective Eisner algorithm, which in practice leads to improvements in
|
| 620 |
+
parsing time. The results also show that in terms
|
| 621 |
+
of _Accuracy_, factored MIRA performs better than
|
| 622 |
+
single-best MIRA. However, for the factored model,
|
| 623 |
+
we do have _O_ ( _n_ [2] ) margin constraints, which results in a significant increase in training time over
|
| 624 |
+
single-best MIRA. Furthermore, we can also see that
|
| 625 |
+
the MST parsers perform favorably compared to the
|
| 626 |
+
more powerful lexicalized phrase-structure parsers,
|
| 627 |
+
such as those presented by Collins et al. (1999) and
|
| 628 |
+
Zeman (2004) that use expensive _O_ ( _n_ [5] ) parsing algorithms. We should note that the results in Collins
|
| 629 |
+
et al. (1999) are different then reported here due to
|
| 630 |
+
different training and testing data sets.
|
| 631 |
+
One concern raised in Section 2.2.1 is that searching the entire space of non-projective trees could
|
| 632 |
+
cause problems for languages that are primarily projective. However, as we can see, this is not a problem. This is because the model sets its weights with
|
| 633 |
+
respect to the parsing algorithm and will disfavor
|
| 634 |
+
features over unlikely non-projective edges.
|
| 635 |
+
Since the space of projective trees is a subset of
|
| 636 |
+
the space of non-projective trees, it is natural to wonder how the Chu-Liu-Edmonds parsing algorithm
|
| 637 |
+
performs on projective data since it is asymptotically
|
| 638 |
+
better than the Eisner algorithm. Table 2 shows the
|
| 639 |
+
results for English projective dependency trees extracted from the Penn Treebank (Marcus et al., 1993)
|
| 640 |
+
using the rules of Yamada and Matsumoto (2003).
|
| 641 |
+
|
| 642 |
+
|
| 643 |
+
529
|
| 644 |
+
|
| 645 |
+
|
| 646 |
+
|
| 647 |
+
**English**
|
| 648 |
+
**Accuracy** **Complete**
|
| 649 |
+
McD2005 **90.9** **37.5**
|
| 650 |
+
Single-best MIRA 90.2 33.2
|
| 651 |
+
Factored MIRA 90.2 32.3
|
| 652 |
+
|
| 653 |
+
|
| 654 |
+
Table 2: Dependency parsing results for English using spanning tree algorithms.
|
| 655 |
+
|
| 656 |
+
|
| 657 |
+
This shows that for projective data sets, training
|
| 658 |
+
and testing with the Chu-Liu-Edmonds algorithm is
|
| 659 |
+
worse than using the Eisner algorithm. This is not
|
| 660 |
+
surprising since the Eisner algorithm uses the a priori knowledge that all trees are projective.
|
| 661 |
+
|
| 662 |
+
|
| 663 |
+
**5** **Discussion**
|
| 664 |
+
|
| 665 |
+
|
| 666 |
+
We presented a general framework for parsing dependency trees based on an equivalence to maximum spanning trees in directed graphs. This framework provides natural and efficient mechanisms
|
| 667 |
+
for parsing both projective and non-projective languages through the use of the Eisner and Chu-LiuEdmonds algorithms. To learn these structures we
|
| 668 |
+
used online large-margin learning (McDonald et al.,
|
| 669 |
+
2005) that empirically provides state-of-the-art performance for Czech.
|
| 670 |
+
A major advantage of our models is the ability to naturally model non-projective parses. Nonprojective parsing is commonly considered more
|
| 671 |
+
difficult than projective parsing. However, under
|
| 672 |
+
our framework, we show that the opposite is actually
|
| 673 |
+
true that non-projective parsing has a lower asymptotic complexity. Using this framework, we presented results showing that the non-projective model
|
| 674 |
+
outperforms the projective model on the Prague Dependency Treebank, which contains a small number
|
| 675 |
+
of non-projective edges.
|
| 676 |
+
Our method requires a tree score that decomposes
|
| 677 |
+
according to the edges of the dependency tree. One
|
| 678 |
+
might hope that the method would generalize to
|
| 679 |
+
|
| 680 |
+
|
| 681 |
+
include features of larger substructures. Unfortunately, that would make the search for the best tree
|
| 682 |
+
intractable (H¨offgen, 1993).
|
| 683 |
+
|
| 684 |
+
|
| 685 |
+
**Acknowledgments**
|
| 686 |
+
|
| 687 |
+
We thank Lillian Lee for bringing an important
|
| 688 |
+
missed connection to our attention, and Koby Crammer for his help with learning algorithms. This work
|
| 689 |
+
has been supported by NSF ITR grants 0205448 and
|
| 690 |
+
0428193.
|
| 691 |
+
|
| 692 |
+
|
| 693 |
+
**References**
|
| 694 |
+
|
| 695 |
+
Y.J. Chu and T.H. Liu. 1965. On the shortest arborescence of a directed graph. _Science Sinica_, 14:1396–
|
| 696 |
+
1400.
|
| 697 |
+
|
| 698 |
+
|
| 699 |
+
M. Collins, J. Hajiˇc, L. Ramshaw, and C. Tillmann. 1999.
|
| 700 |
+
A statistical parser for Czech. In _Proc. ACL_ .
|
| 701 |
+
|
| 702 |
+
|
| 703 |
+
M. Collins. 2002. Discriminative training methods for
|
| 704 |
+
hidden Markov models: Theory and experiments with
|
| 705 |
+
perceptron algorithms. In _Proc. EMNLP_ .
|
| 706 |
+
|
| 707 |
+
|
| 708 |
+
T.H. Cormen, C.E. Leiserson, and R.L. Rivest. 1990. _In-_
|
| 709 |
+
_troduction to Algorithms_ . MIT Press/McGraw-Hill.
|
| 710 |
+
|
| 711 |
+
|
| 712 |
+
K. Crammer and Y. Singer. 2003. Ultraconservative online algorithms for multiclass problems. _JMLR_ .
|
| 713 |
+
|
| 714 |
+
|
| 715 |
+
K. Crammer, O. Dekel, S. Shalev-Shwartz, and Y. Singer.
|
| 716 |
+
2003. Online passive aggressive algorithms. In _Proc._
|
| 717 |
+
_NIPS_ .
|
| 718 |
+
|
| 719 |
+
|
| 720 |
+
K. Crammer, R. McDonald, and F. Pereira. 2004. New
|
| 721 |
+
large margin algorithms for structured prediction. In
|
| 722 |
+
_Learning with Structured Outputs Workshop (NIPS)_ .
|
| 723 |
+
|
| 724 |
+
|
| 725 |
+
A. Culotta and J. Sorensen. 2004. Dependency tree kernels for relation extraction. In _Proc. ACL_ .
|
| 726 |
+
|
| 727 |
+
|
| 728 |
+
Y. Ding and M. Palmer. 2005. Machine translation using
|
| 729 |
+
probabilistic synchronous dependency insertion grammars. In _Proc. ACL_ .
|
| 730 |
+
|
| 731 |
+
|
| 732 |
+
J. Edmonds. 1967. Optimum branchings. _Journal of Re-_
|
| 733 |
+
_search of the National Bureau of Standards_, 71B:233–
|
| 734 |
+
240.
|
| 735 |
+
|
| 736 |
+
|
| 737 |
+
J. Eisner. 1996. Three new probabilistic models for dependency parsing: An exploration. In _Proc. COLING_ .
|
| 738 |
+
|
| 739 |
+
|
| 740 |
+
J. Hajiˇc, E. Hajicova, P. Pajas, J. Panevova, P. Sgall, and
|
| 741 |
+
B. Vidova Hladka. 2001. The Prague Dependency
|
| 742 |
+
Treebank 1.0 CDROM. Linguistics Data Consortium
|
| 743 |
+
Cat. No. LDC2001T10.
|
| 744 |
+
|
| 745 |
+
|
| 746 |
+
530
|
| 747 |
+
|
| 748 |
+
|
| 749 |
+
|
| 750 |
+
J. Hajiˇc. 1998. Building a syntactically annotated corpus: The Prague dependency treebank. _Issues of Va-_
|
| 751 |
+
_lency and Meaning_, pages 106–132.
|
| 752 |
+
|
| 753 |
+
H. Hirakawa. 2001. Semantic dependency analysis
|
| 754 |
+
method for Japanese based on optimum tree search algorithm. In _Proc. of PACLING_ .
|
| 755 |
+
|
| 756 |
+
Klaus-U. H¨offgen. 1993. Learning and robust learning
|
| 757 |
+
of product distributions. In _Proceedings of COLT’93_,
|
| 758 |
+
pages 77–83.
|
| 759 |
+
|
| 760 |
+
W. Hou. 1996. Algorithm for finding the first k shortest
|
| 761 |
+
arborescences of a digraph. _Mathematica Applicata_,
|
| 762 |
+
9(1):1–4.
|
| 763 |
+
|
| 764 |
+
R. Hudson. 1984. _Word Grammar_ . Blackwell.
|
| 765 |
+
|
| 766 |
+
G. Leonidas. 2003. Arborescence optimization problems
|
| 767 |
+
solvable by Edmonds’ algorithm. _Theoretical Com-_
|
| 768 |
+
_puter Science_, 301:427 – 437.
|
| 769 |
+
|
| 770 |
+
M. Marcus, B. Santorini, and M. Marcinkiewicz. 1993.
|
| 771 |
+
Building a large annotated corpus of English: the Penn
|
| 772 |
+
Treebank. _Computational Linguistics_, 19(2):313–330.
|
| 773 |
+
|
| 774 |
+
R. McDonald, K. Crammer, and F. Pereira. 2005. Online
|
| 775 |
+
large-margin training of dependency parsers. In _Proc._
|
| 776 |
+
_ACL_ .
|
| 777 |
+
|
| 778 |
+
J. Nivre and J. Nilsson. 2005. Pseudo-projective dependency parsing. In _Proc. ACL_ .
|
| 779 |
+
|
| 780 |
+
J. Nivre and M. Scholz. 2004. Deterministic dependency
|
| 781 |
+
parsing of english text. In _Proc. COLING_ .
|
| 782 |
+
|
| 783 |
+
Y. Shinyama, S. Sekine, K. Sudo, and R. Grishman.
|
| 784 |
+
2002. Automatic paraphrase acquisition from news articles. In _Proc. HLT_ .
|
| 785 |
+
|
| 786 |
+
R. Snow, D. Jurafsky, and A. Y. Ng. 2004. Learning
|
| 787 |
+
syntactic patterns for automatic hypernym discovery.
|
| 788 |
+
In _NIPS 2004_ .
|
| 789 |
+
|
| 790 |
+
R.E. Tarjan. 1977. Finding optimum branchings. _Net-_
|
| 791 |
+
_works_, 7:25–35.
|
| 792 |
+
|
| 793 |
+
B. Taskar, C. Guestrin, and D. Koller. 2003. Max-margin
|
| 794 |
+
Markov networks. In _Proc. NIPS_ .
|
| 795 |
+
|
| 796 |
+
B. Taskar, D. Klein, M. Collins, D. Koller, and C. Manning. 2004. Max-margin parsing. In _Proc. EMNLP_ .
|
| 797 |
+
|
| 798 |
+
W. Wang and M. P. Harper. 2004. A statistical constraint
|
| 799 |
+
dependency grammar (CDG) parser. In _Workshop on_
|
| 800 |
+
_Incremental Parsing: Bringing Engineering and Cog-_
|
| 801 |
+
_nition Together (ACL)_ .
|
| 802 |
+
|
| 803 |
+
H. Yamada and Y. Matsumoto. 2003. Statistical dependency analysis with support vector machines. In _Proc._
|
| 804 |
+
_IWPT_ .
|
| 805 |
+
|
| 806 |
+
D. Zeman. 2004. _Parsing with a Statistical Dependency_
|
| 807 |
+
_Model_ . Ph.D. thesis, Univerzita Karlova, Praha.
|
| 808 |
+
|
| 809 |
+
|
references/2005.emnlp.mcdonald/paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b28a57bb169fe51c0211b2cd40b8cf218a259f1b37351707a8e4648c472b53e
|
| 3 |
+
size 199976
|
references/2006.eacl.mcdonald/paper.md
ADDED
|
@@ -0,0 +1,942 @@
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: "Online Learning of Approximate Dependency Parsing Algorithms"
|
| 3 |
+
authors:
|
| 4 |
+
- "Ryan McDonald"
|
| 5 |
+
- "Fernando Pereira"
|
| 6 |
+
year: 2006
|
| 7 |
+
venue: "EACL 2006"
|
| 8 |
+
url: "https://aclanthology.org/E06-1011/"
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# **Online Learning of Approximate Dependency Parsing Algorithms**
|
| 12 |
+
|
| 13 |
+
**Ryan McDonald** **Fernando Pereira**
|
| 14 |
+
Department of Computer and Information Science
|
| 15 |
+
University of Pennsylvania
|
| 16 |
+
Philadelphia, PA 19104
|
| 17 |
+
```
|
| 18 |
+
{ryantm,pereira}@cis.upenn.edu
|
| 19 |
+
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
**Abstract**
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
In this paper we extend the maximum
|
| 27 |
+
spanning tree (MST) dependency parsing
|
| 28 |
+
framework of McDonald et al. (2005c)
|
| 29 |
+
to incorporate higher-order feature representations and allow dependency structures with multiple parents per word.
|
| 30 |
+
We show that those extensions can make
|
| 31 |
+
the MST framework computationally intractable, but that the intractability can be
|
| 32 |
+
circumvented with new approximate parsing algorithms. We conclude with experiments showing that discriminative online learning using those approximate algorithms achieves the best reported parsing accuracy for Czech and Danish.
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
**1** **Introduction**
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
Dependency representations of sentences (Hudson, 1984; Me [´] lˇcuk, 1988) model head-dependent
|
| 39 |
+
syntactic relations as edges in a directed graph.
|
| 40 |
+
Figure 1 displays a dependency representation for
|
| 41 |
+
the sentence _John hit the ball with the bat_ . This
|
| 42 |
+
sentence is an example of a projective (or nested)
|
| 43 |
+
tree representation, in which all edges can be
|
| 44 |
+
drawn in the plane with none crossing. Sometimes
|
| 45 |
+
a non-projective representations are preferred, as
|
| 46 |
+
in the sentence in Figure 2. [1] In particular, for
|
| 47 |
+
freer-word order languages, non-projectivity is a
|
| 48 |
+
common phenomenon since the relative positional
|
| 49 |
+
constraints on dependents is much less rigid. The
|
| 50 |
+
dependency structures in Figures 1 and 2 satisfy
|
| 51 |
+
the _tree constraint_ : they are weakly connected
|
| 52 |
+
graphs with a unique root node, and each non-root
|
| 53 |
+
node has a exactly one parent. Though trees are
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
1Examples are drawn from McDonald et al. (2005c).
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
more common, some formalisms allow for words
|
| 61 |
+
to modify multiple parents (Hudson, 1984).
|
| 62 |
+
Recently, McDonald et al. (2005c) have shown
|
| 63 |
+
that treating dependency parsing as the search
|
| 64 |
+
for the highest scoring maximum spanning tree
|
| 65 |
+
(MST) in a graph yields efficient algorithms for
|
| 66 |
+
both projective and non-projective trees. When
|
| 67 |
+
combined with a discriminative online learning algorithm and a rich feature set, these models provide state-of-the-art performance across multiple
|
| 68 |
+
languages. However, the parsing algorithms require that the score of a dependency tree factors
|
| 69 |
+
as a sum of the scores of its edges. This _first-order_
|
| 70 |
+
_factorization_ is very restrictive since it only allows
|
| 71 |
+
for features to be defined over single attachment
|
| 72 |
+
decisions. Previous work has shown that conditioning on neighboring decisions can lead to significant improvements in accuracy (Yamada and
|
| 73 |
+
Matsumoto, 2003; Charniak, 2000).
|
| 74 |
+
In this paper we extend the MST parsing framework to incorporate higher-order feature representations of bounded-size connected subgraphs. We
|
| 75 |
+
also present an algorithm for acyclic dependency
|
| 76 |
+
graphs, that is, dependency graphs in which a
|
| 77 |
+
word may depend on multiple heads. In both cases
|
| 78 |
+
parsing is in general intractable and we provide
|
| 79 |
+
novel approximate algorithms to make these cases
|
| 80 |
+
tractable. We evaluate these algorithms within
|
| 81 |
+
an online learning framework, which has been
|
| 82 |
+
shown to be robust with respect approximate inference, and describe experiments displaying that
|
| 83 |
+
these new models lead to state-of-the-art accuracy
|
| 84 |
+
for English and the best accuracy we know of for
|
| 85 |
+
Czech and Danish.
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
**2** **Maximum Spanning Tree Parsing**
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
Dependency-tree parsing as the search for the
|
| 92 |
+
maximum spanning tree (MST) in a graph was
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
81
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
root John saw a dog yesterday which was a Yorkshire Terrier
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
Figure 2: An example non-projective dependency structure.
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
root
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
hit
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
the
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
root0 John1 hit2 the3 ball4 with5 the6 bat7
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
Figure 1: An example dependency structure.
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
proposed by McDonald et al. (2005c). This formulation leads to efficient parsing algorithms for both
|
| 121 |
+
projective and non-projective dependency trees
|
| 122 |
+
with the Eisner algorithm (Eisner, 1996) and the
|
| 123 |
+
Chu-Liu-Edmonds algorithm (Chu and Liu, 1965;
|
| 124 |
+
Edmonds, 1967) respectively. The formulation
|
| 125 |
+
works by defining the score of a dependency tree
|
| 126 |
+
to be the sum of edge scores,
|
| 127 |
+
|
| 128 |
+
s(x, y) = s(i, j)
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
(i,j)∈y
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
where x = x1 · · · xn is an input sentence and y
|
| 135 |
+
a dependency tree for x. We can view y as a set
|
| 136 |
+
of tree edges and write (i, j) ∈ y to indicate an
|
| 137 |
+
edge in y from word xi to word xj. Consider the
|
| 138 |
+
example from Figure 1, where the subscripts index
|
| 139 |
+
the nodes of the tree. The score of this tree would
|
| 140 |
+
then be,
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
s(0, 2) + s(2, 1) + s(2, 4) + s(2, 5)
|
| 144 |
+
+ s(4, 3) + s(5, 7) + s(7, 6)
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
We call this _first-order_ dependency parsing since
|
| 148 |
+
scores are restricted to a single edge in the dependency tree. The score of an edge is in turn computed as the inner product of a high-dimensional
|
| 149 |
+
feature representation of the edge with a corresponding weight vector,
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
s(i, j) = **w** - **f** (i, j)
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
This is a standard linear classifier in which the
|
| 156 |
+
weight vector **w** are the parameters to be learned
|
| 157 |
+
during training. We should note that **f** (i, j) can be
|
| 158 |
+
based on arbitrary features of the edge and the input sequence x.
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
Given a directed graph G = (V, E), the maximum spanning tree (MST) problem is to find the
|
| 163 |
+
highest scoring subgraph of G that satisfies the
|
| 164 |
+
tree constraint over the vertices V . By defining
|
| 165 |
+
a graph in which the words in a sentence are the
|
| 166 |
+
vertices and there is a directed edge between all
|
| 167 |
+
words with a score as calculated above, McDonald et al. (2005c) showed that dependency parsing is equivalent to finding the MST in this graph.
|
| 168 |
+
Furthermore, it was shown that this formulation
|
| 169 |
+
can lead to state-of-the-art results when combined
|
| 170 |
+
with discriminative learning algorithms.
|
| 171 |
+
Although the MST formulation applies to any
|
| 172 |
+
directed graph, our feature representations and one
|
| 173 |
+
of the parsing algorithms (Eisner’s) rely on a linear
|
| 174 |
+
ordering of the vertices, namely the order of the
|
| 175 |
+
words in the sentence.
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
**2.1** **Second-Order MST Parsing**
|
| 179 |
+
|
| 180 |
+
|
| 181 |
+
Restricting scores to a single edge in a dependency tree gives a very impoverished view of dependency parsing. Yamada and Matsumoto (2003)
|
| 182 |
+
showed that keeping a small amount of parsing
|
| 183 |
+
history was crucial to improving parsing performance for their locally-trained shift-reduce SVM
|
| 184 |
+
parser. It is reasonable to assume that other parsing models might benefit from features over previous decisions.
|
| 185 |
+
Here we will focus on methods for parsing
|
| 186 |
+
_second-order_ spanning trees. These models factor the score of the tree into the sum of adjacent
|
| 187 |
+
edge pair scores. To quantify this, consider again
|
| 188 |
+
the example from Figure 1. In the second-order
|
| 189 |
+
spanning tree model, the score would be,
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
s(0, −, 2) + s(2, −, 1) + s(2, −, 4) + s(2, 4, 5)
|
| 193 |
+
+ s(4, −, 3) + s(5, −, 7) + s(7, −, 6)
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
Here we use the second-order score function
|
| 197 |
+
s(i, k, j), which is the score of creating a pair of
|
| 198 |
+
adjacent edges, from word xi to words xk and xj.
|
| 199 |
+
For instance, s(2, 4, 5) is the score of creating the
|
| 200 |
+
edges from _hit_ to _with_ and from _hit_ to _ball_ . The
|
| 201 |
+
score functions are relative to the left or right of
|
| 202 |
+
the parent and we never score adjacent edges that
|
| 203 |
+
are on different sides of the parent (for instance,
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
82
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
there is no s(2, 1, 4) for the adjacent edges from
|
| 210 |
+
_hit_ to _John_ and _ball_ ). This independence between
|
| 211 |
+
left and right descendants allow us to use a O(n [3] )
|
| 212 |
+
second-order projective parsing algorithm, as we
|
| 213 |
+
will see later. We write s(xi, −, xj) when xj is
|
| 214 |
+
the first left or first right dependent of word xi.
|
| 215 |
+
For example, s(2, −, 4) is the score of creating a
|
| 216 |
+
dependency from _hit_ to _ball_, since _ball_ is the first
|
| 217 |
+
child to the right of _hit_ . More formally, if the word
|
| 218 |
+
xi0 has the children shown in this picture,
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
xi0
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
the score factors as follows:
|
| 225 |
+
|
| 226 |
+
|
| 227 |
+
�j−1
|
| 228 |
+
k=1 [s][(][i][0][, i][k][+1][, i][k][) +][ s][(][i][0][,][ −][, i][j] [)]
|
| 229 |
+
+ s(i0, −, ij+1) + [�][m] k= [−] j [1] +1 [s][(][i][0][, i][k][, i][k][+1][)]
|
| 230 |
+
|
| 231 |
+
|
| 232 |
+
This second-order factorization subsumes the
|
| 233 |
+
first-order factorization, since the score function
|
| 234 |
+
could just ignore the middle argument to simulate
|
| 235 |
+
first-order scoring. The score of a tree for secondorder parsing is now
|
| 236 |
+
|
| 237 |
+
s(x, y) = s(i, k, j)
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
(i,k,j)∈y
|
| 241 |
+
|
| 242 |
+
|
| 243 |
+
where k and j are adjacent, same-side children of
|
| 244 |
+
i in the tree y.
|
| 245 |
+
The second-order model allows us to condition
|
| 246 |
+
on the most recent parsing decision, that is, the last
|
| 247 |
+
dependent picked up by a particular word, which
|
| 248 |
+
is analogous to the the Markov conditioning of in
|
| 249 |
+
the Charniak parser (Charniak, 2000).
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
**2.2** **Exact Projective Parsing**
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
For projective MST parsing, the first-order algorithm can be extended to the second-order case, as
|
| 256 |
+
was noted by Eisner (1996). The intuition behind
|
| 257 |
+
the algorithm is shown graphically in Figure 3,
|
| 258 |
+
which displays both the first-order and secondorder algorithms. In the first-order algorithm, a
|
| 259 |
+
word will gather its left and right dependents independently by gathering each half of the subtree
|
| 260 |
+
rooted by its dependent in separate stages. By
|
| 261 |
+
splitting up chart items into left and right components, the Eisner algorithm only requires 3 indices to be maintained at each step, as discussed in
|
| 262 |
+
detail elsewhere (Eisner, 1996; McDonald et al.,
|
| 263 |
+
2005b). For the second-order algorithm, the key
|
| 264 |
+
insight is to delay the scoring of edges until pairs
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
**2-order-non-proj-approx** (x, s)
|
| 269 |
+
Sentence x = x0 . . . xn, x0 = root
|
| 270 |
+
Weight function s : (i, k, j) `→` R
|
| 271 |
+
1. Let y = **2-order-proj** (x, s)
|
| 272 |
+
2. while true
|
| 273 |
+
3. m = `−∞`, c = `−` 1, p = `−` 1
|
| 274 |
+
4. for j : 1 `· · ·` n
|
| 275 |
+
5. for i : 0 `· · ·` n
|
| 276 |
+
6. y [′] = y[i `→` j]
|
| 277 |
+
7. if `¬` tree(y [′] ) or `∃` k : (i, k, j) `∈` y continue
|
| 278 |
+
8. δ = s(x, y [′] ) `−` s(x, y)
|
| 279 |
+
9. if δ > m
|
| 280 |
+
10. m = δ, c = j, p = i
|
| 281 |
+
11. end for
|
| 282 |
+
12. end for
|
| 283 |
+
13. if m > 0
|
| 284 |
+
14. y = y[p `→` c]
|
| 285 |
+
15. else return y
|
| 286 |
+
16. end while
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
Figure 4: Approximate second-order nonprojective parsing algorithm.
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
of dependents have been gathered. This allows for
|
| 293 |
+
the collection of pairs of adjacent dependents in
|
| 294 |
+
a single stage, which allows for the incorporation
|
| 295 |
+
of second-order scores, while maintaining cubictime parsing.
|
| 296 |
+
The Eisner algorithm can be extended to an
|
| 297 |
+
arbitrary m [th] -order model with a complexity of
|
| 298 |
+
O(n [m][+1] ), for m > 1. An m [th] -order parsing algorithm will work similarly to the second-order algorithm, except that we collect m pairs of adjacent
|
| 299 |
+
dependents in succession before attaching them to
|
| 300 |
+
their parent.
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
**2.3** **Approximate Non-projective Parsing**
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
Unfortunately, second-order non-projective MST
|
| 307 |
+
parsing is NP-hard, as shown in appendix A. To
|
| 308 |
+
circumvent this, we designed an approximate algorithm based on the exact O(n [3] ) second-order
|
| 309 |
+
projective Eisner algorithm. The approximation
|
| 310 |
+
works by first finding the highest scoring projective parse. It then rearranges edges in the tree,
|
| 311 |
+
one at a time, as long as such rearrangements increase the overall score and do not violate the tree
|
| 312 |
+
constraint. We can easily motivate this approximation by observing that even in non-projective
|
| 313 |
+
languages like Czech and Danish, most trees are
|
| 314 |
+
primarily projective with just a few non-projective
|
| 315 |
+
edges (Nivre and Nilsson, 2005). Thus, by starting with the highest scoring projective tree, we are
|
| 316 |
+
typically only a small number of transformations
|
| 317 |
+
away from the highest scoring non-projective tree.
|
| 318 |
+
The algorithm is shown in Figure 4. The expression y[i → j] denotes the dependency graph
|
| 319 |
+
identical to y except that xi’s parent is xi instead
|
| 320 |
+
|
| 321 |
+
|
| 322 |
+
83
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
FIRST-ORDER
|
| 326 |
+
h1
|
| 327 |
+
h3
|
| 328 |
+
|
| 329 |
+
```
|
| 330 |
+
⇒
|
| 331 |
+
|
| 332 |
+
```
|
| 333 |
+
|
| 334 |
+
h1 r r+1 h3
|
| 335 |
+
|
| 336 |
+
|
| 337 |
+
(A)
|
| 338 |
+
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
h1
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
h1 h3
|
| 345 |
+
|
| 346 |
+
|
| 347 |
+
(B)
|
| 348 |
+
|
| 349 |
+
|
| 350 |
+
|
| 351 |
+
SECOND-ORDER
|
| 352 |
+
h1
|
| 353 |
+
|
| 354 |
+
```
|
| 355 |
+
⇒
|
| 356 |
+
|
| 357 |
+
```
|
| 358 |
+
|
| 359 |
+
h1 h2 h2 r r+1 h3
|
| 360 |
+
|
| 361 |
+
|
| 362 |
+
(A)
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
h1
|
| 367 |
+
|
| 368 |
+
```
|
| 369 |
+
⇒
|
| 370 |
+
|
| 371 |
+
```
|
| 372 |
+
|
| 373 |
+
h1 h2 h2 h3
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
(B)
|
| 377 |
+
|
| 378 |
+
|
| 379 |
+
|
| 380 |
+
h1
|
| 381 |
+
|
| 382 |
+
|
| 383 |
+
h1 h3
|
| 384 |
+
|
| 385 |
+
|
| 386 |
+
(C)
|
| 387 |
+
|
| 388 |
+
|
| 389 |
+
|
| 390 |
+
Figure 3: A O(n [3] ) extension of the Eisner algorithm to second-order dependency parsing. This figure
|
| 391 |
+
shows how h1 creates a dependency to h3 with the second-order knowledge that the last dependent of
|
| 392 |
+
h1 was h2. This is done through the creation of a _sibling_ item in part (B). In the first-order model, the
|
| 393 |
+
dependency to h3 is created after the algorithm has forgotten that h2 was the last dependent.
|
| 394 |
+
|
| 395 |
+
|
| 396 |
+
|
| 397 |
+
of what it was in y. The test tree(y) is true iff the
|
| 398 |
+
dependency graph y satisfies the tree constraint.
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
In more detail, line 1 of the algorithm sets y to
|
| 402 |
+
the highest scoring second-order projective tree.
|
| 403 |
+
The loop of lines 2–16 exits only when no further score improvement is possible. Each iteration
|
| 404 |
+
seeks the single highest-scoring parent change to
|
| 405 |
+
y that does not break the tree constraint. To that
|
| 406 |
+
effect, the nested loops starting in lines 4 and 5
|
| 407 |
+
enumerate all (i, j) pairs. Line 6 sets y [′] to the dependency graph obtained from y by changing xj’s
|
| 408 |
+
parent to xi. Line 7 checks that the move from y
|
| 409 |
+
to y [′] is valid by testing that xj’s parent was not already xi and that y [′] is a tree. Line 8 computes the
|
| 410 |
+
score change from y to y [′] . If this change is larger
|
| 411 |
+
than the previous best change, we record how this
|
| 412 |
+
new tree was created (lines 9-10). After considering all possible valid edge changes to the tree,
|
| 413 |
+
the algorithm checks to see that the best new tree
|
| 414 |
+
does have a higher score. If that is the case, we
|
| 415 |
+
change the tree permanently and re-enter the loop.
|
| 416 |
+
Otherwise we exit since there are no single edge
|
| 417 |
+
switches that can improve the score.
|
| 418 |
+
|
| 419 |
+
|
| 420 |
+
This algorithm allows for the introduction of
|
| 421 |
+
non-projective edges because we do not restrict
|
| 422 |
+
any of the edge changes except to maintain the
|
| 423 |
+
tree property. In fact, if any edge change is ever
|
| 424 |
+
made, the resulting tree is guaranteed to be nonprojective, otherwise there would have been a
|
| 425 |
+
higher scoring projective tree that would have already been found by the exact projective parsing
|
| 426 |
+
algorithm. It is not difficult to find examples for
|
| 427 |
+
which this approximation will terminate without
|
| 428 |
+
returning the highest-scoring non-projective parse.
|
| 429 |
+
|
| 430 |
+
|
| 431 |
+
It is clear that this approximation will always
|
| 432 |
+
|
| 433 |
+
|
| 434 |
+
|
| 435 |
+
terminate — there are only a finite number of dependency trees for any given sentence and each iteration of the loop requires an increase in score
|
| 436 |
+
to continue. However, the loop could potentially
|
| 437 |
+
take exponential time, so we will bound the number of edge transformations to a fixed value M .
|
| 438 |
+
It is easy to argue that this will not hurt performance. Even in freer-word order languages such
|
| 439 |
+
as Czech, almost all non-projective dependency
|
| 440 |
+
trees are primarily projective, modulo a few nonprojective edges. Thus, if our inference algorithm
|
| 441 |
+
starts with the highest scoring projective parse, the
|
| 442 |
+
best non-projective parse only differs by a small
|
| 443 |
+
number of edge transformations. Furthermore, it
|
| 444 |
+
is easy to show that each iteration of the loop takes
|
| 445 |
+
O(n [2] ) time, resulting in a O(n [3] + Mn [2] ) runtime
|
| 446 |
+
algorithm. In practice, the approximation terminates after a small number of transformations and
|
| 447 |
+
we do not need to bound the number of iterations
|
| 448 |
+
in our experiments.
|
| 449 |
+
|
| 450 |
+
We should note that this is one of many possible
|
| 451 |
+
approximations we could have made. Another reasonable approach would be to first find the highest
|
| 452 |
+
scoring _first-order_ non-projective parse, and then
|
| 453 |
+
re-arrange edges based on second order scores in
|
| 454 |
+
a similar manner to the algorithm we described.
|
| 455 |
+
We implemented this method and found that the
|
| 456 |
+
results were slightly worse.
|
| 457 |
+
|
| 458 |
+
|
| 459 |
+
**3** **Danish: Parsing Secondary Parents**
|
| 460 |
+
|
| 461 |
+
|
| 462 |
+
Kromann (2001) argued for a dependency formalism called _Discontinuous Grammar_ and annotated
|
| 463 |
+
a large set of Danish sentences using this formalism to create the Danish Dependency Treebank
|
| 464 |
+
(Kromann, 2003). The formalism allows for a
|
| 465 |
+
|
| 466 |
+
|
| 467 |
+
84
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
root Han spejder efter og ser elefanterne
|
| 471 |
+
|
| 472 |
+
|
| 473 |
+
Figure 5: An example dependency tree from
|
| 474 |
+
the Danish Dependency Treebank (from Kromann
|
| 475 |
+
(2003)).
|
| 476 |
+
|
| 477 |
+
|
| 478 |
+
word to have multiple parents. Examples include
|
| 479 |
+
verb coordination in which the subject or object is
|
| 480 |
+
an argument of several verbs, and relative clauses
|
| 481 |
+
in which words must satisfy dependencies both inside and outside the clause. An example is shown
|
| 482 |
+
in Figure 5 for the sentence _He looks for and sees_
|
| 483 |
+
_elephants_ . Here, the pronoun _He_ is the subject for
|
| 484 |
+
both verbs in the sentence, and the noun _elephants_
|
| 485 |
+
the corresponding object. In the Danish Dependency Treebank, roughly 5% of words have more
|
| 486 |
+
than one parent, which breaks the single parent
|
| 487 |
+
(or tree) constraint we have previously required
|
| 488 |
+
on dependency structures. Kromann also allows
|
| 489 |
+
for cyclic dependencies, though we deal only with
|
| 490 |
+
acyclic dependency graphs here. Though less
|
| 491 |
+
common than trees, dependency graphs involving
|
| 492 |
+
multiple parents are well established in the literature (Hudson, 1984). Unfortunately, the problem
|
| 493 |
+
of finding the dependency structure with highest
|
| 494 |
+
score in this setting is intractable (Chickering et
|
| 495 |
+
al., 1994).
|
| 496 |
+
To create an approximate parsing algorithm
|
| 497 |
+
for dependency structures with multiple parents,
|
| 498 |
+
we start with our approximate second-order nonprojective algorithm outlined in Figure 4. We use
|
| 499 |
+
the non-projective algorithm since the Danish Dependency Treebank contains a small number of
|
| 500 |
+
non-projective arcs. We then modify lines 7-10
|
| 501 |
+
of this algorithm so that it looks for the change in
|
| 502 |
+
parent _or_ the addition of a new parent that causes
|
| 503 |
+
the highest change in overall score and does not
|
| 504 |
+
create a cycle [2] . Like before, we make one change
|
| 505 |
+
per iteration and that change will depend on the
|
| 506 |
+
resulting score of the new tree. Using this simple new approximate parsing algorithm, we train a
|
| 507 |
+
new parser that can produce multiple parents.
|
| 508 |
+
|
| 509 |
+
|
| 510 |
+
**4** **Online Learning and Approximate**
|
| 511 |
+
**Inference**
|
| 512 |
+
|
| 513 |
+
|
| 514 |
+
In this section, we review the work of McDonald
|
| 515 |
+
et al. (2005b) for online large-margin dependency
|
| 516 |
+
|
| 517 |
+
|
| 518 |
+
2We are not concerned with violating the tree constraint.
|
| 519 |
+
|
| 520 |
+
|
| 521 |
+
|
| 522 |
+
parsing. As usual for supervised learning, we assume a training set T = {(xt, yt)} [T] t=1 [, consist-]
|
| 523 |
+
ing of pairs of a sentence xt and its correct dependency representation yt.
|
| 524 |
+
|
| 525 |
+
|
| 526 |
+
The algorithm is an extension of the Margin Infused Relaxed Algorithm (MIRA) (Crammer and
|
| 527 |
+
Singer, 2003) to learning with structured outputs,
|
| 528 |
+
in the present case dependency structures. Figure 6 gives pseudo-code for the algorithm. An online learning algorithm considers a single training
|
| 529 |
+
instance for each update to the weight vector **w** .
|
| 530 |
+
We use the common method of setting the final
|
| 531 |
+
weight vector as the average of the weight vectors after each iteration (Collins, 2002), which has
|
| 532 |
+
been shown to alleviate overfitting.
|
| 533 |
+
|
| 534 |
+
|
| 535 |
+
On each iteration, the algorithm considers a
|
| 536 |
+
single training instance. We parse this instance
|
| 537 |
+
to obtain a predicted dependency graph, and find
|
| 538 |
+
the smallest-norm update to the weight vector **w**
|
| 539 |
+
that ensures that the training graph outscores the
|
| 540 |
+
predicted graph by a margin proportional to the
|
| 541 |
+
loss of the predicted graph relative to the training
|
| 542 |
+
graph, which is the number of words with incorrect parents in the predicted tree (McDonald et al.,
|
| 543 |
+
2005b). Note that we only impose margin constraints between the single highest-scoring graph
|
| 544 |
+
and the correct graph relative to the current weight
|
| 545 |
+
setting. Past work on tree-structured outputs has
|
| 546 |
+
used constraints for the k-best scoring tree (McDonald et al., 2005b) or even all possible trees by
|
| 547 |
+
using factored representations (Taskar et al., 2004;
|
| 548 |
+
McDonald et al., 2005c). However, we have found
|
| 549 |
+
that a single margin constraint per example leads
|
| 550 |
+
to much faster training with a negligible degradation in performance. Furthermore, this formulation relates learning directly to inference, which is
|
| 551 |
+
important, since we want the model to set weights
|
| 552 |
+
relative to the errors made by an approximate inference algorithm. This algorithm can thus be
|
| 553 |
+
viewed as a large-margin version of the perceptron
|
| 554 |
+
algorithm for structured outputs Collins (2002).
|
| 555 |
+
|
| 556 |
+
|
| 557 |
+
Online learning algorithms have been shown
|
| 558 |
+
to be robust even with approximate rather than
|
| 559 |
+
exact inference in problems such as word alignment (Moore, 2005), sequence analysis (Daum´e
|
| 560 |
+
and Marcu, 2005; McDonald et al., 2005a)
|
| 561 |
+
and phrase-structure parsing (Collins and Roark,
|
| 562 |
+
2004). This robustness to approximations comes
|
| 563 |
+
from the fact that the online framework sets
|
| 564 |
+
weights _with respect to inference_ . In other words,
|
| 565 |
+
the learning method sees common errors due to
|
| 566 |
+
|
| 567 |
+
|
| 568 |
+
85
|
| 569 |
+
|
| 570 |
+
|
| 571 |
+
Training data: `T` = `{` (xt, yt) `}` [T] t=1
|
| 572 |
+
1. **w** [(0)] = 0; **v** = 0; i = 0
|
| 573 |
+
|
| 574 |
+
|
| 575 |
+
2. for n : 1..N
|
| 576 |
+
|
| 577 |
+
|
| 578 |
+
3. for t : 1..T
|
| 579 |
+
|
| 580 |
+
4. min ‚‚‚ **w** (i+1) `−` **w** (i)‚‚‚
|
| 581 |
+
|
| 582 |
+
s.t. s(xt, yt; **w** [(][i][+1)] )
|
| 583 |
+
|
| 584 |
+
`−` s(xt, y [′] ; **w** [(][i][+1)] ) `≥` L(yt, y [′] )
|
| 585 |
+
|
| 586 |
+
where y [′] = arg maxy′ s(xt, y [′] ; **w** [(][i][)] )
|
| 587 |
+
|
| 588 |
+
5. **v** = **v** + **w** [(][i][+1)]
|
| 589 |
+
|
| 590 |
+
6. i = i + 1
|
| 591 |
+
|
| 592 |
+
|
| 593 |
+
7. **w** = **v** /(N `∗` T )
|
| 594 |
+
|
| 595 |
+
|
| 596 |
+
Figure 6: MIRA learning algorithm. We write
|
| 597 |
+
s(x, y; **w** [(][i][)] ) to mean the score of tree y using
|
| 598 |
+
weight vector **w** [(][i][)] .
|
| 599 |
+
|
| 600 |
+
|
| 601 |
+
approximate inference and adjusts weights to correct for them. The work of Daum´e and Marcu
|
| 602 |
+
(2005) formalizes this intuition by presenting an
|
| 603 |
+
online learning framework in which parameter updates are made directly with respect to errors in the
|
| 604 |
+
inference algorithm. We show in the next section
|
| 605 |
+
that this robustness extends to approximate dependency parsing.
|
| 606 |
+
|
| 607 |
+
|
| 608 |
+
**5** **Experiments**
|
| 609 |
+
|
| 610 |
+
|
| 611 |
+
The score of adjacent edges relies on the definition of a feature representation **f** (i, k, j). As noted
|
| 612 |
+
earlier, this representation subsumes the first-order
|
| 613 |
+
representation of McDonald et al. (2005b), so we
|
| 614 |
+
can incorporate all of their features as well as the
|
| 615 |
+
new second-order features we now describe. The
|
| 616 |
+
old first-order features are built from the parent
|
| 617 |
+
and child words, their POS tags, and the POS tags
|
| 618 |
+
of surrounding words and those of words between
|
| 619 |
+
the child and the parent, as well as the direction
|
| 620 |
+
and distance from the parent to the child. The
|
| 621 |
+
second-order features are built from the following
|
| 622 |
+
conjunctions of word and POS identity predicates
|
| 623 |
+
|
| 624 |
+
|
| 625 |
+
xi-pos, xk-pos, xj-pos
|
| 626 |
+
xk-pos, xj-pos
|
| 627 |
+
xk-word, xj-word
|
| 628 |
+
xk-word, xj-pos
|
| 629 |
+
xk-pos, xj-word
|
| 630 |
+
|
| 631 |
+
|
| 632 |
+
where xi-pos is the part-of-speech of the i [th] word
|
| 633 |
+
in the sentence. We also include conjunctions between these features and the direction and distance
|
| 634 |
+
from sibling j to sibling k. We determined the usefulness of these features on the development set,
|
| 635 |
+
which also helped us find out that features such as
|
| 636 |
+
the POS tags of words between the two siblings
|
| 637 |
+
would not improve accuracy. We also ignored fea
|
| 638 |
+
|
| 639 |
+
|
| 640 |
+
**English**
|
| 641 |
+
|
| 642 |
+
**Accuracy** **Complete**
|
| 643 |
+
|
| 644 |
+
1st-order-projective 90.7 36.7
|
| 645 |
+
2nd-order-projective 91.5 42.1
|
| 646 |
+
|
| 647 |
+
|
| 648 |
+
Table 1: Dependency parsing results for English.
|
| 649 |
+
|
| 650 |
+
|
| 651 |
+
**Czech**
|
| 652 |
+
|
| 653 |
+
**Accuracy** **Complete**
|
| 654 |
+
|
| 655 |
+
1st-order-projective 83.0 30.6
|
| 656 |
+
2nd-order-projective 84.2 33.1
|
| 657 |
+
1st-order-non-projective 84.1 32.2
|
| 658 |
+
2nd-order-non-projective 85.2 35.9
|
| 659 |
+
|
| 660 |
+
|
| 661 |
+
Table 2: Dependency parsing results for Czech.
|
| 662 |
+
|
| 663 |
+
|
| 664 |
+
tures over triples of words since this would explode the size of the feature space.
|
| 665 |
+
We evaluate dependencies on per word accuracy, which is the percentage of words in the sentence with the correct parent in the tree, and on
|
| 666 |
+
complete dependency analysis. In our evaluation
|
| 667 |
+
we exclude punctuation for English and include it
|
| 668 |
+
for Czech and Danish, which is the standard.
|
| 669 |
+
|
| 670 |
+
|
| 671 |
+
**5.1** **English Results**
|
| 672 |
+
|
| 673 |
+
|
| 674 |
+
To create data sets for English, we used the Yamada and Matsumoto (2003) head rules to extract dependency trees from the WSJ, setting sections 2-21 as training, section 22 for development
|
| 675 |
+
and section 23 for evaluation. The models rely
|
| 676 |
+
on part-of-speech tags as input and we used the
|
| 677 |
+
Ratnaparkhi (1996) tagger to provide these for
|
| 678 |
+
the development and evaluation set. These data
|
| 679 |
+
sets are exclusively projective so we only compare the projective parsers using the exact projective parsing algorithms. The purpose of these experiments is to gauge the overall benefit from including second-order features with exact parsing
|
| 680 |
+
algorithms, which can be attained in the projective
|
| 681 |
+
setting. Results are shown in Table 1. We can see
|
| 682 |
+
that there is clearly an advantage in introducing
|
| 683 |
+
second-order features. In particular, the complete
|
| 684 |
+
tree metric is improved considerably.
|
| 685 |
+
|
| 686 |
+
|
| 687 |
+
**5.2** **Czech Results**
|
| 688 |
+
|
| 689 |
+
|
| 690 |
+
For the Czech data, we used the predefined training, development and testing split of the Prague
|
| 691 |
+
Dependency Treebank (Hajiˇc et al., 2001), and the
|
| 692 |
+
automatically generated POS tags supplied with
|
| 693 |
+
the data, which we reduce to the POS tag set
|
| 694 |
+
from Collins et al. (1999). On average, 23% of
|
| 695 |
+
the sentences in the training, development and
|
| 696 |
+
test sets have at least one non-projective dependency, though, less than 2% of total edges are ac
|
| 697 |
+
|
| 698 |
+
86
|
| 699 |
+
|
| 700 |
+
|
| 701 |
+
**Danish**
|
| 702 |
+
|
| 703 |
+
**Precision** **Recall** **F-measure**
|
| 704 |
+
|
| 705 |
+
2nd-order-projective 86.4 81.7 83.9
|
| 706 |
+
2nd-order-non-projective 86.9 82.2 84.4
|
| 707 |
+
2nd-order-non-projective w/ multiple parents 86.2 84.9 85.6
|
| 708 |
+
|
| 709 |
+
|
| 710 |
+
Table 3: Dependency parsing results for Danish.
|
| 711 |
+
|
| 712 |
+
|
| 713 |
+
|
| 714 |
+
tually non-projective. Results are shown in Table 2. McDonald et al. (2005c) showed a substantial improvement in accuracy by modeling nonprojective edges in Czech, shown by the difference
|
| 715 |
+
between two first-order models. Table 2 shows
|
| 716 |
+
that a second-order model provides a comparable accuracy boost, even using an approximate
|
| 717 |
+
non-projective algorithm. The second-order nonprojective model accuracy of 85.2% is the highest
|
| 718 |
+
reported accuracy for a single parser for these data.
|
| 719 |
+
Similar results were obtained by Hall and N´ov´ak
|
| 720 |
+
(2005) (85.1% accuracy) who take the best output of the Charniak parser extended to Czech and
|
| 721 |
+
rerank slight variations on this output that introduce non-projective edges. However, this system
|
| 722 |
+
relies on a much slower phrase-structure parser
|
| 723 |
+
as its base model as well as an auxiliary reranking module. Indeed, our second-order projective
|
| 724 |
+
parser analyzes the test set in 16m32s, and the
|
| 725 |
+
non-projective approximate parser needs 17m03s
|
| 726 |
+
to parse the entire evaluation set, showing that runtime for the approximation is completely dominated by the initial call to the second-order projective algorithm and that the post-process edge
|
| 727 |
+
transformation loop typically only iterates a few
|
| 728 |
+
times per sentence.
|
| 729 |
+
|
| 730 |
+
|
| 731 |
+
**5.3** **Danish Results**
|
| 732 |
+
|
| 733 |
+
|
| 734 |
+
For our experiments we used the Danish Dependency Treebank v1.0. The treebank contains a
|
| 735 |
+
small number of inter-sentence and cyclic dependencies and we removed all sentences that contained such structures. The resulting data set contained 5384 sentences. We partitioned the data
|
| 736 |
+
into contiguous 80/20 training/testing splits. We
|
| 737 |
+
held out a subset of the training data for development purposes.
|
| 738 |
+
|
| 739 |
+
We compared three systems, the standard
|
| 740 |
+
second-order projective and non-projective parsing models, as well as our modified second-order
|
| 741 |
+
non-projective model that allows for the introduction of multiple parents (Section 3). All systems
|
| 742 |
+
use gold-standard part-of-speech since no trained
|
| 743 |
+
tagger is readily available for Danish. Results are
|
| 744 |
+
shown in Figure 3. As might be expected, the non
|
| 745 |
+
|
| 746 |
+
|
| 747 |
+
projective parser does slightly better than the projective parser because around 1% of the edges are
|
| 748 |
+
non-projective. Since each word may have an arbitrary number of parents, we must use precision
|
| 749 |
+
and recall rather than accuracy to measure performance. This also means that the correct training
|
| 750 |
+
loss is no longer the Hamming loss. Instead, we
|
| 751 |
+
use false positives plus false negatives over edge
|
| 752 |
+
decisions, which balances precision and recall as
|
| 753 |
+
our ultimate performance metric.
|
| 754 |
+
As expected, for the basic projective and nonprojective parsers, recall is roughly 5% lower than
|
| 755 |
+
precision since these models can only pick up at
|
| 756 |
+
most one parent per word. For the parser that can
|
| 757 |
+
introduce multiple parents, we see an increase in
|
| 758 |
+
recall of nearly 3% absolute with a slight drop in
|
| 759 |
+
precision. These results are very promising and
|
| 760 |
+
further show the robustness of discriminative online learning with approximate parsing algorithms.
|
| 761 |
+
|
| 762 |
+
|
| 763 |
+
**6** **Discussion**
|
| 764 |
+
|
| 765 |
+
|
| 766 |
+
We described approximate dependency parsing algorithms that support higher-order features and
|
| 767 |
+
multiple parents. We showed that these approximations can be combined with online learning to
|
| 768 |
+
achieve fast parsing with competitive parsing accuracy. These results show that the gain from allowing richer representations outweighs the loss
|
| 769 |
+
from approximate parsing and further shows the
|
| 770 |
+
robustness of online learning algorithms with approximate inference.
|
| 771 |
+
The approximations we have presented are very
|
| 772 |
+
simple. They start with a reasonably good baseline
|
| 773 |
+
and make small transformations until the score
|
| 774 |
+
of the structure converges. These approximations
|
| 775 |
+
work because freer-word order languages we studied are still primarily projective, making the approximate starting point close to the goal parse.
|
| 776 |
+
However, we would like to investigate the benefits
|
| 777 |
+
for parsing of more principled approaches to approximate learning and inference techniques such
|
| 778 |
+
as the learning as search optimization framework
|
| 779 |
+
of (Daum´e and Marcu, 2005). This framework
|
| 780 |
+
will possibly allow us to include effectively more
|
| 781 |
+
global features over the dependency structure than
|
| 782 |
+
|
| 783 |
+
|
| 784 |
+
87
|
| 785 |
+
|
| 786 |
+
|
| 787 |
+
those in our current second-order model.
|
| 788 |
+
|
| 789 |
+
|
| 790 |
+
**Acknowledgments**
|
| 791 |
+
|
| 792 |
+
|
| 793 |
+
This work was supported by NSF ITR grants
|
| 794 |
+
0205448.
|
| 795 |
+
|
| 796 |
+
|
| 797 |
+
**References**
|
| 798 |
+
|
| 799 |
+
|
| 800 |
+
E. Charniak. 2000. A maximum-entropy-inspired
|
| 801 |
+
parser. In _Proc. NAACL_ .
|
| 802 |
+
|
| 803 |
+
|
| 804 |
+
D.M. Chickering, D. Geiger, and D. Heckerman. 1994.
|
| 805 |
+
Learning bayesian networks: The combination of
|
| 806 |
+
knowledge and statistical data. Technical Report
|
| 807 |
+
MSR-TR-94-09, Microsoft Research.
|
| 808 |
+
|
| 809 |
+
|
| 810 |
+
Y.J. Chu and T.H. Liu. 1965. On the shortest arborescence of a directed graph. _Science Sinica_, 14:1396–
|
| 811 |
+
1400.
|
| 812 |
+
|
| 813 |
+
|
| 814 |
+
M. Collins and B. Roark. 2004. Incremental parsing
|
| 815 |
+
with the perceptron algorithm. In _Proc. ACL_ .
|
| 816 |
+
|
| 817 |
+
|
| 818 |
+
M. Collins, J. Hajiˇc, L. Ramshaw, and C. Tillmann.
|
| 819 |
+
1999. A statistical parser for Czech. In _Proc. ACL_ .
|
| 820 |
+
|
| 821 |
+
|
| 822 |
+
M. Collins. 2002. Discriminative training methods
|
| 823 |
+
for hidden Markov models: Theory and experiments
|
| 824 |
+
with perceptron algorithms. In _Proc. EMNLP_ .
|
| 825 |
+
|
| 826 |
+
|
| 827 |
+
K. Crammer and Y. Singer. 2003. Ultraconservative
|
| 828 |
+
online algorithms for multiclass problems. _JMLR_ .
|
| 829 |
+
|
| 830 |
+
|
| 831 |
+
H. Daum´e and D. Marcu. 2005. Learning as search optimization: Approximate large margin methods for
|
| 832 |
+
structured prediction. In _Proc. ICML_ .
|
| 833 |
+
|
| 834 |
+
|
| 835 |
+
J. Edmonds. 1967. Optimum branchings. _Journal_
|
| 836 |
+
_of Research of the National Bureau of Standards_,
|
| 837 |
+
71B:233–240.
|
| 838 |
+
|
| 839 |
+
|
| 840 |
+
J. Eisner. 1996. Three new probabilistic models for
|
| 841 |
+
dependency parsing: An exploration. In _Proc. COL-_
|
| 842 |
+
_ING_ .
|
| 843 |
+
|
| 844 |
+
|
| 845 |
+
J. Hajiˇc, E. Hajicova, P. Pajas, J. Panevova, P. Sgall, and
|
| 846 |
+
B. Vidova Hladka. 2001. The Prague Dependency
|
| 847 |
+
Treebank 1.0 CDROM. Linguistics Data Consortium Cat. No. LDC2001T10.
|
| 848 |
+
|
| 849 |
+
|
| 850 |
+
K. Hall and V. N´ov´ak. 2005. Corrective modeling for
|
| 851 |
+
non-projective dependency parsing. In _Proc. IWPT_ .
|
| 852 |
+
|
| 853 |
+
|
| 854 |
+
R. Hudson. 1984. _Word Grammar_ . Blackwell.
|
| 855 |
+
|
| 856 |
+
|
| 857 |
+
M. T. Kromann. 2001. Optimaility parsing and local
|
| 858 |
+
cost functions in discontinuous grammars. In _Proc._
|
| 859 |
+
_FG-MOL_ .
|
| 860 |
+
|
| 861 |
+
|
| 862 |
+
M. T. Kromann. 2003. The danish dependency treebank and the dtag treebank tool. In _Proc. TLT_ .
|
| 863 |
+
|
| 864 |
+
|
| 865 |
+
R. McDonald, K. Crammer, and F. Pereira. 2005a.
|
| 866 |
+
Flexible text segmentation with structured multilabel classifi cation. In _Proc. HLT-EMNLP_ .
|
| 867 |
+
|
| 868 |
+
|
| 869 |
+
|
| 870 |
+
R. McDonald, K. Crammer, and F. Pereira. 2005b. Online large-margin training of dependency parsers. In
|
| 871 |
+
_Proc. ACL_ .
|
| 872 |
+
|
| 873 |
+
|
| 874 |
+
R. McDonald, F. Pereira, K. Ribarov, and J. Hajiˇc.
|
| 875 |
+
2005c. Non-projective dependency parsing using
|
| 876 |
+
spanning tree algorithms. In _Proc. HLT-EMNLP_ .
|
| 877 |
+
|
| 878 |
+
|
| 879 |
+
I.A. Me [´] lˇcuk. 1988. _Dependency Syntax: Theory and_
|
| 880 |
+
_Practice_ . State University of New York Press.
|
| 881 |
+
|
| 882 |
+
|
| 883 |
+
R. Moore. 2005. A discriminative framework for bilingual word alignment. In _Proc. HLT-EMNLP_ .
|
| 884 |
+
|
| 885 |
+
|
| 886 |
+
J. Nivre and J. Nilsson. 2005. Pseudo-projective dependency parsing. In _Proc. ACL_ .
|
| 887 |
+
|
| 888 |
+
|
| 889 |
+
A. Ratnaparkhi. 1996. A maximum entropy model for
|
| 890 |
+
part-of-speech tagging. In _Proc. EMNLP_ .
|
| 891 |
+
|
| 892 |
+
|
| 893 |
+
B. Taskar, D. Klein, M. Collins, D. Koller, and C. Manning. 2004. Max-margin parsing. In _Proc. EMNLP_ .
|
| 894 |
+
|
| 895 |
+
|
| 896 |
+
H. Yamada and Y. Matsumoto. 2003. Statistical dependency analysis with support vector machines. In
|
| 897 |
+
_Proc. IWPT_ .
|
| 898 |
+
|
| 899 |
+
|
| 900 |
+
**A** **2nd-Order Non-projective MST**
|
| 901 |
+
**Parsing is NP-hard**
|
| 902 |
+
|
| 903 |
+
|
| 904 |
+
Proof by a reduction from 3-D matching (3DM).
|
| 905 |
+
**3DM** : Disjoint sets X, Y, Z each with m distinct elements
|
| 906 |
+
and a set T `⊆` X `×` Y `×` Z. Question: is there a subset S `⊆` T
|
| 907 |
+
such that `|` S `|` = m and each v `∈` X `∪` Y `∪` Z occurs in exactly
|
| 908 |
+
one element of S.
|
| 909 |
+
**Reduction** : Given an instance of 3DM we defi ne a graph
|
| 910 |
+
in which the vertices are the elements from X `∪` Y `∪` Z as
|
| 911 |
+
well as an artifi cial _root_ node. We insert edges from _root_ to
|
| 912 |
+
all xi `∈` X as well as edges from all xi `∈` X to all yi `∈` Y
|
| 913 |
+
and zi `∈` Z. We order the words s.t. the root is on the left
|
| 914 |
+
followed by all elements of X, then Y, and fi nally Z. We
|
| 915 |
+
then defi ne the second-order score function as follows,
|
| 916 |
+
s(root, xi, xj) = 0, `∀` xi, xj `∈` X
|
| 917 |
+
s(xi, `−`, yj) = 0, `∀` xi `∈` X, yj `∈` Y
|
| 918 |
+
s(xi, yj, zk) = 1, `∀` (xi, yj, zk) `∈` T
|
| 919 |
+
All other scores are defi ned to be `−∞`, including for edges
|
| 920 |
+
pairs that were not defi ned in the original graph.
|
| 921 |
+
**Theorem** : _There is a 3D matching iff the second-order_
|
| 922 |
+
_MST has a score of_ m. **Proof** : First we observe that no tree
|
| 923 |
+
can have a score greater than m since that would require more
|
| 924 |
+
than m pairs of edges of the form (xi, yj, zk). This can only
|
| 925 |
+
happen when some xi has multiple yj `∈` Y children or multiple zk `∈` Z children. But if this were true then we would
|
| 926 |
+
introduce a `−∞` scored edge pair (e.g. s(xi, yj, yj [′] [)][). Now, if]
|
| 927 |
+
the highest scoring second-order MST has a score of m, that
|
| 928 |
+
means that every xi must have found a unique pair of children yj and zk which represents the 3D matching, since there
|
| 929 |
+
would be m such triples. Furthermore, yj and zk could not
|
| 930 |
+
match with any other x [′] i [since they can only have one incom-]
|
| 931 |
+
ing edge in the tree. On the other hand, if there is a 3DM, then
|
| 932 |
+
there must be a tree of weight m consisting of second-order
|
| 933 |
+
edges (xi, yj, zk) for each element of the matching S. Since
|
| 934 |
+
no tree can have a weight greater than m, this must be the
|
| 935 |
+
highest scoring second-order MST. Thus if we can fi nd the
|
| 936 |
+
highest scoring second-order MST in polynomial time, then
|
| 937 |
+
3DM would also be solvable. ■
|
| 938 |
+
|
| 939 |
+
|
| 940 |
+
88
|
| 941 |
+
|
| 942 |
+
|
references/2006.eacl.mcdonald/paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f762ed310a3aa0b3d0489a8436d6d56075ada382dd898bf40198480696a6f51e
|
| 3 |
+
size 144982
|
references/2006.paclic.nguyen/paper.md
ADDED
|
@@ -0,0 +1,677 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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5 |
+
- "Trung Nguyen"
|
| 6 |
+
- "Xuan-Hieu Phan"
|
| 7 |
+
- "Le-Minh Nguyen"
|
| 8 |
+
- "Quang-Thuy Ha"
|
| 9 |
+
year: 2006
|
| 10 |
+
venue: "PACLIC 2006"
|
| 11 |
+
url: "https://aclanthology.org/Y06-1028"
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
### **Vietnamese Word Segmentation with** **CRFs and SVMs: An Investigation**
|
| 15 |
+
|
| 16 |
+
Cam-Tu Nguyen [1], Trung-Kien Nguyen [1], Xuan-Hieu Phan [2]
|
| 17 |
+
|
| 18 |
+
Le-Minh Nguyen [2], and Quang-Thuy Ha [1 ]
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
1 College of Technology, Vietnam National University, Hanoi
|
| 22 |
+
2 School of Information Science, Japan Advanced Institute of Science and Technology
|
| 23 |
+
|
| 24 |
+
ncamtu@vnu.edu.vn, ntkien@vnu.edu.vn, hieuxuan@jaist.ac.jp
|
| 25 |
+
nguyenml@jaist.ac.jp, thuyhq@vnu.edu.vn
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
**Abstract.** Word segmentation for Vietnamese, like for most Asian languages, is an important task
|
| 29 |
+
which has a significant impact on higher language processing levels. However, it has received little
|
| 30 |
+
attention of the community due to the lack of a common annotated corpus for evaluation and
|
| 31 |
+
comparison. Also, most previous studies focused on unsupervised-statistical approaches or
|
| 32 |
+
combined too many techniques. Consequently, their accuracies are not as high as expected. This
|
| 33 |
+
paper reports a careful investigation of using conditional random fields (CRFs) and support vector
|
| 34 |
+
machines (SVMs) - two of the most successful statistical learning methods in NLP and pattern
|
| 35 |
+
recognition - for solving the task. We first build a moderate annotated corpus using different sources
|
| 36 |
+
of materials. For a careful evaluation, different CRF and SVM models using different feature
|
| 37 |
+
settings were trained and their results are compared and contrasted with each other. In addition, we
|
| 38 |
+
discuss several important points about the accuracy, computational cost, corpus size and other
|
| 39 |
+
aspects that might influence the overall quality of Vietnamese word segmentation.
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
**Keywords:** Word segmentation, segmenting and labeling sequence data, conditional random fields,
|
| 43 |
+
support vector machines, maximum matching.
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
**1 Introduction**
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
Word segmentation is one of the fundamental preprocessing steps in NLP for building higher
|
| 50 |
+
applications. It is even more important and challenging in Asian languages, such as Chinese, Japanese,
|
| 51 |
+
and Korea, because there is no white space between two consecutive words. Vietnamese language faces
|
| 52 |
+
a similar problem due to the fact that a word may contain more than one separated syllables, and
|
| 53 |
+
therefore the white space is not always the word separator.
|
| 54 |
+
|
| 55 |
+
In recent years, word boundary detection for Vietnamese has received more attention from the
|
| 56 |
+
community and there have been several statistical and machine learning methods applied to the task.
|
| 57 |
+
However, most of the current methods either suffer from unsatisfactory results [1, 2] (with accuracy of
|
| 58 |
+
91% or lower) or must combine many techniques in a multi-level processing to obtain good results [3].
|
| 59 |
+
In addition, their works were done without comparison to any baseline or study of the quality of the
|
| 60 |
+
corpus (e.g., the out-of-vocabulary rate, the number of date/time and numbers). Also, there is still no
|
| 61 |
+
common standard annotated corpus for evaluation and comparison.
|
| 62 |
+
|
| 63 |
+
In this paper, we present a thorough investigation of using two powerful statistical learning methods,
|
| 64 |
+
CRFs and SVMs, to perform the task. To do so, we first build an annotated corpus of about 8000
|
| 65 |
+
sentences with word boundary marked. Although the corpus is not large enough to cover a broad range
|
| 66 |
+
of Vietnamese vocabularies, it contains documents from different domains to reduce the imbalance in
|
| 67 |
+
word distribution. Then, CRF and SVM models are trained on the corpus using various feature
|
| 68 |
+
configurations and their performances are compared and contrasted with each other to determine the
|
| 69 |
+
impact of feature selection as well as the generalization power of CRFs and SVMs on the segmentation
|
| 70 |
+
accuracy. CRF and SVM models are also compared with a baseline (maximum matching from a
|
| 71 |
+
Vietnamese dictionary) to see the extent to which machine learning techniques can help to improve the
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
215
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
accuracy in comparison with the simple heuristics-based matching approach. All in all, our main
|
| 78 |
+
motivations behind this work can be summed up as follows:
|
| 79 |
+
|
| 80 |
+
- CRFs and SVMs have recently been seen as two of the most successful statistical learning models in
|
| 81 |
+
NLP and pattern classification. While SVM together with appropriate kernels is well-known thanks to
|
| 82 |
+
its optimal discriminating hyper-plane in very high-dimensional feature spaces, CRF is particularly
|
| 83 |
+
designed for problems of labeling and segmenting sequence data because of its global normalization
|
| 84 |
+
and trade-off among state variables of sequence data. In addition, both SVMs and CRFs follow the
|
| 85 |
+
discriminative learning approach and have a big flexibility to encode a variety of features from the
|
| 86 |
+
input data to enhance their the prediction capability. Recently, both SVMs and CRFs have been
|
| 87 |
+
applied to a wide range of labeling and segmenting tasks in NLP like POS tagging, chunking, named
|
| 88 |
+
entity recognition, and information extraction, and have achieved state-of-the-art results. Therefore,
|
| 89 |
+
we do hope that CRFs and SVMs can achieve similar successes in segmenting Vietnamese.
|
| 90 |
+
|
| 91 |
+
- Feature selection is a core step in both CRFs-based and SVMs-based approaches. The important issue
|
| 92 |
+
is that which types of feature should be used and how they influence the accuracy of the system. Note
|
| 93 |
+
that chosen features should be useful to the word segmentation task and appropriate to Vietnamese.
|
| 94 |
+
Because Vietnamese word segmentation is still an open task, a careful estimation of feature types
|
| 95 |
+
especially ones bearing characteristics of Vietnamese will set up a foundation for future research on
|
| 96 |
+
Vietnamese word segmentation.
|
| 97 |
+
The remaining part of the paper is organized as follows. Section 2 briefly discusses word formation in
|
| 98 |
+
Vietnamese. Section 3 describes quickly the two learning models CRFs and SVMs for labeling and
|
| 99 |
+
segmenting sequence data. Section 4 mainly presents the framework of using CRFs and SVMs for
|
| 100 |
+
Vietnamese word segmentation. Corpus building, feature selection, result comparison and analysis will
|
| 101 |
+
be presented in this section. Finally, some conclusions will be given in Section 5.
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
**2 Vietnamese Word Formation**
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
**2.1 Vietnamese Syllable**
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
Vietnamese syllables are elementary units that have one way of pronunciation. In documents, they are
|
| 111 |
+
usually delimited by white-space. Being the elementary units, Vietnamese syllables are not undivided
|
| 112 |
+
elements but a structure [6]. Table 1 depicts the general structure of Vietnamese syllable
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
|Table 1. Structure of Vietnamese Syllable|Col2|Col3|Col4|
|
| 119 |
+
|---|---|---|---|
|
| 120 |
+
|TONE MARK|TONE MARK|TONE MARK|TONE MARK|
|
| 121 |
+
|First Consonant|Rhyme|Rhyme|Rhyme|
|
| 122 |
+
|First Consonant|Secondary<br>Consonant|Main<br>Vowel|Last<br>Consonant|
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
Generally speaking, each Vietnamese syllable has all five parts: first consonant, secondary vowel,
|
| 126 |
+
main vowel, last consonant and a tone mark. For instance, the syllable “tuần” (week) has a tone mark
|
| 127 |
+
(grave accent), a first consonant (t), a secondary vowel (u), a main vowel (â) and a last consonant (n).
|
| 128 |
+
However, except for main vowel that is required for all syllables, the other parts may be not present in
|
| 129 |
+
some cases. For example, the syllable “anh” (brother) has no tone mark, no secondary vowel and no first
|
| 130 |
+
consonant. In other case, the syllable “hoa” (flower) has a secondary vowel (o) but no last consonant.
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
**2.2 Vietnamese Word**
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
A word in Vietnamese may consist of one or more syllables which are combined in different ways.
|
| 140 |
+
Based on the way of constructing words from syllables, we can classify them into three categories:
|
| 141 |
+
single words, complex words and reduplicative words.
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
216
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
- Simple Words: a single word has only one syllable that implies a specific meaning. For example:
|
| 148 |
+
tôi(I), bạn(you), nhà(house), ...
|
| 149 |
+
|
| 150 |
+
- Complex Words are words that consist of more than one syllable. The syllables in a complex word
|
| 151 |
+
are combined based on semantic relationships, that is either coordinated (bơi lội– swim) or “principle
|
| 152 |
+
and accessory” (đường sắt – railway).
|
| 153 |
+
|
| 154 |
+
- A word is considered as a reduplicative one if its syllables have phonic components reduplicated.
|
| 155 |
+
Reduplicative words are usually used for scene or sound descriptions, thus they usually used in
|
| 156 |
+
literary texts.
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
**2.3 New Words in Vietnamese**
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
New words are those that are out-of-vocabulary or not present in a particular dictionary or training
|
| 163 |
+
corpus. In our system, we consider 3 types of new words: abbreviations, named entities, and foreign
|
| 164 |
+
words.
|
| 165 |
+
|
| 166 |
+
- Abbreviations are usually all-capitalized, for example: CAND (Công An Nhân Dân - people's police).
|
| 167 |
+
|
| 168 |
+
- Named entities are proper nouns indicating person, location, organization, date-time and so on. In
|
| 169 |
+
Vietnamese, personal or organizational names often have first letter capitalized, for instance: “Hồ Chí
|
| 170 |
+
Minh” or “Hải Hà” in phrase “Công ty Hải Hà” (Hải Hà firm). The other named entities such as
|
| 171 |
+
number, percentage, date-time, etc. can also be captured by some specific regular expressions.
|
| 172 |
+
|
| 173 |
+
- Foreign words used in Vietnamese are usually Latinized. Each foreign word has only one syllable
|
| 174 |
+
that does not often conform to the structure of Vietnamese syllable described in section 2.1.
|
| 175 |
+
By observing types of new words in documents, we later introduce some kinds of useful features in
|
| 176 |
+
order to detect them in order to increase the accuracy of our system.
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
**3 Sequential Labeling with CRFs and SVMs**
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
**3.1 Conditional Random Fields**
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
In this paper, CRFs are referred to as an undirected linear-chain of model states, i.e., a conditionallytrained finite state machine (FSMs) that obey the first-order Markov property.
|
| 186 |
+
|
| 187 |
+
Let **o** = ( **o1, o2, …, oT** ) be some observed data sequence. Let S be a set of FSM states, each of which is
|
| 188 |
+
associated with a label _l_ ∈ _L_ . Let **s** = ( **s1, s2,…, sT** ) be some state sequence, CRFs [4] define the
|
| 189 |
+
conditional probability of a state sequence given an observation sequence as
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
1 ⎡ _T_ ⎤ ( **1** )
|
| 194 |
+
## θ ( s | o ) = exp ∑∑λ k f k ( st − 1, st, o, t ) .
|
| 195 |
+
|
| 196 |
+
_Z_ ( **o** ) ⎢⎣ _t_ = 1 _k_ ⎥⎦
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
⎡ _T_ ⎤
|
| 201 |
+
## ∑∑λ k f k ( st − 1, st, o, t )
|
| 202 |
+
|
| 203 |
+
⎢⎣ _t_ = 1 _k_ ⎥⎦
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
1 ⎡ _T_
|
| 208 |
+
## = exp ∑∑λ k f k ( st −
|
| 209 |
+
|
| 210 |
+
_Z_ ( **o** ) ⎢⎣ _t_ = 1 _k_
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
|
| 214 |
+
_T_
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
|
| 218 |
+
_p_ θ ( **s** | **o** ) = _Z_ ( **o** ) exp ⎢⎣ _t_ = 1 _k_ λ _k_ _f_ _k_ ( _st_ - 1, _st_, **o**, _t_
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
|
| 222 |
+
⎥⎦
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
⎛
|
| 227 |
+
= exp ⎜
|
| 228 |
+
# ∑
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
|
| 232 |
+
⎛ _T_ ⎞
|
| 233 |
+
|
| 234 |
+
⎜∑∑λ _k_ _f_ _k_ ( _s_ ' _t_ - 1, _s_ ' _t_, **o**, _t_ ) ⎟
|
| 235 |
+
⎝ _t_ = 1 _k_ ⎠
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
_k_ _k_ _t_
|
| 240 |
+
= 1 _k_
|
| 241 |
+
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
_T_
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
# ∑ s ' exp ⎜∑∑λ k f k ( s ' t − 1, s ' t, o, t ) ⎟
|
| 248 |
+
|
| 249 |
+
⎝ _t_ = 1 _k_ ⎠
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
# ( o ) = ∑ s ' exp ⎜∑∑λ k f k ( s ' t − 1, s ' t, o, t )
|
| 253 |
+
|
| 254 |
+
⎝ _t_ = 1 _k_
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
|
| 258 |
+
_Z_ ( **o** ) = _s_ ' exp ⎜ λ _k_ _f_ _k_ ( _s_ ' _t_ - 1, _s_ ' _t_, **o**, _t_
|
| 259 |
+
|
| 260 |
+
⎝ _t_ = 1 _k_
|
| 261 |
+
|
| 262 |
+
|
| 263 |
+
|
| 264 |
+
Where _Z_ ( ) exp _f_ ( _s_ ', _s_ ',, _t_ ) is normalization summing over all label
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
sequences. _f_ k denotes a feature function in the language of maximum entropy modeling and
|
| 269 |
+
|
| 270 |
+
learned weight associated with feature _f_ k. Each _f_ k is either a _per-state_ or a _transition_ feature.
|
| 271 |
+
|
| 272 |
+
( _per_ - _state_ ) ( **2** )
|
| 273 |
+
_f_ _k_ ( _st_, **o**, _t_ ) = δ ( _st_, _l_ ) _xk_ ( **o**, _t_ ) .
|
| 274 |
+
|
| 275 |
+
|
| 276 |
+
( _transition_ ) ( **3** )
|
| 277 |
+
#### f k ( st − 1, st, t ) = δ ( st − 1, l ) δ ( st, l ) .
|
| 278 |
+
|
| 279 |
+
|
| 280 |
+
217
|
| 281 |
+
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
λ is a _k_
|
| 285 |
+
|
| 286 |
+
|
| 287 |
+
Where δ denotes the Kronecker- δ . A per-state feature (2) combines the label _l_ of current state _st_
|
| 288 |
+
and a context predicate, i.e., the binary function _xk_ ( **o**, _t_ ) that captures a particular property of the
|
| 289 |
+
observation sequence **o** at time position _t_ . For example, the current label is B_PER and the current word
|
| 290 |
+
is “Nguyễn”. A transition feature (3) presents sequential dependencies by combining the label _l’_ of the
|
| 291 |
+
previous state _st-1_ and the label _l_ of the current state _st_, such as the previous label _l’=_ B_PER and the
|
| 292 |
+
current label is _l_ =I_PER.
|
| 293 |
+
|
| 294 |
+
Training CRFs is commonly performed by maximizing the likelihood function with respect to the
|
| 295 |
+
training data using advanced convex optimization techniques like L-BFGS. And inference in CRFs, i.e.,
|
| 296 |
+
searching the most likely output label sequence of an input observation sequence, can be done using
|
| 297 |
+
Viterbi algorithm.
|
| 298 |
+
|
| 299 |
+
|
| 300 |
+
**3.2 Support Vector Machine**
|
| 301 |
+
|
| 302 |
+
Suppose that we have a set of training samples **D = (x1, y1), …, (xl, yl)** ( **xi** ∈ _Rn_, **y** _**i**_ ∈ {+1, -1}) where
|
| 303 |
+
**x** _**i**_ is a feature vector of the i-th sample represented by an n dimensional vector, **y** _**i**_ is the class
|
| 304 |
+
(positive(+1) or negative(-1)) label of the i-th sample. _l_ is the number of training samples. The main
|
| 305 |
+
ideas behind SVMs is to separate positive and negative samples by a hyperplane expressed as
|
| 306 |
+
( **w.x** ) + b = 0. SVMs [11] find the separating hyperplane which maximizes its margin. In other words,
|
| 307 |
+
this problem becomes equivalent to solving the following optimization problem:
|
| 308 |
+
|
| 309 |
+
Maximize: _**M**_ =2/|| **w** ||
|
| 310 |
+
Subject to: **y** _**i**_ [( **w.xi** ) + b] ≥ 1. Not only the linear classification, SVMs also can carry out the nonlinear ones by introducing kernel functions that embed the data into a feature space where the nonlinear
|
| 311 |
+
pattern now appears linear. Though, we omit the details here, the key aspect of kernel functions is that
|
| 312 |
+
they preserve the pairwise inerproducts while relaxing the constraints of coordinates of the embedded
|
| 313 |
+
points.
|
| 314 |
+
|
| 315 |
+
Basically, SVMs are binary classifier, thus we must extend SVMs to multi-class classifier in order to
|
| 316 |
+
classify three or more classes. The _pairwise_ classifier is one of the most popular methods to extend the
|
| 317 |
+
binary classification task to that of _**K**_ classes. Though, we leave the details to [12], the idea of _pairwise_
|
| 318 |
+
classification is to build _**K.(K-1)**_ /2 classifiers considering all pairs of classes, and final decision is given
|
| 319 |
+
by their weighted voting.
|
| 320 |
+
|
| 321 |
+
|
| 322 |
+
**4 Vietnamese Word Segmentation with CRFs and SVMs**
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
**4.1 Corpus Building**
|
| 326 |
+
|
| 327 |
+
|
| 328 |
+
Building a robust and accurate word segmentation system for Vietnamese using machine learning
|
| 329 |
+
approaches is more complex in comparison with building such a system in other languages due to the
|
| 330 |
+
fact that there is no standard corpus publicly available. For this work, we have to build a corpus of 305
|
| 331 |
+
newspaper articles from many websites and in various domains. Although the corpus is not large enough
|
| 332 |
+
to cover a broad range of Vietnamese words, it contains documents from multiple domains with the
|
| 333 |
+
hope that this will reduce the imbalance in word distribution. This corpus is now available online [1] .
|
| 334 |
+
|
| 335 |
+
In addition to the corpus, we also collect other resources that are used as lexicons or domainknowledge for our system: a Vietnamese dictionary, a list of 2000 personal names [2], and a list of 707
|
| 336 |
+
names of locations [3] in Vietnam. These can be seen as external dictionaries and will be used for looking
|
| 337 |
+
up in our CRF and SVM models.
|
| 338 |
+
|
| 339 |
+
|
| 340 |
+
1 http://www.jaist.ac.jp/~hieuxuan/vnwordseg/data
|
| 341 |
+
2 From http://www.vietnamgiapha.com/
|
| 342 |
+
3 From http://vi.wikipedia.org/
|
| 343 |
+
|
| 344 |
+
|
| 345 |
+
218
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
|
| 349 |
+
∈
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
|
| 353 |
+
≥
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
**Table 2.** Statistics of our annotated corpus for Vietnamese word segmentation
|
| 357 |
+
|
| 358 |
+
|No|Domain|Number of Documents|
|
| 359 |
+
|---|---|---|
|
| 360 |
+
|<br>1|<br>Economics|<br>90|
|
| 361 |
+
|2|Information Technology|59|
|
| 362 |
+
|3|Education|38|
|
| 363 |
+
|4|Vehicle|35|
|
| 364 |
+
|5|Sports|28|
|
| 365 |
+
|6|Law|31|
|
| 366 |
+
|7|Culture-Society|24|
|
| 367 |
+
|Total|305 newspaper articles (about 7800 sentences)|305 newspaper articles (about 7800 sentences)|
|
| 368 |
+
|
| 369 |
+
|
| 370 |
+
|
| 371 |
+
**4.2 Problem Representation**
|
| 372 |
+
|
| 373 |
+
|
| 374 |
+
We cast the segmentation problem as a sequential tagging task: Vietnamese syllable that begins a word
|
| 375 |
+
is marked with B_W (Begin of a Word), the syllable that is inside a word is marked with I_W (Inside of
|
| 376 |
+
a Word), and the other things like comma, dot marks are tagged with O (Outside of a word). The
|
| 377 |
+
problem of detecting word boundaries in a sentence is modeled as the problem of labeling syllables in
|
| 378 |
+
that sentence with three above labels.
|
| 379 |
+
|
| 380 |
+
Performance of both the CRFs-based and SVMs-based segmentation systems depends on how well
|
| 381 |
+
we do feature selection. In the following section, we will discuss more about the strategies of feature
|
| 382 |
+
selection for both CRFs and SVMs.
|
| 383 |
+
|
| 384 |
+
|
| 385 |
+
**Feature Selection**
|
| 386 |
+
As mentioned earlier, there are two kinds of feature functions used in linear-CRFs: edge features which
|
| 387 |
+
obey to the first-Markov property, and per-state features which are generated by combining information
|
| 388 |
+
(context predicate) available surrounding current position in the observation sequence with the current
|
| 389 |
+
label. Based on the same idea, we also integrate 2 kinds of features into SVM model. They are static
|
| 390 |
+
features and dynamic features. While SVM model decide dynamic features in tagging process by
|
| 391 |
+
considering the two previous labels, static features are very similar to per-state features in CRF model in
|
| 392 |
+
the sense that we also take into account context predicates at the current observation.
|
| 393 |
+
|
| 394 |
+
After studying specific characteristics of Vietnamese, we propose five types of context predicate
|
| 395 |
+
templates from which various features will be generated correspondingly.
|
| 396 |
+
|
| 397 |
+
|
| 398 |
+
**Table 3.** Context predicate temlates for CRFs and SVMs. Here, a valid Vietnamese syllable must conform to the
|
| 399 |
+
structure described in section 2; Is_Marks will check current observation is a full stop, comma or some kinds of
|
| 400 |
+
marks in the sentence or not; Is_Regular_Expression tries to capture expressions describing date/time (long date/
|
| 401 |
+
|
| 402 |
+
|short date), numbers|or tokens that is a mix of characters and numbers, etc.|
|
| 403 |
+
|---|---|
|
| 404 |
+
|Syllable Conj. (_SC_)|Syllable_Conjunction (-2,2)|
|
| 405 |
+
|Dictionary (_Dict_)|In_LacViet_Dictionary (-2,2)|
|
| 406 |
+
|External Resources (_ERS_.)|In_Personal_Name_List(0,0), In_Family_Name_List(0,0),<br>In_Middle_Name_List(-2, 2), In_Location_List(-2,2)|
|
| 407 |
+
|Miscellaneous (_Misc_)|Is_Regular_Expression(0,0), Is_Initial_Capitalization(0,0),<br>Is_All_Capitalization(0,0), Is_First_Observation(0,0),<br>Is_Marks(0,0)|
|
| 408 |
+
|Vietnamese Syllable<br> Detection (_VSD_)|Is_Valid_Vietnamese_Syllable(0,0)|
|
| 409 |
+
|
| 410 |
+
|
| 411 |
+
|
| 412 |
+
Table 3 summarizes the context predicate templates used in our models. Note that, two
|
| 413 |
+
numbers inside the brackets next to each context predicate template indicate the window surrounding
|
| 414 |
+
current position in which we explore context information. For examples, In_LacViet_Dictionary (-2, 2)
|
| 415 |
+
means that we make a particular conjunction of adjacent syllables in the sliding window from the second
|
| 416 |
+
previous to the second next syllables and check if that conjunction forms a word in the dictionary. Also,
|
| 417 |
+
|
| 418 |
+
|
| 419 |
+
219
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
because the number of more-than-4-syllables words is quite low, we take into account only conjunctions
|
| 423 |
+
of up-to-three adjacent syllables. Similarly, by Syllable_Conjunction (-2, 2), we considers all the 1gram, 2-gram and 3-gram of syllables in the window of size 5.
|
| 424 |
+
|
| 425 |
+
|
| 426 |
+
**4.4 Experimental Setup**
|
| 427 |
+
|
| 428 |
+
|
| 429 |
+
Our experiments with CRFs and SVMs were conducted using two tools: FlexCRFs - a C/C++
|
| 430 |
+
implementation of CRFs, and Yamcha - a C/C++ implementation of SVMs for labeling and segmenting
|
| 431 |
+
sequence data. For CRF models, we use first-order Markov dependency, and for SVM models we use
|
| 432 |
+
the second degree of polynomial kernel.
|
| 433 |
+
|
| 434 |
+
|
| 435 |
+
**Table 4.** Sumary of our experiment design. Here, SC stands for Syllable Conjunction, Misc: Miscellaneous, Dict:
|
| 436 |
+
Dictionary, ERS: External Resources, VSD: Vietnamese Syllable Detection
|
| 437 |
+
|
| 438 |
+
|ID|Feature settings for experiments|
|
| 439 |
+
|---|---|
|
| 440 |
+
|1|Maximum Matching (looking up a Vietnamese dictionary)|
|
| 441 |
+
|2|CRFs with SC|
|
| 442 |
+
|3|CRFs with SC + VSD|
|
| 443 |
+
|4|CRFs with SC+VSD+ Dict|
|
| 444 |
+
|5|CRFs with SC+ VSD+ Dict + ERS|
|
| 445 |
+
|6|CRFs with SC+ VSD + Dict + ERS + Misc|
|
| 446 |
+
|7|SVMs with SC|
|
| 447 |
+
|8|SVMs with SC+VSD|
|
| 448 |
+
|9|SVMs with SC+ VSD+ Dict|
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
For evaluating in each experiment, we used 5-fold cross-validation test. In other words, we randomly
|
| 453 |
+
divide the corpus into five partitions; in each fold we take one partition as the testing set and all the
|
| 454 |
+
others for training. Additionally, for the purpose of evaluating the performance of new word detection
|
| 455 |
+
process, the OOV (out-of-vocabulary) rate is measured for 5 folds in the corpus and the average result
|
| 456 |
+
among 5 folds is about 11.6%. This OOV rate is quite high in comparison with some popular corpora for
|
| 457 |
+
Chinese word segmentation such as the corpora of Beijing University (6.9%), Hong Kong City U (7.1%)
|
| 458 |
+
and Academia Sinica (2.2%) [8].
|
| 459 |
+
|
| 460 |
+
|
| 461 |
+
**4.5 Experimental Results and Discussion**
|
| 462 |
+
|
| 463 |
+
|
| 464 |
+
One of the most noticeable advantages of CRFs is the flexibility of integrating various kinds of features
|
| 465 |
+
from the training data, thus we design 5 separate experiments for CRFs - the later is richer of features
|
| 466 |
+
than the earlier – to estimate the effect of feature types on the system performance. For SVMs-based
|
| 467 |
+
segmentation, we conduct an experiment with the strategy of feature selection described in the section
|
| 468 |
+
4.2. Though this work is an investigation of using CRFs and SVMs for Vietnamese Word Segmentation,
|
| 469 |
+
we still need a baseline for all experiments and we have used Maximum Matching for this purpose. The
|
| 470 |
+
summary of the design for our experiments is showed in Table 4
|
| 471 |
+
|
| 472 |
+
The average precision, recall, F1-measure of 5-fold CV tests from 9 experiments are summarized in
|
| 473 |
+
Table 5. Figure 1 depicts the performance comparison among CRF models using different feature
|
| 474 |
+
settings (Maximum Matching as a baseline). Also, the performance comparison between SVM and the
|
| 475 |
+
CRF models (with two similar feature settings) is shown in Figure 2.
|
| 476 |
+
|
| 477 |
+
From Table 5 and Figure 1, several observations could be made. First, even with the simplest feature
|
| 478 |
+
setting, CRFs can outperform Maximum Matching significantly. This is because the large number of
|
| 479 |
+
new words appears in the data and partly shows that our corpus has high out-of-vocabulary rate. Second,
|
| 480 |
+
the richer feature setting is, the better results CRFs model can achieve. The CRF model with richest
|
| 481 |
+
feature setting yields the highest performance (average F1 of 94.05%) in comparison with the other
|
| 482 |
+
settings (average F1 of 93.98%, 93.90%, 90.41% and 90.14%). Third, the impact of different feature
|
| 483 |
+
types on the performance of CRFs model is different. As we can see in the figure, the Dict and SC
|
| 484 |
+
feature types have the largest effect on the performance of the system. While the Misc feature type only
|
| 485 |
+
|
| 486 |
+
|
| 487 |
+
220
|
| 488 |
+
|
| 489 |
+
|
| 490 |
+
has a little effect. This is due to several reasons: (1) Vietnamese word boundary depends more on
|
| 491 |
+
identity of its syllable than their features like capitalization or that it is the first syllable in a sentence or
|
| 492 |
+
not. (2) Though regular expressions can detect number, date/time quite well, the number of date/time
|
| 493 |
+
and number expressions is much smaller than the number of words in the corpus.
|
| 494 |
+
|
| 495 |
+
|
| 496 |
+
**Table 5.** The average precision, recall, and F1-measure of 5-fold cross-validation tests of Maximum Matching,
|
| 497 |
+
CRFs and SVMs
|
| 498 |
+
|
| 499 |
+
|Method (feature settings)|Pre (%)|Re (%)|F<br>1|
|
| 500 |
+
|---|---|---|---|
|
| 501 |
+
|<br>Maximum Matching|<br>87.65|<br>78.59|<br>82.82|
|
| 502 |
+
|CRFs (SC)|89.98|90.30|90.14|
|
| 503 |
+
|CRFs (SC+VSD)|90.24|90.58|90.41|
|
| 504 |
+
|CRFs (SC+VSD+Dict)|93.67|94.12|93.90|
|
| 505 |
+
|CRFs (SC + VSD + ERS)<br>|93.71<br>|94.26<br>|93.98<br>|
|
| 506 |
+
|~~**CRFs (SC + VSD + ERS + Misc)**~~|~~**93.76**~~|~~**94.28**~~|~~**94.05**~~|
|
| 507 |
+
|<br>SVMs (SC)|<br>90.60|<br>91.45|<br>91.02|
|
| 508 |
+
|SVMs (SC + VSD)<br>|90.21<br>|90.87<br>|90.54<br>|
|
| 509 |
+
|~~**SVMs (SC + VSD + Dict)**~~|~~**94.00**~~|~~**94.45**~~|~~**94.23**~~|
|
| 510 |
+
|
| 511 |
+
|
| 512 |
+
|
| 513 |
+
96
|
| 514 |
+
94
|
| 515 |
+
92
|
| 516 |
+
90
|
| 517 |
+
88
|
| 518 |
+
86
|
| 519 |
+
84
|
| 520 |
+
82
|
| 521 |
+
80
|
| 522 |
+
78
|
| 523 |
+
76
|
| 524 |
+
74
|
| 525 |
+
|
| 526 |
+
|Col1|Col2|Col3|Col4|Col5|
|
| 527 |
+
|---|---|---|---|---|
|
| 528 |
+
||||||
|
| 529 |
+
|
| 530 |
+
|
| 531 |
+
|
| 532 |
+
**Fig. 1.** Performance comparison among CRF models using different feature settings
|
| 533 |
+
(Maximum Matching as the baseline)
|
| 534 |
+
|
| 535 |
+
|
| 536 |
+
|
| 537 |
+
6.6
|
| 538 |
+
|
| 539 |
+
6.4
|
| 540 |
+
|
| 541 |
+
6.2
|
| 542 |
+
|
| 543 |
+
6
|
| 544 |
+
|
| 545 |
+
|
| 546 |
+
5.8
|
| 547 |
+
|
| 548 |
+
5.6
|
| 549 |
+
|
| 550 |
+
5.4
|
| 551 |
+
|
| 552 |
+
5.2
|
| 553 |
+
|
| 554 |
+
5
|
| 555 |
+
|
| 556 |
+
|
| 557 |
+
|
| 558 |
+
6.16
|
| 559 |
+
|
| 560 |
+
|
| 561 |
+
5.79
|
| 562 |
+
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
|
| 566 |
+
|
| 567 |
+
5.88
|
| 568 |
+
|
| 569 |
+
|
| 570 |
+
|
| 571 |
+
6.33 6.35
|
| 572 |
+
|
| 573 |
+
|
| 574 |
+
|Col1|Col2|
|
| 575 |
+
|---|---|
|
| 576 |
+
|||
|
| 577 |
+
|
| 578 |
+
|
| 579 |
+
|Col1|8|
|
| 580 |
+
|---|---|
|
| 581 |
+
|||
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
|Col1|Col2|
|
| 585 |
+
|---|---|
|
| 586 |
+
|||
|
| 587 |
+
|
| 588 |
+
|
| 589 |
+
|Col1|Col2|
|
| 590 |
+
|---|---|
|
| 591 |
+
|||
|
| 592 |
+
|
| 593 |
+
|
| 594 |
+
|Col1|Col2|
|
| 595 |
+
|---|---|
|
| 596 |
+
|||
|
| 597 |
+
|
| 598 |
+
|
| 599 |
+
|
| 600 |
+
Fold1 Fold2 Fold3 Fold4 Fold5
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
**Fig. 2.** Performance comparison between CRFs (SC + VSD + Dict) and SVMs on 5-fold CV test
|
| 604 |
+
|
| 605 |
+
|
| 606 |
+
Table 5 and Figure 2 show us some interesting information. Although VSD feature enhances the CRF
|
| 607 |
+
model a little bit, it does not have positive effect on the SVM model. This shows that inappropriate
|
| 608 |
+
features may cause noisy in the model and result in worse performance. Another observation is that with
|
| 609 |
+
the similar feature settings, the SVM model is better than the similar CRF model. Moreover, SVM
|
| 610 |
+
model with (SC+VSD+Dict) even performs better than the CRF model with the richest feature setting
|
| 611 |
+
|
| 612 |
+
|
| 613 |
+
221
|
| 614 |
+
|
| 615 |
+
|
| 616 |
+
(the average F1 of 94.05%). To further study the two methods, we later compare computational time of
|
| 617 |
+
SVMs and CRFs and see that with the similar feature setting, SVM model is slower than CRF model.
|
| 618 |
+
For example: with the feature setting SC+VSD+Dict, the SVM model took 4 hours to complete the
|
| 619 |
+
training process for 1 fold but the CRF model took only 2 hours for the same task. However, if
|
| 620 |
+
comparing this SVM model to CRF model with richest feature setting (SC+VSD+Dict+ERS+Misc), we
|
| 621 |
+
see they need nearly the same computational time while the SVM model is a little bit better than the
|
| 622 |
+
CRF model in performance. This shows that SVM-based learning is a potential approach to the problem
|
| 623 |
+
of Vietnamese segmentation. With good feature selection, it gives a little bit better performance than
|
| 624 |
+
CRFs in this task.
|
| 625 |
+
|
| 626 |
+
|
| 627 |
+
**5 Conclusions**
|
| 628 |
+
|
| 629 |
+
|
| 630 |
+
We have presented a thorough investigation of using CRFs and SVMs for Vietnamese word boundary
|
| 631 |
+
detection. The key contributions of our work is three-fold: (1) building an annotated corpus for
|
| 632 |
+
evaluation; (2) training different CRF and SVM features according to different feature configurations;
|
| 633 |
+
and then compare and contrast their results; and (3) draw some interesting conclusions that we observed
|
| 634 |
+
from the experimental results.
|
| 635 |
+
|
| 636 |
+
Due to the computational burden of SVMs and the time limitation, the complete experiments for
|
| 637 |
+
SVMs (of all feature settings) will be done in the near future. Also, in future work we need to evaluate
|
| 638 |
+
how segmentation accuracy depends on the corpus size.
|
| 639 |
+
|
| 640 |
+
|
| 641 |
+
**Acknowledgments.** This work is partly supported by Project QC.06.07 ``Fundamental Vietnamese
|
| 642 |
+
Shallow Processing with Modern Statistical Machine Learning Models'', Vietnam National University,
|
| 643 |
+
Hanoi, and Project ``Information Extraction Models for finding Entities and Semantic Relations in
|
| 644 |
+
Vietnamese Web Pages'' of the Ministry of Science and Technology, Vietnam.
|
| 645 |
+
|
| 646 |
+
|
| 647 |
+
**References**
|
| 648 |
+
|
| 649 |
+
|
| 650 |
+
1. Ha, L.A.: A method for word segmentation in Vietnamese. Corpus Linguistics, Lancaster, UK (2003)
|
| 651 |
+
2. Nguyen, T.V., Tran, H.K., Nguyen, T.T.T., Nguyen, H.: Word segmentation for Vietnamese text categorization:
|
| 652 |
+
an online corpus approach. Research, Innovation and Vision for the Future, The 4th International Conference on
|
| 653 |
+
Computer Sciences (2006)
|
| 654 |
+
3. Dinh, D., Kiem, H., Toan, N.V.: Vietnamese Word Segmentation. The 6 [th] Natural Language Processing Pacific
|
| 655 |
+
Rim Symposium (2001), 749--756s
|
| 656 |
+
4. Lafferty, J., Mccallum, A., Pereira, F.: Conditional Random Fields: probabilistic models for segmenting and
|
| 657 |
+
labeling sequence data. The 18th International Conference on Machine Learning, Massachusetts, USA (2001),
|
| 658 |
+
282—290
|
| 659 |
+
5. Liu, D.C., Nocedal, J.: On the limited memory BFGS method for large scale optimization. Mathematical
|
| 660 |
+
Programming 45 (1989) 503--528.
|
| 661 |
+
6. Mai, N.C., Vu, D.N., Hoang, T.P.: Foundations of linguistics and Vietnamese. Education Publisher (1997) 142152
|
| 662 |
+
7. Nguyen, H., Nguyen, H., Vu, T., Tran, N., Hoang, K.: Internet and Genetics Algorithm-based Text Classification
|
| 663 |
+
for Documents in Vietnamese. Research, Innovation and Vision for the Future, The 3th International Conference
|
| 664 |
+
on Computer Sciences (2005)
|
| 665 |
+
8. Peng, F., Feng, F., McCallum, A: Chinese Segmentation and New Word Detection using Conditional Random
|
| 666 |
+
Fields. The 20th International Conference on Computational Linguistics (2004).
|
| 667 |
+
9. Rabiner: A tutorial on hidden markov models and selected applications in speech recognition. In Proc. the IEEE,
|
| 668 |
+
77(2):257-286, 1989.
|
| 669 |
+
10. Sha, F., Pereia, F.: Shallow parsing with Conditional Random Fields. Human Language Technology (2003)
|
| 670 |
+
11. Vapnik, V.N.: Statistical Learning Theory, Wiley-Interscience
|
| 671 |
+
12. Kudo, T., Matsumoto, Y.: Chunking with Support Vector Machines, The Second Meeting of the North
|
| 672 |
+
American Chapter of the Association for Computational Linguistics (2001)
|
| 673 |
+
|
| 674 |
+
|
| 675 |
+
222
|
| 676 |
+
|
| 677 |
+
|
references/2006.paclic.nguyen/paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31e675a6ba70af36bcae8950c9b11787c54c12b50eb7bb789e30ea55f499214c
|
| 3 |
+
size 456747
|
references/2009.alr.nguyen/paper.md
ADDED
|
@@ -0,0 +1,751 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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 11 |
+
url: "https://aclanthology.org/W09-3402/"
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# **An Empirical Study of Vietnamese Noun Phrase Chunking with** **Discriminative Sequence Models**
|
| 15 |
+
|
| 16 |
+
**Le Minh Nguyen** **Huong Thao Nguyen** and **Phuong Thai Nguyen**
|
| 17 |
+
School of Information Science, JAIST College of Technology, VNU
|
| 18 |
+
`nguyenml@jaist.ac.jp` _{_ `thaonth, thainp` _}_ `@vnu.edu.vn`
|
| 19 |
+
|
| 20 |
+
**Tu Bao Ho** and **Akira Shimazu**
|
| 21 |
+
Japan Advanced Institute of Science and Technology
|
| 22 |
+
_{_ `bao,shimazu` _}_ `@jaist.ac.jp`
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
**Abstract**
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
This paper presents an empirical work
|
| 30 |
+
for Vietnamese NP chunking task. We
|
| 31 |
+
show how to build an annotation corpus of
|
| 32 |
+
NP chunking and how discriminative sequence models are trained using the corpus. Experiment results using 5 fold cross
|
| 33 |
+
validation test show that discriminative sequence learning are well suitable for Vietnamese chunking. In addition, by empirical experiments we show that the part
|
| 34 |
+
of speech information contribute significantly to the performance of there learning
|
| 35 |
+
models.
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
**1** **Introduction**
|
| 39 |
+
|
| 40 |
+
Many Natural Language Processing applications
|
| 41 |
+
(i.e machine translation) require syntactic information and tools for syntactic analysis. However,
|
| 42 |
+
these linguistic resources are only available for
|
| 43 |
+
some languages(i.e English, Japanese, Chines). In
|
| 44 |
+
the case of Vietnamese, currently most researchers
|
| 45 |
+
have focused on word segmentation and part of
|
| 46 |
+
speech tagging. For example, Nghiem et al
|
| 47 |
+
(Nghiem, Dinh, Nguyen, 2008) has developed a
|
| 48 |
+
Vietnamese POS tagging. Tu (Tu, Phan, Nguyen,
|
| 49 |
+
Ha, 2006) (Nguyen, Romary, Rossignol, Vu,
|
| 50 |
+
2006)(Dien, Thuy, 2006) have developed Vietnamese word segmentation.
|
| 51 |
+
|
| 52 |
+
The processing of building tools and annotated
|
| 53 |
+
data for other fundamental tasks such as chunking and syntactic parsing are currently developed.
|
| 54 |
+
This can be viewed as a bottleneck for developing NLP applications that require a deeper understanding of the language. The requirement of developing such tools motives us to develop a Vietnamese chunking tool. For this goal, we have
|
| 55 |
+
been looking for an annotation corpus for conducting a Vietnamese chunking using machine learning methods. Unfortunately, at the moment, there
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
is still no common standard annotated corpus for
|
| 60 |
+
evaluation and comparison regarding Vietnamese
|
| 61 |
+
chunking.
|
| 62 |
+
|
| 63 |
+
In this paper, we aim at discussing on how
|
| 64 |
+
we can build annotated data for Vietnamese text
|
| 65 |
+
chunking and how to apply discriminative sequence learning for Vietnamese text chunking. We
|
| 66 |
+
choose discriminative sequence models for Vietnamese text chunking because they have shown
|
| 67 |
+
very suitable methods for several languages(i.e
|
| 68 |
+
English, Japanese, Chinese) (Sha and Pereira,
|
| 69 |
+
2005)(Chen, Zhang, and Ishihara, 2006) (Kudo
|
| 70 |
+
and Matsumoto, 2001). These presentative discriminative models which we choose for conducting empirical experiments including: Conditional
|
| 71 |
+
Random Fields (Lafferty, McCallum, and Pereira,
|
| 72 |
+
2001), Support Vector Machine (Vapnik, 1995)
|
| 73 |
+
and Online Prediction (Crammer et al, 2006). In
|
| 74 |
+
other words, because Noun Phrase chunks appear
|
| 75 |
+
most frequently in sentences. So, in this paper
|
| 76 |
+
we focus mainly on empirical experiments for the
|
| 77 |
+
tasks of Vietnamese NP chunking.
|
| 78 |
+
|
| 79 |
+
We plan to answer several major questions by
|
| 80 |
+
using empirical experiments as follows.
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
_•_ Whether or not the discriminative learning
|
| 84 |
+
models are suitable for Vietnamese chunking
|
| 85 |
+
problem?
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
_•_ We want to know the difference of SVM,
|
| 89 |
+
Online Learning, and Conditional Random
|
| 90 |
+
Fields for Vietnamese chunking task.
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
_•_ Which features are suitable for discriminative
|
| 94 |
+
learning models and how they contribute to
|
| 95 |
+
the performance of Vietnamese text chunking?
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
The rest of this paper is organized as follows:
|
| 99 |
+
Section 2 describes Vietnamese text chunking with
|
| 100 |
+
discriminative sequence learning models. Section
|
| 101 |
+
3 shows experimental results and Section 4 dis
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
9
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
_Proceedings of the 7th Workshop on Asian Language Resources, ACL-IJCNLP 2009_, pages 9–16,
|
| 108 |
+
Suntec, Singapore, 6-7 August 2009. c _⃝_ 2009 ACL and AFNLP
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
cusses the advantage of our method and describes
|
| 112 |
+
future work.
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
**2** **Vietnamese NP Chunking with**
|
| 116 |
+
**Discriminative Sequence Learning**
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
Noun Phrase chunking is considered as the task
|
| 120 |
+
of grouping a consecutive sequence of words into
|
| 121 |
+
a NP chunk lablel. For example: “[NP Anh Ay
|
| 122 |
+
(He)] [VP thich(likes)] [NP mot chiec oto(a car)]
|
| 123 |
+
”
|
| 124 |
+
|
| 125 |
+
Before describing NP chunking tasks, we
|
| 126 |
+
summarize the characteristic of Vietnamese language and the background of Conditional Random Fields, Support Vector Machine, and Online
|
| 127 |
+
Learning. Then, we present how to build the annotated corpus for the NP chunking task.
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
**2.1** **The characteristic of Vietnamese Words**
|
| 131 |
+
|
| 132 |
+
Vietnamese syllables are elementary units that
|
| 133 |
+
have one way of pronunciation. In documents,
|
| 134 |
+
they are usually delimited by white-space. Being the elementary units, Vietnamese syllables are
|
| 135 |
+
not undivided elements but a structure. Generally,
|
| 136 |
+
each Vietnamese syllable has all five parts: first
|
| 137 |
+
consonant, secondary vowel, main vowel, last consonant and a tone mark. For instance, the syllable tu.n (week) has a tone mark (grave accent), a
|
| 138 |
+
first consonant (t), a secondary vowel (u), a main
|
| 139 |
+
vowel () and a last consonant (n). However, except
|
| 140 |
+
for main vowel that is required for all syllables,
|
| 141 |
+
the other parts may be not present in some cases.
|
| 142 |
+
For example, the syllable anh (brother) has no tone
|
| 143 |
+
mark, no secondary vowel and no first consonant.
|
| 144 |
+
In other case, the syllable hoa (flower) has a secondary vowel (o) but no last consonant.
|
| 145 |
+
|
| 146 |
+
Words in Vietnamese are made of one or more
|
| 147 |
+
syllables which are combined in different ways.
|
| 148 |
+
Based on the way of constructing words from syllables, we can classify them into three categories:
|
| 149 |
+
single words, complex words and reduplicative
|
| 150 |
+
words (Mai,Vu, Hoang, 1997).
|
| 151 |
+
|
| 152 |
+
The past of speechs (Pos) of each word in Vietnamese are mainly sketched as follows.
|
| 153 |
+
|
| 154 |
+
A Noun Phrase (NP) in Vietnamese consists of
|
| 155 |
+
three main parts as follows: the noun center, the
|
| 156 |
+
prefix part, and the post fix part. The prefix and
|
| 157 |
+
postfix are used to support the meaning of the NP.
|
| 158 |
+
For example in the NP ”ba sinh vien nay”, the
|
| 159 |
+
noun center is ”sinh vien”, and the prefix is ”ba
|
| 160 |
+
(three)”, the postfix is ”nay”.
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
|Vietnamese Tag|Equivalent to English Tag|
|
| 165 |
+
|---|---|
|
| 166 |
+
|~~CC~~<br>|~~Coordinating conjunction)~~<br>|
|
| 167 |
+
|~~CD~~<br>|~~Cardinal number)~~<br>|
|
| 168 |
+
|~~DT~~<br>|~~Determiner)~~<br>|
|
| 169 |
+
|~~V~~<br>|~~Verb~~<br>|
|
| 170 |
+
|~~P~~<br>|~~Preposition~~<br>|
|
| 171 |
+
|~~A~~<br>|~~Adjective~~<br>|
|
| 172 |
+
|~~LS~~<br>|~~List item marker~~<br>|
|
| 173 |
+
|~~MD~~<br>|~~Modal~~<br>|
|
| 174 |
+
|~~N~~<br>|~~Noun~~<br>|
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
**2.2** **The Corpus**
|
| 178 |
+
|
| 179 |
+
We have collected more than 9,000 sentences from
|
| 180 |
+
several web-sites through the internet. After that,
|
| 181 |
+
we then applied the segmentation tool (Tu, Phan,
|
| 182 |
+
Nguyen, Ha, 2006) to segment each sentences
|
| 183 |
+
into a sequence of tokens. Each sequence of
|
| 184 |
+
tokens are then represented using the format of
|
| 185 |
+
CONLL 2000. The details are sketched as follows.
|
| 186 |
+
|
| 187 |
+
Each line in the annotated data consists of
|
| 188 |
+
three columns: the token (a word or a punctuation mark), the part-of-speech tag of the token, and the phrase type label (label for short)
|
| 189 |
+
of the token. The label of each token indicates
|
| 190 |
+
whether the token is outside a phrase (O), starts
|
| 191 |
+
a phrase (B- _⟨_ PhraseType _⟩_ ), or continues a phrase
|
| 192 |
+
(I- _⟨_ PhraseType _⟩_ ).
|
| 193 |
+
|
| 194 |
+
In order to save time for building annotated
|
| 195 |
+
data, we made a set of simple rules for automatically generating the chunking data as follows. If
|
| 196 |
+
a word is not a ”noun”, ”adjective”, or ”article” it
|
| 197 |
+
should be assigned the label ”O”. The consecutive words are NP if they is one of type as follows:
|
| 198 |
+
”noun noun”; ”article noun”, ”article noun adjective”. After generating such as data, we ask an
|
| 199 |
+
expert about Vietnamese linguistic to correct the
|
| 200 |
+
data. Finally, we got more than 9,000 sentences
|
| 201 |
+
which are annotated with NP chunking labels.
|
| 202 |
+
|
| 203 |
+
Figure 1 shows an example of the Vietnamese
|
| 204 |
+
chunking corpus.
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
**2.3** **Discriminative Sequence Learning**
|
| 208 |
+
|
| 209 |
+
In this section, we briefly introduce three discriminative sequence learning models for chunking problems.
|
| 210 |
+
|
| 211 |
+
**2.3.1** **Conditional Random Fields**
|
| 212 |
+
_Conditional Random Fields_ (CRFs) (Lafferty,
|
| 213 |
+
McCallum, and Pereira, 2001) are undirected
|
| 214 |
+
graphical models used to calculate the conditional
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
|
| 218 |
+
10
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
Figure 1: An Example of the Vietnamese chunking corpus
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
probability of values on designated output nodes,
|
| 225 |
+
given values assigned to other designated input
|
| 226 |
+
nodes for data sequences. CRFs make a first-order
|
| 227 |
+
Markov independence assumption among output
|
| 228 |
+
nodes, and thus correspond to finite state machine
|
| 229 |
+
(FSMs).
|
| 230 |
+
|
| 231 |
+
Let **o** = ( _o_ 1 _, o_ 2 _, . . ., oT_ ) be some observed input data sequence, such as a sequence of words in
|
| 232 |
+
a text (values on _T_ input nodes of the graphical
|
| 233 |
+
model). Let **S** be a finite set of FSM states, each is
|
| 234 |
+
associated with a label _l_ such as a clause start position. Let **s** = ( _s_ 1 _, s_ 2 _, . . ., sT_ ) be some sequences
|
| 235 |
+
of states (values on T output nodes). CRFs define the conditional probability of a state sequence
|
| 236 |
+
given an input sequence to be
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
current state _st_, such as the previous label _l′_ =
|
| 241 |
+
AV (adverb) and the current label _l_ = JJ (adjective). _gj_ ( _o, st, t_ ) = _δ_ ( _st, l_ ) _xk_ ( _o, t_ ) is a _per-state_
|
| 242 |
+
feature function which combines the label l of current state _st_ and a context predicate, i.e., the binary
|
| 243 |
+
function _xk_ ( _o, t_ ) that captures a particular property of the observation sequence o at time position
|
| 244 |
+
_t_ . For instance, the current label is JJ and the current word is _“conditional“_ .
|
| 245 |
+
|
| 246 |
+
Training CRFs is commonly performed by maximizing the likelihood function with respect to
|
| 247 |
+
the training data using advanced convex optimization techniques like L-BFGS. Recently, there are
|
| 248 |
+
several works apply Stochastic Gradient Descent
|
| 249 |
+
(SGD) for training CRFs models. SGD has been
|
| 250 |
+
historically associated with back-propagation algorithms in multilayer neural networks.
|
| 251 |
+
|
| 252 |
+
And inference in CRFs, i.e., searching the most
|
| 253 |
+
likely output label sequence of an input observation sequence, can be done using Viterbi algorithm.
|
| 254 |
+
|
| 255 |
+
**2.3.2** **Support Vector Machines**
|
| 256 |
+
Support vector machine (SVM)(Vapnik, 1995)
|
| 257 |
+
is a technique of machine learning based on statistical learning theory. The main idea behind
|
| 258 |
+
this method can be summarized as follows. Suppose that we are given _l_ training examples ( _xi, yi_ ),
|
| 259 |
+
(1 _≤_ _i ≤_ _l_ ), where _xi_ is a feature vector in _n_ dimensional feature space, and _yi_ is the class label
|
| 260 |
+
_{_ -1, +1 _}_ of _xi_ .
|
| 261 |
+
|
| 262 |
+
SVM finds a hyperplane _w.x_ + _b_ = 0 which correctly separates training examples and has maximum margin which is the distance between two
|
| 263 |
+
hyperplanes _w · x_ + _b ≥_ 1 and _w · x_ + _b ≤−_ 1 _._
|
| 264 |
+
Finally, the optimal hyperplane is formulated as
|
| 265 |
+
follows:
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
|
| 273 |
+
|
| 274 |
+
|
| 275 |
+
|
| 276 |
+
|
| 277 |
+
_P_ Λ( _s|o_ ) = _Z_ [1] _o_ _[exp]_
|
| 278 |
+
|
| 279 |
+
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
|
| 283 |
+
- _T_
|
| 284 |
+
|
| 285 |
+
_F_ ( _s, o, t_ )
|
| 286 |
+
|
| 287 |
+
_t_ =1
|
| 288 |
+
|
| 289 |
+
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
- _l_
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
_αiyiK_ ( _xi, x_ ) + _b_
|
| 298 |
+
1
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
(3)
|
| 303 |
+
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
(1)
|
| 307 |
+
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
_f_ ( _x_ ) = sign
|
| 311 |
+
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
�� _T_ where _Zo_ = [�] _s_ _[exp]_ _t_ =1 _[F]_ [(] _[s, o, t]_ [)] is a normalization factor over all state sequences. We denote _δ_ to be the Kronecker- _δ_ . Let _F_ ( _s, o, t_ ) be the
|
| 315 |
+
sum of CRFs features at time position _t_ :
|
| 316 |
+
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
_λifi_ ( _st−_ 1 _, st, t_ ) +
|
| 321 |
+
|
| 322 |
+
_i_ _j_
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
_λjgj_ ( _o, st, t_ ) (2)
|
| 331 |
+
|
| 332 |
+
_j_
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
|
| 336 |
+
where _αi_ is the Lagrange multiple, and _K_ ( _x_ _[′]_ _, x_ _[′′]_ )
|
| 337 |
+
is called a kernel function, which calculates similarity between two arguments _x_ _[′]_ and _x_ _[′′]_ . For instance, the Polynomial kernel function is formulated as follows:
|
| 338 |
+
|
| 339 |
+
|
| 340 |
+
_K_ ( _x_ _[′]_ _, x_ _[′′]_ ) = ( _x_ _[′]_ _· x_ _[′′]_ ) _[p]_ (4)
|
| 341 |
+
|
| 342 |
+
|
| 343 |
+
SVMs estimate the label of an unknown example
|
| 344 |
+
_x_ whether the sign of _f_ ( _x_ ) is positive or not.
|
| 345 |
+
|
| 346 |
+
Basically, SVMs are binary classifier, thus we
|
| 347 |
+
must extend SVMs to multi-class classifier in or
|
| 348 |
+
|
| 349 |
+
|
| 350 |
+
where _fi_ ( _st−_ 1 _, st, t_ ) = _δ_ ( _st−_ 1 _, l′_ ) _δ_ ( _st, l_ ) is a
|
| 351 |
+
_transition_ feature function which represents sequential dependencies by combining the label _l′_
|
| 352 |
+
|
| 353 |
+
of the previous state _st−_ 1 and the label _l_ of the
|
| 354 |
+
|
| 355 |
+
|
| 356 |
+
|
| 357 |
+
11
|
| 358 |
+
|
| 359 |
+
|
| 360 |
+
der to classify three or more classes. The pairwise classifier is one of the most popular methods to extend the binary classification task to that
|
| 361 |
+
of K classes. Though, we leave the details to
|
| 362 |
+
(Kudo and Matsumoto, 2001), the idea of pairwise
|
| 363 |
+
classification is to build K.(K-1)/2 classifiers considering all pairs of classes, and final decision is
|
| 364 |
+
given by their weighted voting. The implementation of Vietnamese text chunking is based on Yamcha (V0.33) [1] .
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
**2.3.3** **Online Passive-Aggressive Learning**
|
| 368 |
+
|
| 369 |
+
Online Passive-Aggressive Learning (PA) was
|
| 370 |
+
proposed by Crammer (Crammer et al, 2006) as
|
| 371 |
+
an alternative learning algorithm to the maximize
|
| 372 |
+
margin algorithm. The Perceptron style for natural language processing problems as initially proposed by (Collins, 2002) can provide to state of
|
| 373 |
+
the art results on various domains including text
|
| 374 |
+
segmentation, syntactic parsing, and dependency
|
| 375 |
+
parsing. The main drawback of the Perceptron
|
| 376 |
+
style algorithm is that it does not have a mechanism for attaining the maximize margin of the
|
| 377 |
+
training data. It may be difficult to obtain high
|
| 378 |
+
accuracy in dealing with hard learning data. The
|
| 379 |
+
online algorithm for chunking parsing in which
|
| 380 |
+
we can attain the maximize margin of the training
|
| 381 |
+
data without using an optimization technique. It
|
| 382 |
+
is thus much faster and easier to implement. The
|
| 383 |
+
details of PA algorithm for chunking parsing are
|
| 384 |
+
presented as follows.
|
| 385 |
+
|
| 386 |
+
Assume that we are given a set of sentences
|
| 387 |
+
_xi_ and their chunks _yi_ where _i_ = 1 _, ..., n_ . Let
|
| 388 |
+
the feature mapping between a sentence _x_ and
|
| 389 |
+
a sequence of chunk labels _y_ be: Φ( _x, y_ ) =
|
| 390 |
+
Φ1( _x, y_ ) _,_ Φ2( _x, y_ ) _, ...,_ Φ _d_ ( _x, y_ ) where each feature mapping Φ _j_ maps ( _x, y_ ) to a real value. We
|
| 391 |
+
assume that each feature Φ( _x, y_ ) is associated with
|
| 392 |
+
a weight value. The goal of PA learning for chunking parsing is to obtain a parameter _w_ that minimizes the hinge-loss function and the margin of
|
| 393 |
+
learning data.
|
| 394 |
+
|
| 395 |
+
Algorithm 1 shows briefly the Online Learning
|
| 396 |
+
for chunking problem. The detail about this algorithm can be referred to the work of (Crammer
|
| 397 |
+
et al, 2006). In Line 7, the argmax value is computed by using the Viterbi algorithm which is similar to the one described in (Collins, 2002). Algorithm 1 is terminated after _T_ round.
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
1Yamcha is available at
|
| 401 |
+
http://chasen.org/ taku/software/yamcha/
|
| 402 |
+
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
~~**Algorithm 1**~~ ~~: The Passive-Aggressive algo-~~
|
| 406 |
+
rithm for NP chunking.
|
| 407 |
+
|
| 408 |
+
|
| 409 |
+
**2.3.4** **Feature Set**
|
| 410 |
+
|
| 411 |
+
|
| 412 |
+
Feature set is designed through features template
|
| 413 |
+
which is shown in Table 2. All edge features obey
|
| 414 |
+
the first-order Markov dependency that the label
|
| 415 |
+
( _l_ ) of the current state depends on the label ( _l_ _[′]_ )
|
| 416 |
+
of the previous state (e.g., “ _l_ = I-NP” and “ _l_ _[′]_ =
|
| 417 |
+
B-NP”). Each observation feature expresses how
|
| 418 |
+
much influence a statistic ( _x_ ( **o** _, i_ )) observed surrounding the current position _i_ has on the label
|
| 419 |
+
( _l_ ) of the current state. A statistic captures a particular property of the observation sequence. For
|
| 420 |
+
instance, the observation feature “ _l_ = I-NP” and
|
| 421 |
+
“word _−_ 1 is _the_ ” indicates that the label of the current state should be I-NP (i.e., continue a noun
|
| 422 |
+
phrase) if the previous word is _the_ . Table 2 describes both edge and observation feature templates. Statistics for observation features are identities of words, POS tags surrounding the current
|
| 423 |
+
position, such as words and POS tags at _−_ 2, _−_ 1,
|
| 424 |
+
1, 2.
|
| 425 |
+
|
| 426 |
+
We also employ 2-order conjunctions of the current word with the previous ( _w−_ 1 _w_ 0) or the next
|
| 427 |
+
word ( _w_ 0 _w_ 1), and 2-order and 3-order conjunctions of two or three consecutive POS tags within
|
| 428 |
+
the current window to make use of the mutual dependencies among singleton properties. With the
|
| 429 |
+
feature templates shown in Table 2 and the feature
|
| 430 |
+
rare threshold of 1 (i.e., only features with occurrence frequency larger than 1 are included into the
|
| 431 |
+
discriminative models)
|
| 432 |
+
|
| 433 |
+
|
| 434 |
+
|
| 435 |
+
**1** Input: _S_ = ( _xi_ ; _yi_ ) _, i_ = 1 _,_ 2 _, ..., n_ in which
|
| 436 |
+
_xi_ is the sentence and _yi_ is a sequence of
|
| 437 |
+
chunks
|
| 438 |
+
**2** Aggressive parameter _C_
|
| 439 |
+
|
| 440 |
+
|
| 441 |
+
|
| 442 |
+
**3** Output: the model
|
| 443 |
+
|
| 444 |
+
|
| 445 |
+
|
| 446 |
+
**4** Initialize: _w_ 1 = (0 _,_ 0 _, ...,_ 0)
|
| 447 |
+
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
**5** **for** _t=1, 2..._ **do**
|
| 451 |
+
**6** Receive an sentence _xt_
|
| 452 |
+
**7** Predict _yt_ _[∗]_ [= arg max] _[y][∈][Y]_ [(] _[w][t][.]_ [Φ(] _[x][t][, y][t]_ [))]
|
| 453 |
+
Suffer loss: _lt_ = _wt._ Φ( _xt, yt_ _[∗]_ [)] _[ −]_ _[w][t][.]_ [Φ(] _[x][t][, y][t]_ [) +] ~~_ρ_~~ ~~(~~ ~~_y_~~ _t_ ~~_, y_~~
|
| 454 |
+
|
| 455 |
+
|
| 456 |
+
|
| 457 |
+
_wt._ Φ( _xt, yt_ _[∗]_ [)] _[ −]_ _[w][t][.]_ [Φ(] _[x][t][, y][t]_ [) +] ~~_ρ_~~ ~~(~~ ~~_y_~~ _t_ ~~_, y_~~ _t_ ~~_[∗]_~~ ~~[)]~~
|
| 458 |
+
|
| 459 |
+
**8** Set: _τt_ = ~~_||_~~ ~~Φ(~~ ~~_x_~~ _t_ ~~_,y_~~ _t_ ~~_[∗]_~~ ~~[)]~~ ~~_[−]_~~ _lt_ ~~[Φ(]~~ ~~_[x]_~~ _[t]_ ~~_[,y]_~~ _[t]_ ~~[)]~~ ~~_[||]_~~ ~~[2]~~
|
| 460 |
+
**9** Update:
|
| 461 |
+
_wt_ +1 = _wt_ + _τt_ (Φ( _xt, yt_ ) _−_ Φ( _xt, yt_ _[∗]_ [))]
|
| 462 |
+
**10** **end**
|
| 463 |
+
|
| 464 |
+
|
| 465 |
+
|
| 466 |
+
12
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
|Edge feature templates|Col2|
|
| 470 |
+
|---|---|
|
| 471 |
+
|~~Current state:~~_ si_|~~Previous state:~~_ si−_1<br>|
|
| 472 |
+
|_l_|_l_~~_′_~~<br>|
|
| 473 |
+
|~~Observation feature templates~~<br> <br>|~~Observation feature templates~~<br> <br>|
|
| 474 |
+
|~~Current state:~~_ si_|~~Statistic (or context predicate) templates:~~_ x_(~~**o**~~_, i_)<br>|
|
| 475 |
+
|_l_<br>|_w−_2~~;~~_ w−_1~~;~~_ w_0~~;~~_ w_1~~;~~_ w_2~~;~~_ w−_1_w_0~~;~~_ w_0_w_1~~;~~<br>_t−_2;_ t−_1;_ t_0;_ t_1;_ t_2;<br>_t−_2_t−_1;_ t−_1_t_0;_ t_0_t_1;_ t_1_t_2;_ t−_2_t−_1_t_0;<br>_t−_1_t_0_t_1;_ t_0_t_1_t_2<br>|
|
| 476 |
+
|
| 477 |
+
|
| 478 |
+
|
| 479 |
+
**3** **Experimental Results**
|
| 480 |
+
|
| 481 |
+
We evaluate the performance of using several sequence learning models for the Vietnamese NP
|
| 482 |
+
chunking problem. The data of more than 9,000
|
| 483 |
+
sentences is evaluated using an empirical experiment with 5 fold cross validation test. It means
|
| 484 |
+
we used 1,800 and 7,200 sentences for testing
|
| 485 |
+
and training the discriminative sequence learning
|
| 486 |
+
models, respectively. Note that the evaluation
|
| 487 |
+
method is used the same as CONLL2000 did. We
|
| 488 |
+
used Precision, Recall, and F-Measure in which
|
| 489 |
+
Precision measures how many chunks found by
|
| 490 |
+
the algorithm are correct and the recall is percentage of chunks defined in the corpus that were
|
| 491 |
+
found by the chunking program.
|
| 492 |
+
|
| 493 |
+
|
| 494 |
+
_Precision_ = #correct _−_ chunk
|
| 495 |
+
~~#numberofchunks~~
|
| 496 |
+
_Recall_ = #correct _−_ chunks
|
| 497 |
+
~~#numerofchunksinthecorpus~~
|
| 498 |
+
|
| 499 |
+
|
| 500 |
+
F _−_ measure = [2] _[ ×]_ [ Precision] _[ ×]_ [ Recall]
|
| 501 |
+
|
| 502 |
+
Precision + Recall
|
| 503 |
+
|
| 504 |
+
|
| 505 |
+
To compute the scores in our experiments, we
|
| 506 |
+
utilized the evaluation tool (conlleval.pl) which is
|
| 507 |
+
available in CONLL 2000 (Sang and Buchholz,
|
| 508 |
+
2000, ).
|
| 509 |
+
|
| 510 |
+
Figure 2 shows the precision scores of three
|
| 511 |
+
methods using 5 Folds cross validation test. It
|
| 512 |
+
reports that the CRF-LBFGS attain the highest
|
| 513 |
+
score. The SVMs and CRF-SGD are comparable
|
| 514 |
+
to CRF-LBFGS. The Online Learning achieved
|
| 515 |
+
the lowest score.
|
| 516 |
+
|
| 517 |
+
Figure 3 shows the recall scores of three CRFsLBFGS, CRFs-SGD, SVM, and Online Learning.
|
| 518 |
+
The results show that CRFs-SGD achieved the
|
| 519 |
+
highest score while the Online Learning obtained
|
| 520 |
+
the lowest score in comparison with others.
|
| 521 |
+
|
| 522 |
+
Figure 4 and Figure 5 show the F-measure and
|
| 523 |
+
accuracy scores using 5 Folds Cross-validation
|
| 524 |
+
|
| 525 |
+
|
| 526 |
+
|
| 527 |
+
Figure 2: Precision results in 5 Fold cross validation test
|
| 528 |
+
|
| 529 |
+
|
| 530 |
+
Test. Similar to these results of Precision and Recall, CRFs-LBFGS was superior to the other ones
|
| 531 |
+
while the Online Learning method obtained the
|
| 532 |
+
lowest result.
|
| 533 |
+
|
| 534 |
+
Table 3 shows the comparison of three discriminative learning methods for Vietnamese Noun
|
| 535 |
+
Phrase chunking. We compared the three sequence learning methods including: CRFs using
|
| 536 |
+
the LBFGS method, CRFs with SGD, and Online Learning. Experiment results show that the
|
| 537 |
+
CRFs-LBFGS is the best in comparison with others. However, the computational times when training the data is slower than either SGD or Online
|
| 538 |
+
Learning. The SGD is faster than CRF-LBFS approximately 6 times. The SVM model obtained a
|
| 539 |
+
comparable results with CRFs models and it was
|
| 540 |
+
superior to Online Learning. It yields results that
|
| 541 |
+
were 0.712% than Online Learning. However, the
|
| 542 |
+
SVM’s training process take slower than CRFs
|
| 543 |
+
and Online Learning. According to our empirical
|
| 544 |
+
investigation, it takes approximately slower than
|
| 545 |
+
CRF-SGF, CRF-LBFGS as well as Online Learning.
|
| 546 |
+
|
| 547 |
+
|
| 548 |
+
|
| 549 |
+
13
|
| 550 |
+
|
| 551 |
+
|
| 552 |
+
Figure 3: Recall result in 5 Fold cross validation
|
| 553 |
+
test
|
| 554 |
+
|
| 555 |
+
|
| 556 |
+
Figure 4: The F-measure results of 5 Folds Crossvalidation Test
|
| 557 |
+
|
| 558 |
+
|
| 559 |
+
Note that we used FlexCRFs (Phan, Nguyen,
|
| 560 |
+
Tu, 2005) for Conditional Random Fields using LBFGS, and for Stochastic Gradient Descent
|
| 561 |
+
(SGD) we used SGD1.3 which is developed by
|
| 562 |
+
Leon Bottou [2] .
|
| 563 |
+
|
| 564 |
+
|Methods|Precision|Recall|F<br>1|
|
| 565 |
+
|---|---|---|---|
|
| 566 |
+
|~~CRF-LBGS~~<br>|~~80.85~~<br>|~~81.034~~<br>|~~80.86~~<br>|
|
| 567 |
+
|~~CRF-SGD~~<br>|~~80.74~~<br>|~~80.66~~<br>|~~80.58~~<br>|
|
| 568 |
+
|~~Online-PA~~<br>|~~80.034~~<br>|~~80.13~~<br>|~~79.89~~<br>|
|
| 569 |
+
|~~SVM~~<br>|~~80.412~~<br>|~~80.982~~<br>|~~80.638~~<br>|
|
| 570 |
+
|
| 571 |
+
|
| 572 |
+
|
| 573 |
+
formance using Discriminative Sequence Learning (CRFs, SVM, Online-PA)
|
| 574 |
+
|
| 575 |
+
|
| 576 |
+
In order to investigate which features are major effect on the discriminative learning models for
|
| 577 |
+
Vietnamese Chunking problems, we conduct three
|
| 578 |
+
experiments as follows.
|
| 579 |
+
|
| 580 |
+
2http://leon.bottou.org/projects/sgd
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
|
| 584 |
+
Figure 5: The accuracy scores of four methods
|
| 585 |
+
with 5 Folds Cross-validation Test
|
| 586 |
+
|
| 587 |
+
|
| 588 |
+
_•_ Cross validation test for three modes without
|
| 589 |
+
considering the edge features
|
| 590 |
+
|
| 591 |
+
|
| 592 |
+
_•_ Cross validation test for three models without
|
| 593 |
+
using POS features
|
| 594 |
+
|
| 595 |
+
|
| 596 |
+
_•_ Cross validation test for three models without
|
| 597 |
+
using lexical features
|
| 598 |
+
|
| 599 |
+
|
| 600 |
+
_•_ Cross validation test for three models without
|
| 601 |
+
using ”edge features template” features
|
| 602 |
+
|
| 603 |
+
|
| 604 |
+
Note that the computational time of training
|
| 605 |
+
SVMs model is slow, so we skip considering feature selection for SVMs. We only consider feature
|
| 606 |
+
selection for CRFs and Online Learning.
|
| 607 |
+
|
| 608 |
+
|Feature Set|LBFGS|SGD|Online|
|
| 609 |
+
|---|---|---|---|
|
| 610 |
+
|~~Full-Features~~<br>|~~80.86~~<br>|~~80.58~~<br>|~~79.89~~<br>|
|
| 611 |
+
|~~Without-Edge~~<br>|~~80.91~~<br>|~~78.66~~<br>|~~80.13~~<br>|
|
| 612 |
+
|~~Without-Pos~~<br>|~~62.264~~<br>|~~62.626~~<br>|~~59.572~~<br>|
|
| 613 |
+
|~~Without-Lex~~<br>|~~77.204~~<br>|~~77.712~~<br>|~~75.576~~<br>|
|
| 614 |
+
|
| 615 |
+
|
| 616 |
+
|
| 617 |
+
formance using Discriminative Sequence Learning (CRFs, Online-PA)
|
| 618 |
+
|
| 619 |
+
|
| 620 |
+
Table 4 shows that the Edge features have an
|
| 621 |
+
impact to the CRF-SGD model while it do not
|
| 622 |
+
affect to the performance of CRFs-LBFGS and
|
| 623 |
+
Online-PA learning. Table 4 also indicates that
|
| 624 |
+
the POS features are severed as important features
|
| 625 |
+
regarding to the performance of all discriminative sequence learning models. As we can see,
|
| 626 |
+
if one do not use POS features the F1-score of
|
| 627 |
+
each model is decreased more than 20%. We also
|
| 628 |
+
remark that the lexical features contribute an important role to the performance of Vietnamese text
|
| 629 |
+
|
| 630 |
+
|
| 631 |
+
|
| 632 |
+
14
|
| 633 |
+
|
| 634 |
+
|
| 635 |
+
Figure 6: F-measures of three methods with different feature set
|
| 636 |
+
|
| 637 |
+
|
| 638 |
+
|
| 639 |
+
chunking. If we do not use lexical features the
|
| 640 |
+
F1-score of each model is decreased till approximately 3%. In conclusion, the POS features significantly effect on the performance of the discriminative sequence models. This is similar to the note
|
| 641 |
+
of (Chen, Zhang, and Ishihara, 2006).
|
| 642 |
+
|
| 643 |
+
Figure 6 reports the F-Measures of using different feature set for each discriminative models.
|
| 644 |
+
Note that WPos, WLex, and WEdge mean without
|
| 645 |
+
using Pos features, without using lexical features,
|
| 646 |
+
and without using edge features, respectively. As
|
| 647 |
+
we can see, the CRF-LBFGs always achieved the
|
| 648 |
+
best scores in comparison with the other ones and
|
| 649 |
+
the Online Learning achieved the lowest scores.
|
| 650 |
+
|
| 651 |
+
|
| 652 |
+
**4** **Conclusions**
|
| 653 |
+
|
| 654 |
+
|
| 655 |
+
In this paper, we report an investigation of developing a Vietnamese Chunking tool. We have constructed an annotation corpus of more than 9,000
|
| 656 |
+
sentences and exploiting discriminative learning
|
| 657 |
+
models for the NP chunking task. Experimental results using 5 Folds cross-validation test have
|
| 658 |
+
showed that the discriminative models are well
|
| 659 |
+
suitable for Vietnamese phrase chunking. Conditional random fields show a better performance
|
| 660 |
+
in comparison with other methods. The part of
|
| 661 |
+
speech features are known as the most influence
|
| 662 |
+
features regarding to the performances of discriminative models on Vietnamese phrases chunking.
|
| 663 |
+
|
| 664 |
+
What our contribution is expected to be useful
|
| 665 |
+
for the development of Vietnamese Natural Language Processing. Our results and corpus can be
|
| 666 |
+
severed as a very good baseline for Natural Language Processing community to develop the Viet
|
| 667 |
+
|
| 668 |
+
|
| 669 |
+
namese chunking task.
|
| 670 |
+
|
| 671 |
+
There are still room for improving the performance of Vietnamese chunking models. For example, more attention on features selection is necessary. We would like to solve this in future work.
|
| 672 |
+
|
| 673 |
+
|
| 674 |
+
**Acknowledgments**
|
| 675 |
+
|
| 676 |
+
The constructive comments and helpful suggestions from three anonymous reviewers are greatly
|
| 677 |
+
appreciated. This paper is supported by JAIST
|
| 678 |
+
Grant for Research Associates and a part from a
|
| 679 |
+
national project named Building Basic Resources
|
| 680 |
+
and Tools for Vietnamese Language and Speech
|
| 681 |
+
Processing, KC01.01/06-10.
|
| 682 |
+
|
| 683 |
+
|
| 684 |
+
**References**
|
| 685 |
+
|
| 686 |
+
M. Collins. 2002. Discriminative training methods for hidden markov models: Theory and experiments with perceptron algorithms. In Proceedings
|
| 687 |
+
of EMNLP 2002.
|
| 688 |
+
|
| 689 |
+
|
| 690 |
+
K. Crammer et al. 2006. Online Passive-Aggressive
|
| 691 |
+
Algorithm. Journal of Machine Learning Research,
|
| 692 |
+
2006
|
| 693 |
+
|
| 694 |
+
|
| 695 |
+
W. Chen, Y. Zhang, and H. Ishihara 2006. An empirical study of Chinese chunking. In Proceedings
|
| 696 |
+
COLING/ACL 2006
|
| 697 |
+
|
| 698 |
+
|
| 699 |
+
Dinh Dien, Vu Thuy 2006. A maximum entropy
|
| 700 |
+
approach for vietnamese word segmentation. In
|
| 701 |
+
Proceedings of the IEEE - International Conference
|
| 702 |
+
on Computing and Telecommunication Technologies RIVF 2006: 248-253
|
| 703 |
+
|
| 704 |
+
|
| 705 |
+
J. Lafferty, A. McCallum, and F. Pereira. 2001. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In the proceed
|
| 706 |
+
|
| 707 |
+
|
| 708 |
+
15
|
| 709 |
+
|
| 710 |
+
|
| 711 |
+
ings of International Conference on Machine Learning (ICML), pp.282-289, 2001
|
| 712 |
+
|
| 713 |
+
N.C. Mai, D.N. Vu, T.P. Hoang. 1997. Foundations
|
| 714 |
+
of linguistics and Vietnamese. Education Publisher
|
| 715 |
+
(1997) 142. 152
|
| 716 |
+
|
| 717 |
+
Thi Minh Huyen Nguyen, Laurent Romary, Mathias
|
| 718 |
+
Rossignol, Xuan Luong Vu. 2006. A lexicon
|
| 719 |
+
for Vietnamese language processing. Language Reseourse Evaluation (2006) 40:291-309.
|
| 720 |
+
|
| 721 |
+
Minh Nghiem, Dien Dinh, Mai Nguyen. 2008. Improving Vietnamese POS tagging by integrating a
|
| 722 |
+
rich feature set and Support Vector Machines. In
|
| 723 |
+
Proceedings of the IEEE - International Conference
|
| 724 |
+
on Computing and Telecommunication Technologies RIVF 2008: 128–133.
|
| 725 |
+
|
| 726 |
+
X.H. Phan, M.L. Nguyen, C.T. Nguyen. FlexCRFs: Flexible Conditional Random Field Toolkit.
|
| 727 |
+
http://flexcrfs.sourceforge.net, 2005
|
| 728 |
+
|
| 729 |
+
T. Kudo and Y. Matsumoto. 2001. Chunking with
|
| 730 |
+
Support Vector Machines. The Second Meeting of
|
| 731 |
+
the North American Chapter of the Association for
|
| 732 |
+
Computational Linguistics (2001)
|
| 733 |
+
|
| 734 |
+
F. Sha and F. Pereira. 2005. Shallow Parsing with
|
| 735 |
+
Conditional Random Fields. Proceedings of HLTNAACL 2003 213-220 (2003)
|
| 736 |
+
|
| 737 |
+
C.T. Nguyen, T.K. Nguyen, X.H. Phan, L.M. Vietnamese Word Segmentation with CRFs and SVMs:
|
| 738 |
+
An Investigation. 2006. The 20th Pacific Asia Conference on Language, Information, and Computation
|
| 739 |
+
(PACLIC), 1-3 November, 2006, Wuhan, China
|
| 740 |
+
|
| 741 |
+
Tjong Kim Sang and Sabine Buchholz. 2000. Introduction to the CoNLL-2000 Shared Task: Chunking. Proceedings of CoNLL-2000, Lisbon, Portugal,
|
| 742 |
+
2000.
|
| 743 |
+
|
| 744 |
+
V. Vapnik. 1995. The Natural of Statistical Learning
|
| 745 |
+
Theory. New York: Springer-Verlag, 1995.
|
| 746 |
+
|
| 747 |
+
|
| 748 |
+
|
| 749 |
+
16
|
| 750 |
+
|
| 751 |
+
|
references/2009.alr.nguyen/paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:603f0bcbfe9012a70a5c0cfd1f4a57f29d8b28a8691e00d352be6917cc6317a6
|
| 3 |
+
size 577351
|
references/2011.acl.zhang/paper.md
ADDED
|
@@ -0,0 +1,508 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: "Transition-based Dependency Parsing with Rich Non-local Features"
|
| 3 |
+
authors:
|
| 4 |
+
- "Yue Zhang"
|
| 5 |
+
- "Joakim Nivre"
|
| 6 |
+
year: 2011
|
| 7 |
+
venue: "ACL 2011"
|
| 8 |
+
url: "https://aclanthology.org/P11-2033/"
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# **Transition-based Dependency Parsing with Rich Non-local Features**
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
**Yue Zhang**
|
| 16 |
+
University of Cambridge
|
| 17 |
+
Computer Laboratory
|
| 18 |
+
```
|
| 19 |
+
yue.zhang@cl.cam.ac.uk
|
| 20 |
+
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
**Abstract**
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
Transition-based dependency parsers generally use heuristic decoding algorithms but can
|
| 27 |
+
accommodate arbitrarily rich feature representations. In this paper, we show that we can improve the accuracy of such parsers by considering even richer feature sets than those employed in previous systems. In the standard
|
| 28 |
+
Penn Treebank setup, our novel features improve attachment score form 91.4% to 92.9%,
|
| 29 |
+
giving the best results so far for transitionbased parsing and rivaling the best results
|
| 30 |
+
overall. For the Chinese Treebank, they give a
|
| 31 |
+
signficant improvement of the state of the art.
|
| 32 |
+
An open source release of our parser is freely
|
| 33 |
+
available.
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
**1** **Introduction**
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
In this short paper, we study a third aspect in a
|
| 41 |
+
statistical system: feature definition. Representing
|
| 42 |
+
the type of information a statistical system uses to
|
| 43 |
+
make predictions, feature templates can be one of
|
| 44 |
+
the most important factors determining parsing accuracy. Various recent attempts have been made
|
| 45 |
+
to include non-local features into graph-based dependency parsing (Smith and Eisner, 2008; Martins
|
| 46 |
+
et al., 2009; Koo and Collins, 2010). Transitionbased parsing, by contrast, can easily accommodate
|
| 47 |
+
arbitrarily complex representations involving nonlocal features. Complex non-local features, such as
|
| 48 |
+
bracket matching and rhythmic patterns, are used
|
| 49 |
+
in transition-based constituency parsing (Zhang and
|
| 50 |
+
Clark, 2009; Wang et al., 2006), and most transitionbased dependency parsers incorporate some nonlocal features, but current practice is nevertheless to
|
| 51 |
+
use a rather restricted set of features, as exemplified
|
| 52 |
+
by the default feature models in MaltParser (Nivre et
|
| 53 |
+
al., 2006a). We explore considerably richer feature
|
| 54 |
+
representations and show that they improve parsing
|
| 55 |
+
accuracy significantly.
|
| 56 |
+
In standard experiments using the Penn Treebank,
|
| 57 |
+
our parser gets an unlabeled attachment score of
|
| 58 |
+
92.9%, which is the best result achieved with a
|
| 59 |
+
transition-based parser and comparable to the state
|
| 60 |
+
of the art. For the Chinese Treebank, our parser gets
|
| 61 |
+
a score of 86.0%, the best reported result so far.
|
| 62 |
+
188
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
**Joakim Nivre**
|
| 67 |
+
Uppsala University
|
| 68 |
+
Department of Linguistics and Philology
|
| 69 |
+
```
|
| 70 |
+
joakim.nivre@lingfil.uu.se
|
| 71 |
+
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
greedy one-best search, and positive results were reported. In the aspect of training, global structural
|
| 75 |
+
learning has been used to replace local learning on
|
| 76 |
+
each decision (Zhang and Clark, 2008; Huang et al.,
|
| 77 |
+
2009), although the effect of global learning has not
|
| 78 |
+
been separated out and studied alone.
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
Transition-based dependency parsing (Yamada and
|
| 83 |
+
Matsumoto, 2003; Nivre et al., 2006b; Zhang and
|
| 84 |
+
Clark, 2008; Huang and Sagae, 2010) utilize a deterministic shift-reduce process for making structural
|
| 85 |
+
predictions. Compared to graph-based dependency
|
| 86 |
+
parsing, it typically offers linear time complexity
|
| 87 |
+
and the comparative freedom to define non-local features, as exemplified by the comparison between
|
| 88 |
+
MaltParser and MSTParser (Nivre et al., 2006b; McDonald et al., 2005; McDonald and Nivre, 2007).
|
| 89 |
+
Recent research has addressed two potential disadvantages of systems like MaltParser. In the
|
| 90 |
+
aspect of decoding, beam-search (Johansson and
|
| 91 |
+
Nugues, 2007; Zhang and Clark, 2008; Huang et
|
| 92 |
+
al., 2009) and partial dynamic-programming (Huang
|
| 93 |
+
and Sagae, 2010) have been applied to improve upon
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
_Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics:shortpapers_, pages 188–193,
|
| 98 |
+
Portland, Oregon, June 19-24, 2011. c _⃝_ 2011 Association for Computational Linguistics
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
**2** **The Transition-based Parsing Algorithm**
|
| 102 |
+
|
| 103 |
+
In a typical transition-based parsing process, the input words are put into a queue and partially built
|
| 104 |
+
structures are organized by a stack. A set of shiftreduce actions are defined, which consume words
|
| 105 |
+
from the queue and build the output parse. Recent
|
| 106 |
+
research have focused on action sets that build projective dependency trees in an _arc-eager_ (Nivre et
|
| 107 |
+
al., 2006b; Zhang and Clark, 2008) or _arc-standard_
|
| 108 |
+
(Yamada and Matsumoto, 2003; Huang and Sagae,
|
| 109 |
+
2010) process. We adopt the arc-eager system [1], for
|
| 110 |
+
which the actions are:
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
_•_ `Shift`, which removes the front of the queue
|
| 114 |
+
and pushes it onto the top of the stack;
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
_•_ `Reduce`, which pops the top item off the stack;
|
| 118 |
+
|
| 119 |
+
_•_ `LeftArc`, which pops the top item off the
|
| 120 |
+
stack, and adds it as a modifier to the front of
|
| 121 |
+
the queue;
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
_•_ `RightArc`, which removes the front of the
|
| 125 |
+
queue, pushes it onto the stack and adds it as
|
| 126 |
+
a modifier to the top of the stack.
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
Further, we follow Zhang and Clark (2008) and
|
| 130 |
+
Huang et al. (2009) and use the generalized perceptron (Collins, 2002) for global learning and beamsearch for decoding. Unlike both earlier globallearning parsers, which only perform unlabeled
|
| 131 |
+
parsing, we perform labeled parsing by augmenting
|
| 132 |
+
the `LeftArc` and `RightArc` actions with the set
|
| 133 |
+
of dependency labels. Hence our work is in line with
|
| 134 |
+
Titov and Henderson (2007) in using labeled transitions with global learning. Moreover, we will see
|
| 135 |
+
that label information can actually improve link accuracy.
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
from single words
|
| 140 |
+
_S_ 0 _wp; S_ 0 _w; S_ 0 _p; N_ 0 _wp; N_ 0 _w; N_ 0 _p;_
|
| 141 |
+
_N_ 1 _wp; N_ 1 _w; N_ 1 _p; N_ 2 _wp; N_ 2 _w; N_ 2 _p;_
|
| 142 |
+
from word pairs
|
| 143 |
+
_S_ 0 _wpN_ 0 _wp; S_ 0 _wpN_ 0 _w; S_ 0 _wN_ 0 _wp; S_ 0 _wpN_ 0 _p;_
|
| 144 |
+
_S_ 0 _pN_ 0 _wp; S_ 0 _wN_ 0 _w; S_ 0 _pN_ 0 _p_
|
| 145 |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; N_ 0 _pN_ 0 _lpN_ 0 _l_ 2 _p;_
|
| 168 |
+
label set
|
| 169 |
+
_S_ 0 _wsr; S_ 0 _psr; S_ 0 _wsl; S_ 0 _psl; N_ 0 _wsl; N_ 0 _psl;_
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
Table 2: New feature templates.
|
| 173 |
+
_w_ - word; _p_ - POS-tag; _vl_, _vr_ - valency; _l_ dependency label, _sl_, _sr_ - labelset.
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
**3** **Feature Templates**
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
|
| 181 |
+
with _S_ 0, the front items from the queue with _N_ 0,
|
| 182 |
+
_N_ 1, and _N_ 2, the head of _S_ 0 (if any) with _S_ 0 _h_, the
|
| 183 |
+
leftmost and rightmost modifiers of _S_ 0 (if any) with
|
| 184 |
+
_S_ 0 _l_ and _S_ 0 _r_, respectively, and the leftmost modifier
|
| 185 |
+
|
| 186 |
+
the of _N_ 0 (if any) with _N_ 0 _l_, the baseline features are
|
| 187 |
+
|
| 188 |
+
shown in Table 1. These features are mostly taken
|
| 189 |
+
from Zhang and Clark (2008) and Huang and Sagae
|
| 190 |
+
(2010), and our parser reproduces the same accuracies as reported by both papers. In this table, _w_ and
|
| 191 |
+
_p_ represents the word and POS-tag, respectively. For
|
| 192 |
+
example, _S_ 0 _pN_ 0 _wp_ represents the feature template
|
| 193 |
+
that takes the word and POS-tag of _N_ 0, and combines it with the word of _S_ 0.
|
| 194 |
+
189
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
At each step during a parsing process, the
|
| 199 |
+
parser configuration can be represented by a tuple
|
| 200 |
+
_⟨S, N, A⟩_, where _S_ is the stack, _N_ is the queue of
|
| 201 |
+
incoming words, and _A_ is the set of dependency
|
| 202 |
+
arcs that have been built. Denoting the top of stack
|
| 203 |
+
|
| 204 |
+
1It is very likely that the type of features explored in this
|
| 205 |
+
paper would be beneficial also for the arc-standard system, although the exact same feature templates would not be applicable
|
| 206 |
+
because of differences in the parsing order.
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
In this short paper, we extend the baseline feature
|
| 210 |
+
templates with the following:
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
**Distance between** _S_ 0 **and** _N_ 0
|
| 214 |
+
Direction and distance between a pair of head and
|
| 215 |
+
modifier have been used in the standard feature
|
| 216 |
+
templates for maximum spanning tree parsing (McDonald et al., 2005). Distance information has
|
| 217 |
+
also been used in the easy-first parser of (Goldberg
|
| 218 |
+
and Elhadad, 2010). For a transition-based parser,
|
| 219 |
+
direction information is indirectly included in the
|
| 220 |
+
`LeftArc` and `RightArc` actions. We add the distance between _S_ 0 and _N_ 0 to the feature set by combining it with the word and POS-tag of _S_ 0 and _N_ 0,
|
| 221 |
+
as shown in Table 2.
|
| 222 |
+
It is worth noticing that the use of distance information in our transition-based model is different
|
| 223 |
+
from that in a typical graph-based parser such as
|
| 224 |
+
MSTParser. The distance between _S_ 0 and _N_ 0 will
|
| 225 |
+
correspond to the distance between a pair of head
|
| 226 |
+
and modifier when an `LeftArc` action is taken, for
|
| 227 |
+
example, but not when a `Shift` action is taken.
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
**Valency of** _S_ 0 **and** _N_ 0
|
| 231 |
+
The number of modifiers to a given head is used
|
| 232 |
+
by the graph-based submodel of Zhang and Clark
|
| 233 |
+
(2008) and the models of Martins et al. (2009) and
|
| 234 |
+
Sagae and Tsujii (2007). We include similar information in our model. In particular, we calculate the
|
| 235 |
+
number of left and right modifiers separately, calling them _left valency_ and _right valency_, respectively.
|
| 236 |
+
Left and right valencies are represented by _vl_ and _vr_
|
| 237 |
+
in Table 2, respectively. They are combined with the
|
| 238 |
+
word and POS-tag of _S_ 0 and _N_ 0 to form new feature
|
| 239 |
+
templates.
|
| 240 |
+
Again, the use of valency information in our
|
| 241 |
+
transition-based parser is different from the aforementioned graph-based models. In our case,
|
| 242 |
+
valency information is put into the context of the
|
| 243 |
+
shift-reduce process, and used together with each
|
| 244 |
+
action to give a score to the local decision.
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
**Unigram information for** _S_ 0 _h_ **,** _S_ 0 _l_ **,** _S_ 0 _r_ **and** _N_ 0 _l_
|
| 249 |
+
The head, left/rightmost modifiers of _S_ 0 and the
|
| 250 |
+
leftmost modifier of _N_ 0 have been used by most
|
| 251 |
+
arc-eager transition-based parsers we are aware of
|
| 252 |
+
through the combination of their POS-tag with information from _S_ 0 and _N_ 0. Such use is exemplified by
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
the feature templates “from three words” in Table 1.
|
| 257 |
+
We further use their word and POS-tag information
|
| 258 |
+
as “unigram” features in Table 2. Moreover, we
|
| 259 |
+
include the dependency label information in the
|
| 260 |
+
unigram features, represented by _l_ in the table. Unigram label information has been used in MaltParser
|
| 261 |
+
(Nivre et al., 2006a; Nivre, 2006).
|
| 262 |
+
|
| 263 |
+
|
| 264 |
+
**Third-order features of** _S_ 0 **and** _N_ 0
|
| 265 |
+
Higher-order context features have been used by
|
| 266 |
+
graph-based dependency parsers to improve accuracies (Carreras, 2007; Koo and Collins, 2010). We
|
| 267 |
+
include information of third order dependency arcs
|
| 268 |
+
in our new feature templates, when available. In
|
| 269 |
+
Table 2, _S_ 0 _h_ 2, _S_ 0 _l_ 2, _S_ 0 _r_ 2 and _N_ 0 _l_ 2 refer to the head
|
| 270 |
+
of _S_ 0 _h_, the second leftmost modifier and the second
|
| 271 |
+
rightmost modifier of _S_ 0, and the second leftmost
|
| 272 |
+
modifier of _N_ 0, respectively. The new templates
|
| 273 |
+
include unigram word, POS-tag and dependency
|
| 274 |
+
labels of _S_ 0 _h_ 2, _S_ 0 _l_ 2, _S_ 0 _r_ 2 and _N_ 0 _l_ 2, as well as
|
| 275 |
+
|
| 276 |
+
POS-tag combinations with _S_ 0 and _N_ 0.
|
| 277 |
+
|
| 278 |
+
|
| 279 |
+
**Set of dependency labels with** _S_ 0 **and** _N_ 0
|
| 280 |
+
As a more global feature, we include the set of
|
| 281 |
+
unique dependency labels from the modifiers of _S_ 0
|
| 282 |
+
and _N_ 0. This information is combined with the word
|
| 283 |
+
and POS-tag of _S_ 0 and _N_ 0 to make feature templates.
|
| 284 |
+
In Table 2, _sl_ and _sr_ stands for the set of labels on
|
| 285 |
+
the left and right of the head, respectively.
|
| 286 |
+
|
| 287 |
+
|
| 288 |
+
**4** **Experiments**
|
| 289 |
+
|
| 290 |
+
Our experiments were performed using the Penn
|
| 291 |
+
Treebank (PTB) and Chinese Treebank (CTB) data.
|
| 292 |
+
We follow the standard approach to split PTB3, using
|
| 293 |
+
sections 2 – 21 for training, section 22 for development and 23 for final testing. Bracketed sentences
|
| 294 |
+
from PTB were transformed into dependency formats using the Penn2Malt tool. [2] Following Huang
|
| 295 |
+
and Sagae (2010), we assign POS-tags to the training
|
| 296 |
+
data using ten-way jackknifing. We used our implementation of the Collins (2002) tagger (with 97.3%
|
| 297 |
+
accuracy on a standard Penn Treebank test) to perform POS-tagging. For all experiments, we set the
|
| 298 |
+
beam size to 64 for the parser, and report unlabeled
|
| 299 |
+
and labeled attachment scores (UAS, LAS) and unlabeled exact match (UEM) for evaluation.
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
2http://w3.msi.vxu.se/ nivre/research/Penn2Malt.html
|
| 304 |
+
190
|
| 305 |
+
|
| 306 |
+
|
| 307 |
+
feature UAS UEM
|
| 308 |
+
baseline 92.18% 45.76%
|
| 309 |
+
+distance 92.25% 46.24%
|
| 310 |
+
+valency 92.49% 47.65%
|
| 311 |
+
+unigrams 92.89% 48.47%
|
| 312 |
+
+third-order 93.07% 49.59%
|
| 313 |
+
+label set 93.14% 50.12%
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
Table 3: The effect of new features on the development
|
| 317 |
+
set for English. UAS = unlabeled attachment score; UEM
|
| 318 |
+
= unlabeled exact match.
|
| 319 |
+
|
| 320 |
+
|
| 321 |
+
UAS UEM LAS
|
| 322 |
+
Z&C08 transition 91.4% 41.8% H&S10 91.4% - this paper baseline 91.4% 42.5% 90.1%
|
| 323 |
+
this paper extended 92.9% 48.0% 91.8%
|
| 324 |
+
MSTParser 91.5% 42.5% K08 standard 92.0% - K&C10 model 1 93.0% - K&C10 model 2 92.9% -
|
| 325 |
+
|
| 326 |
+
Table 4: Final test accuracies for English. UAS = unlabeled attachment score; UEM = unlabeled exact match;
|
| 327 |
+
LAS = labeled attachment score.
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
**4.1** **Development Experiments**
|
| 331 |
+
|
| 332 |
+
Table 3 shows the effect of new features on the development test data for English. We start with the
|
| 333 |
+
baseline features in Table 1, and incrementally add
|
| 334 |
+
the distance, valency, unigram, third-order and label
|
| 335 |
+
set feature templates in Table 2. Each group of new
|
| 336 |
+
feature templates improved the accuracies over the
|
| 337 |
+
previous system, and the final accuracy with all new
|
| 338 |
+
features was 93 _._ 14% in unlabeled attachment score.
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
**4.2** **Final Test Results**
|
| 342 |
+
|
| 343 |
+
Table 4 shows the final test results of our
|
| 344 |
+
parser for English. We include in the table
|
| 345 |
+
results from the pure transition-based parser of
|
| 346 |
+
Zhang and Clark (2008) (row ‘Z&C08 transition’),
|
| 347 |
+
the dynamic-programming arc-standard parser of
|
| 348 |
+
Huang and Sagae (2010) (row ‘H&S10’), and graphbased models including MSTParser (McDonald and
|
| 349 |
+
Pereira, 2006), the baseline feature parser of Koo et
|
| 350 |
+
al. (2008) (row ‘K08 baeline’), and the two models
|
| 351 |
+
of Koo and Collins (2010). Our extended parser significantly outperformed the baseline parser, achiev
|
| 352 |
+
|
| 353 |
+
|
| 354 |
+
UAS UEM LAS
|
| 355 |
+
Z&C08 transition 84.3% 32.8% H&S10 85.2% 33.7% this paper extended 86.0% 36.9% 84.4%
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
Table 5: Final test accuracies for Chinese. UAS = unlabeled attachment score; UEM = unlabeled exact match;
|
| 359 |
+
LAS = labeled attachment score.
|
| 360 |
+
|
| 361 |
+
|
| 362 |
+
ing the highest attachment score reported for a
|
| 363 |
+
transition-based parser, comparable to those of the
|
| 364 |
+
best graph-based parsers.
|
| 365 |
+
Our experiments were performed on a Linux platform with a 2GHz CPU. The speed of our baseline
|
| 366 |
+
parser was 50 sentences per second. With all new
|
| 367 |
+
features added, the speed dropped to 29 sentences
|
| 368 |
+
per second.
|
| 369 |
+
As an alternative to Penn2Malt, bracketed sentences can also be transformed into Stanford dependencies (De Marneffe et al., 2006). Our parser gave
|
| 370 |
+
93.5% UAS, 91.9% LAS and 52.1% UEM when
|
| 371 |
+
trained and evaluated on Stanford _basic_ dependencies, which are projective dependency trees. Cer et
|
| 372 |
+
al. (2010) report results on Stanford _collapsed_ dependencies, which allow a word to have multiple
|
| 373 |
+
heads and therefore cannot be produced by a regular dependency parser. Their results are relevant
|
| 374 |
+
although not directly comparable with ours.
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
**4.3** **Chinese Test Results**
|
| 378 |
+
|
| 379 |
+
Table 5 shows the results of our final parser, the pure
|
| 380 |
+
transition-based parser of Zhang and Clark (2008),
|
| 381 |
+
and the parser of Huang and Sagae (2010) on Chinese. We take the standard split of CTB and use gold
|
| 382 |
+
segmentation and POS-tags for the input. Our scores
|
| 383 |
+
for this test set are the best reported so far and significantly better than the previous systems.
|
| 384 |
+
|
| 385 |
+
**5** **Conclusion**
|
| 386 |
+
|
| 387 |
+
|
| 388 |
+
|
| 389 |
+
We have shown that enriching the feature representation significantly improves the accuracy of our
|
| 390 |
+
transition-based dependency parser. The effect of
|
| 391 |
+
the new features appears to outweigh the effect of
|
| 392 |
+
combining transition-based and graph-based models, reported by Zhang and Clark (2008), as well
|
| 393 |
+
as the effect of using dynamic programming, as inHuang and Sagae (2010). This shows that feature
|
| 394 |
+
definition is a crucial aspect of transition-based pars191
|
| 395 |
+
|
| 396 |
+
|
| 397 |
+
ing. In fact, some of the new feature templates in this
|
| 398 |
+
paper, such as distance and valency, are among those
|
| 399 |
+
which are in the graph-based submodel of Zhang
|
| 400 |
+
and Clark (2008), but not the transition-based submodel. Therefore our new features to some extent
|
| 401 |
+
achieved the same effect as their model combination. The new features are also hard to use in dynamic programming because they add considerable
|
| 402 |
+
complexity to the parse items.
|
| 403 |
+
Enriched feature representations have been studied as an important factor for improving the accuracies of graph-based dependency parsing also. Recent research including the use of loopy belief network (Smith and Eisner, 2008), integer linear programming (Martins et al., 2009) and an improved
|
| 404 |
+
dynamic programming algorithm (Koo and Collins,
|
| 405 |
+
2010) can be seen as methods to incorporate nonlocal features into a graph-based model.
|
| 406 |
+
An open source release of our parser, together
|
| 407 |
+
with trained models for English and Chinese, are
|
| 408 |
+
freely available. [3]
|
| 409 |
+
|
| 410 |
+
|
| 411 |
+
|
| 412 |
+
**Acknowledgements**
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
|
| 416 |
+
We thank the anonymous reviewers for their useful
|
| 417 |
+
comments. Yue Zhang is supported by the European Union Seventh Framework Programme (FP7ICT-2009-4) under grant agreement no. 247762.
|
| 418 |
+
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
**References**
|
| 422 |
+
|
| 423 |
+
|
| 424 |
+
|
| 425 |
+
Xavier Carreras. 2007. Experiments with a higher-order
|
| 426 |
+
projective dependency parser. In _Proceedings of the_
|
| 427 |
+
_CoNLL Shared Task Session of EMNLP/CoNLL_, pages
|
| 428 |
+
957–961, Prague, Czech Republic.
|
| 429 |
+
Daniel Cer, Marie-Catherine de Marneffe, Dan Jurafsky, and Chris Manning. 2010. Parsing to stanford dependencies: Trade-offs between speed and accuracy. In _Proceedings of the Seventh conference_
|
| 430 |
+
_on International Language Resources and Evaluation_
|
| 431 |
+
_(LREC’10)_ .
|
| 432 |
+
Michael Collins. 2002. Discriminative training methods for hidden Markov models: Theory and experiments with perceptron algorithms. In _Proceedings of_
|
| 433 |
+
_EMNLP_, pages 1–8, Philadelphia, USA.
|
| 434 |
+
Marie-catherine De Marneffe, Bill Maccartney, and
|
| 435 |
+
Christopher D. Manning. 2006. Generating typed dependency parses from phrase structure parses. In _Pro-_
|
| 436 |
+
_ceedings of LREC_ .
|
| 437 |
+
|
| 438 |
+
|
| 439 |
+
|
| 440 |
+
3http://www.sourceforge.net/projects/zpar. version 0.5.
|
| 441 |
+
|
| 442 |
+
|
| 443 |
+
|
| 444 |
+
Yoav Goldberg and Michael Elhadad. 2010. An efficient algorithm for easy-first non-directional dependency parsing. In _Porceedings of HLT/NAACL_, pages
|
| 445 |
+
742–750, Los Angeles, California, June.
|
| 446 |
+
Liang Huang and Kenji Sagae. 2010. Dynamic programming for linear-time incremental parsing. In _Pro-_
|
| 447 |
+
_ceedings of ACL_, pages 1077–1086, Uppsala, Sweden,
|
| 448 |
+
July.
|
| 449 |
+
Liang Huang, Wenbin Jiang, and Qun Liu. 2009.
|
| 450 |
+
Bilingually-constrained (monolingual) shift-reduce
|
| 451 |
+
parsing. In _Proceedings of EMNLP_, pages 1222–1231,
|
| 452 |
+
Singapore.
|
| 453 |
+
Richard Johansson and Pierre Nugues. 2007. Incremental dependency parsing using online learning. In
|
| 454 |
+
_Proceedings of CoNLL/EMNLP_, pages 1134–1138,
|
| 455 |
+
Prague, Czech Republic.
|
| 456 |
+
Terry Koo and Michael Collins. 2010. Efficient thirdorder dependency parsers. In _Proceedings of ACL_,
|
| 457 |
+
pages 1–11, Uppsala, Sweden, July.
|
| 458 |
+
Terry Koo, Xavier Carreras, and Michael Collins. 2008.
|
| 459 |
+
Simple semi-supervised dependency parsing. In _Pro-_
|
| 460 |
+
_ceedings of ACL/HLT_, pages 595–603, Columbus,
|
| 461 |
+
Ohio, June.
|
| 462 |
+
Andre Martins, Noah Smith, and Eric Xing. 2009. Concise integer linear programming formulations for dependency parsing. In _Proceedings of ACL/IJCNLP_,
|
| 463 |
+
pages 342–350, Suntec, Singapore, August.
|
| 464 |
+
Ryan McDonald and Joakim Nivre. 2007. Characterizing the errors of data-driven dependency parsing models. In _Proceedings of EMNLP/CoNLL_, pages 122–
|
| 465 |
+
131, Prague, Czech Republic.
|
| 466 |
+
Ryan McDonald and Fernando Pereira. 2006. Online learning of approximate dependency parsing algorithms. In _Proceedings of EACL_, pages 81–88, Trento,
|
| 467 |
+
Italy, April.
|
| 468 |
+
Ryan McDonald, Koby Crammer, and Fernando Pereira.
|
| 469 |
+
2005. Online large-margin training of dependency
|
| 470 |
+
parsers. In _Proceedings of ACL_, pages 91–98, Ann
|
| 471 |
+
Arbor, Michigan, June.
|
| 472 |
+
Joakim Nivre, Johan Hall, and Jens Nilsson. 2006a.
|
| 473 |
+
Maltparser: A data-driven parser-generator for dependency parsing. pages 2216–2219.
|
| 474 |
+
Joakim Nivre, Johan Hall, Jens Nilsson, G¨uls¸en Eryiˇgit,
|
| 475 |
+
and Svetoslav Marinov. 2006b. Labeled pseudoprojective dependency parsing with support vector machines. In _Proceedings of CoNLL_, pages 221–225,
|
| 476 |
+
New York, USA.
|
| 477 |
+
Joakim Nivre. 2006. _Inductive Dependency Parsing_ .
|
| 478 |
+
Springer.
|
| 479 |
+
Kenji Sagae and Jun’ichi Tsujii. 2007. Dependency parsing and domain adaptation with LR models and parser
|
| 480 |
+
ensembles. In _Proceedings of the CoNLL Shared Task_
|
| 481 |
+
_Session of EMNLP-CoNLL 2007_, pages 1044–1050,
|
| 482 |
+
192
|
| 483 |
+
|
| 484 |
+
|
| 485 |
+
Prague, Czech Republic, June. Association for Computational Linguistics.
|
| 486 |
+
David Smith and Jason Eisner. 2008. Dependency parsing by belief propagation. In _Proceedings of EMNLP_,
|
| 487 |
+
pages 145–156, Honolulu, Hawaii, October.
|
| 488 |
+
Ivan Titov and James Henderson. 2007. A latent variable
|
| 489 |
+
model for generative dependency parsing. In _Proceed-_
|
| 490 |
+
_ings of IWPT_, pages 144–155, Prague, Czech Republic, June.
|
| 491 |
+
Xinhao Wang, Xiaojun Lin, Dianhai Yu, Hao Tian, and
|
| 492 |
+
Xihong Wu. 2006. Chinese word segmentation with
|
| 493 |
+
maximum entropy and n-gram language model. In
|
| 494 |
+
_Proceedings of SIGHAN Workshop_, pages 138–141,
|
| 495 |
+
Sydney, Australia, July.
|
| 496 |
+
H Yamada and Y Matsumoto. 2003. Statistical dependency analysis using support vector machines. In _Pro-_
|
| 497 |
+
_ceedings of IWPT_, Nancy, France.
|
| 498 |
+
Yue Zhang and Stephen Clark. 2008. A tale of
|
| 499 |
+
two parsers: investigating and combining graph-based
|
| 500 |
+
and transition-based dependency parsing using beamsearch. In _Proceedings of EMNLP_, Hawaii, USA.
|
| 501 |
+
Yue Zhang and Stephen Clark. 2009. Transition-based
|
| 502 |
+
parsing of the Chinese Treebank using a global discriminative model. In _Proceedings of IWPT_, Paris,
|
| 503 |
+
France, October.
|
| 504 |
+
|
| 505 |
+
|
| 506 |
+
193
|
| 507 |
+
|
| 508 |
+
|
references/2011.acl.zhang/paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:67d9e0723bd9ee119ad4c79ad5629970b13e1c7967107989b98ec248b9196818
|
| 3 |
+
size 98304
|
references/2015.kse.nguyen/paper.md
ADDED
|
@@ -0,0 +1,860 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: "Error Analysis for Vietnamese Dependency Parsing"
|
| 3 |
+
authors:
|
| 4 |
+
- "Kiet Van Nguyen"
|
| 5 |
+
- "Ngan Luu-Thuy Nguyen"
|
| 6 |
+
year: 2015
|
| 7 |
+
venue: "KSE 2015"
|
| 8 |
+
url: "https://arxiv.org/abs/1911.03724"
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Error Analysis for Vietnamese Dependency Parsing
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
Kiet Van Nguyen
|
| 16 |
+
Department of Information Science and Engineering
|
| 17 |
+
University of Information Technology
|
| 18 |
+
Vietnam National University – Ho Chi Minh City, Vietnam
|
| 19 |
+
Email: kietnv@uit.edu.vn
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
_**Abstract**_ **—Dependency parsing is needed in different applica-**
|
| 23 |
+
**tions of natural language processing. In this paper, we present**
|
| 24 |
+
**a thorough error analysis for dependency parsing for the Viet-**
|
| 25 |
+
**namese language, using two state-of-the-art parsers: MSTParser**
|
| 26 |
+
**and MaltParser. The error analysis results provide us insights in**
|
| 27 |
+
**order to improve the performance of dependency parsing for the**
|
| 28 |
+
**Vietnamese language.**
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
_**Keywords**_ **—** _**Dependency parsing, error analysis, graph-based**_
|
| 32 |
+
_**model, transition-based model.**_
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
I. INTRODUCTION
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
Dependency parsing is one of the fundamental problems in
|
| 39 |
+
natural language processing. In dependency parsing, there are
|
| 40 |
+
two main approaches: grammar-based and data-driven. Recent
|
| 41 |
+
works on dependency parsing mainly focus on data-driven
|
| 42 |
+
parsing models.
|
| 43 |
+
The problem of dependency parsing is described as follows:
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
**Input** : A sentence S consists of n words: S = _w_ 0, _w_ 1, _w_ 2,
|
| 47 |
+
..., _wn_, where _w_ 0 = ROOT.
|
| 48 |
+
**Output** : A connected, acyclic, and single-head dependency
|
| 49 |
+
graph G (V, A), in which:
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
_•_ V = _{0, 1, ..., n}_ is the vertex set;
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
_•_ A is the arc set, i.e, _(i, j, lk) ∈_ A represents a
|
| 56 |
+
dependency (arc) from _wi_ to _wj_ with label _lk ∈_ L;
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
_•_ L = _{l_ 1, _l_ 2, ..., _lL}_ is a set of permissible arc labels.
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
Dependency tree structures can be divided into two types:
|
| 63 |
+
projective and non-projective. A non-projective dependency
|
| 64 |
+
tree contains crossing arcs, while projective dependency trees
|
| 65 |
+
do not.
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
Figure 1 shows an example of parsing results for a Vietnamese sentence _Hai kịch bản mới mô tảcuộc sống hiện đại_
|
| 69 |
+
_(English translation: Two new scripts describe the mordern_
|
| 70 |
+
_life.)_ . We can see multiple instances of labeled dependency
|
| 71 |
+
relations such as the one from the verb _mô tả(describe)_ to
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
Figure 1. Dependency graph for a Vietnamese sentence.
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
Ngan Luu-Thuy Nguyen
|
| 79 |
+
Faculty of Computer Science
|
| 80 |
+
University of Information Technology
|
| 81 |
+
Vietnam National University – Ho Chi Minh City, Vietnam
|
| 82 |
+
Email: ngannlt@uit.edu.vn
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
_kịch bản (scripts)_ with the SUB label indicating that _kịch bản_
|
| 86 |
+
_(scripts)_ is the head of the syntactic subject of the verb.
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
Dependency parsing has gained a wide interest in the research community of natural language processing during the
|
| 90 |
+
past decade. Dependency parsing has been successfully employed for many applications such as information retrieval, text
|
| 91 |
+
summary, machine translation, and question answering. Large
|
| 92 |
+
and prestigious conferences in the field, including ACL, EACL,
|
| 93 |
+
and COLING, have constantly provided tutorials on dependency
|
| 94 |
+
parsing [3], [11], [15], [16], [17]. In particular, the 2006 and
|
| 95 |
+
2007 CoNLL Shared Tasks [1], [5] led to a boom in study on
|
| 96 |
+
data-driven dependency parsing on many languages: from 13
|
| 97 |
+
languages and 19 systems (CoNLL, 2006) to 19 languages and
|
| 98 |
+
23 systems (CoNLL, 2007).
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
State-of-the-art methods on dependency parsing for the
|
| 102 |
+
Vietnamese language achieved only less than 80% [2], [8]. To
|
| 103 |
+
understand why parsing performance is low and know how to
|
| 104 |
+
improve it, we carried out a thorough error analysis based on
|
| 105 |
+
two state-of-the-art data-driven dependency parsing systems,
|
| 106 |
+
MSTParser and MaltParser.
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
II. RELATED WORKS
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
_A. State-of-the-art Dependency Parsing_
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
A typical data-driven model for dependency parsing is
|
| 116 |
+
shown in Figure 2 which is borrowed from [11]. It includes three
|
| 117 |
+
important components: learning algorithm, parsing model, and
|
| 118 |
+
parsing algorithm. Depending on the parsing algorithm, datadriven dependency parsing models can be divided two types:
|
| 119 |
+
graph-based and transition-based. The combination of graphbased models and transition-based models forms hybrid models.
|
| 120 |
+
In this work, we focus on the first two approaches: graph-based
|
| 121 |
+
and transition-based.
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
Graph-based dependency parsing systems [13] parameterize
|
| 125 |
+
models over dependency subgraphs and learn these parameters
|
| 126 |
+
to score correct graphs above incorrect ones for every sentence
|
| 127 |
+
in a training set. The parsing systems try to search the highestscoring dependency graph among the set of all possible dependency graphs, which can be considered as a global inference
|
| 128 |
+
process. MSTParser is a graph-based dependency parser developed by the group of McDonald et al. since 2006. This system
|
| 129 |
+
is freely available for research purpose [1] .
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
As described in paper [13], transition-based dependency
|
| 133 |
+
parsing systems parameterize models over transitions from a
|
| 134 |
+
state to other in an abstract state machine. Parameters in these
|
| 135 |
+
models are learned using classification techniques to predict the
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
|Language|MST|Malt|Language|MST|Malt|
|
| 139 |
+
|---|---|---|---|---|---|
|
| 140 |
+
|Arabic|66.91|66.71|Japanese|90.71|91.65|
|
| 141 |
+
|Bulgarian|87.57|87.41|Portuguese|86.82|87.60|
|
| 142 |
+
|Chinese|85.90|86.92|Slovene|73.44|70.30|
|
| 143 |
+
|Czech|80.18|78.42|Spanish|82.25|81.29|
|
| 144 |
+
|Danish|84.79|84.77|Swedish|82.55|84.58|
|
| 145 |
+
|Dutch|79.19|78.59|Turkish|63.19|65.68|
|
| 146 |
+
|German|87.34|85.82|Overall|80.83|80.75|
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
Figure 2. A data-driven dependency parsing model [11].
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
most probable transition out of a set of possible transitions given
|
| 154 |
+
a state history. MaltParser is a transition-based dependency
|
| 155 |
+
parser which was developed by Nirve et al. This parser is
|
| 156 |
+
freely available for research purpose [2] . A comparison of the
|
| 157 |
+
characteristics of MSTParser and MaltParser is briefly shown
|
| 158 |
+
in Table I.
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
Table I. COMPARING BETWEEN TWO DATA-DRIVEN PARSING SYSTEMS
|
| 162 |
+
|
| 163 |
+
|Characteristic|MST3|Malt|
|
| 164 |
+
|---|---|---|
|
| 165 |
+
|Inference|Exhaustive|Greedy|
|
| 166 |
+
|Training|Global structure learning|Local decision learning|
|
| 167 |
+
|Features|Local features|Rich decision history|
|
| 168 |
+
|Fundamental trade-off|Golbal learning and inference|Rich feature space|
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
Two commonly-used evaluation metrics for dependency
|
| 173 |
+
parsing are the unlabeled attachment score (UAS) and the
|
| 174 |
+
labeled attachment score (LAS) [5]. UAS is the percentage of
|
| 175 |
+
tokens that are correctly assigned to the heads. LAS is the
|
| 176 |
+
percentage of tokens for which a system has predicted the
|
| 177 |
+
correct head and dependency type.
|
| 178 |
+
|
| 179 |
+
|
| 180 |
+
Table II shows the results of the two top performing systems
|
| 181 |
+
in the CoNLL-X shared task, developed by two groups McDonald et al. (2006) and Nirve et al.(2006). This table is borrowed
|
| 182 |
+
from [16] for the sake of comparison with the parsing results of
|
| 183 |
+
the Vietnamese language. For all 13 languages, MSTParser and
|
| 184 |
+
MaltParser achieved in average 80.83% and 80.75% in accuracy
|
| 185 |
+
respectively, as shown in Table II, which are not significantly
|
| 186 |
+
differ (∆ = 0.08%). The works [13], [14] characterize the
|
| 187 |
+
difference in errors made by a global, exhaustive, graph-based
|
| 188 |
+
parsing system (MSTParser) and a local, greedy, transitionbased parsing system (MaltParser).
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
_B. Vietnamese Dependency Treebank_
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
The Vietnamese Treebank [10] was developed as part of
|
| 195 |
+
the national project – Vietnamese Language and Speech Processing. This treebank contains about 10.200 phrase-structure
|
| 196 |
+
trees (about 220.000 tokens). Vietnamese Dependency Treebank (VnDT) contains dependency structures transferred from
|
| 197 |
+
Vietnamese Treebank following Dat Nguyen’s approach [2].
|
| 198 |
+
The VnDT treebank contains 33 dependency types. Table III
|
| 199 |
+
shows the distributions of all the dependency types. The proportion of non-projective structures in VnDT is 4.49%. The
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
1http://www.seas.upenn.edu/ strctlrn/MSTParser/MSTParser.html
|
| 203 |
+
2http://www.maltparser.org/
|
| 204 |
+
3In all tables, MSTParser and MaltParser are referred to as MST and Malt,
|
| 205 |
+
respectively, for short.
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
Table II. LABELED PARSING ACCURACY FOR TOP SCORING SYSTEMS
|
| 210 |
+
AT CONLL-X
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
percentage of sentences with length less than 30 tokens is
|
| 214 |
+
80%. The percentage of sentences with length over 20 tokens
|
| 215 |
+
accounts for 45.61%. It can be seen that the average length of the
|
| 216 |
+
sentences in VnDT is 21.45 tokens, which is longer than most
|
| 217 |
+
of other languages. In 13 languages in Table II, there are only
|
| 218 |
+
three languages (Arabic, Portuguese, and Spanish) with average
|
| 219 |
+
sentence length over 20 tokens [13].
|
| 220 |
+
|
| 221 |
+
|
| 222 |
+
Table III. PERCENTAGE OF DEPENDENCY TYPES IN VNDT TREEBANK.
|
| 223 |
+
|
| 224 |
+
|Dependency Type|Description|Percentage|
|
| 225 |
+
|---|---|---|
|
| 226 |
+
|NMOD|Noun modifier|19.01|
|
| 227 |
+
|VMOD|Verb modifier|14.81|
|
| 228 |
+
|PUNCT|Punctuation|13.94|
|
| 229 |
+
|*.OB|Any type ending by OB including DOB<br>(Direct Object), IOB (Indirect Object),<br>and POB (Object of a Preposition)|11.89|
|
| 230 |
+
|SUB|Subject|6.80|
|
| 231 |
+
|DET|Determiner|6.18|
|
| 232 |
+
|ADV|Adverb modifier|5.92|
|
| 233 |
+
|ROOT|Root|4.66|
|
| 234 |
+
|DEP|Unclassified|3.13|
|
| 235 |
+
|AMOD|Adjective modifier|2.35|
|
| 236 |
+
|COORD|Coordination|1.88|
|
| 237 |
+
|CONJ|Conjunction|1.86|
|
| 238 |
+
|X.*|Any dependency type starting with X|0.28|
|
| 239 |
+
|PMOD|Prepositional modifier|0.24|
|
| 240 |
+
|O.F.Tags|O.F.Tags refers to other grammatical<br>function<br>tags<br>as<br>dependency<br>types.<br>There are LOC (Location), TMP (Tem-<br>poral), PRP (Purpose), MNR (Manner),<br>PRD (Predicate), etc.|7.05|
|
| 241 |
+
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
_C. Dependency Parsing for the Vietnamese Language_
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
There are only a few studies on dependency parsing for
|
| 248 |
+
the Vietnamese language. The works [2], [8] built a dependency treebank for the Vietnamese language by converting the
|
| 249 |
+
Vietnamese Treebank from phrase structures to dependency
|
| 250 |
+
structures. The highest accuracies of MSTParser and MaltParser
|
| 251 |
+
trained on this treebank are 71.66% (LAS) and 70.49% (LAS)
|
| 252 |
+
respectively [2]. We can see that the parsing results reported
|
| 253 |
+
are still much lower than the accuracies of most of languages in
|
| 254 |
+
Table II. This is a challenge for Vietnamese dependency parsing
|
| 255 |
+
to achieve higher performance in future. However, the authors
|
| 256 |
+
did not report a detailed error analysis for further studies.
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
III. ERROR-ANALYSIS METHOD
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
We characterize parsing errors by the linguistic and structural properties of the dependency graph. The results of our
|
| 263 |
+
analysis experiments are reported in accuracy, precision, and
|
| 264 |
+
recall following the labeled scoring scheme. The process of
|
| 265 |
+
analyzing parsing errors has 2 steps:
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
_•_ Step 1: MSTParser and MaltParser are trained and
|
| 269 |
+
evaluated using the n-fold cross validation scheme.
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
_•_ Step 2: Error analysis is performed based on three
|
| 273 |
+
types of factors: length factors (sentence length, dependency length), graph factors (distance to root, number
|
| 274 |
+
of modifier siblings, and non-projective arc degree),
|
| 275 |
+
and linguistic factors (dependent part-of-speech and
|
| 276 |
+
dependency type), in a way similar to [13], [14].
|
| 277 |
+
|
| 278 |
+
|
| 279 |
+
The followings describe the factors in detail:
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
_•_ **Length of a sentence** : The number of words in sentence. The sentence in Figure 1 has a length of 7.
|
| 283 |
+
|
| 284 |
+
|
| 285 |
+
_•_ **Length of a dependency** : The distance in arc between
|
| 286 |
+
the head and the dependent. The length of a dependency relation from word _wi_ to word _wj_ is equal to
|
| 287 |
+
_|i – j|_ . In Figure 1, the dependency arc from _mô tả_
|
| 288 |
+
_(describe)_ to _kịch bản (scripts)_ has a dependency length
|
| 289 |
+
of 2.
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
_•_ **Distance to root** : For a given arc, this is the number of
|
| 293 |
+
arcs in the reverse path from the dependent of the arc
|
| 294 |
+
to the artificial root. For instance, the dependency arc
|
| 295 |
+
from _Root_ to _mô tả(describe)_ in Figure 1 has a distance
|
| 296 |
+
to root of 2.
|
| 297 |
+
|
| 298 |
+
|
| 299 |
+
_•_ **Siblings** : Two dependency arcs _(i, j, l)_ and _(i’, j’, l’)_ are
|
| 300 |
+
considered as siblings if they represent modifiers of the
|
| 301 |
+
same head, i.e, _i = i’_ . In Figure 1, the arcs from the
|
| 302 |
+
word _kịch bản (scripts)_ to the words _hai (two)_ and _mới_
|
| 303 |
+
_(new)_ are considered as siblings under this definition.
|
| 304 |
+
|
| 305 |
+
|
| 306 |
+
_•_ **Non-projective arc degree** : The degree of a dependency arc from word _w_ to word _u_ is defined as the
|
| 307 |
+
number of words occurring between w and u that are
|
| 308 |
+
not descendants of w and modify a word that does not
|
| 309 |
+
occur between w and u [4]. In the example in Figure
|
| 310 |
+
3, the arc from _xấu hổ(ashamed)_ to _Tùng (Tung)_ has a
|
| 311 |
+
degree of 1.
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
_•_ **Part-of-speech** : Part-of-speech of the dependent. We
|
| 315 |
+
focus on analyzing the major parts-of-speech such as
|
| 316 |
+
noun, verb, adjective, adjunct, preposition, and conjunction.
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
_•_ **Dependency type** : Label of dependency arcs. We focus
|
| 320 |
+
on popular dependency types such as root, subject,
|
| 321 |
+
object (including direct object and indirect object),
|
| 322 |
+
noun modifier, verb modifier, adjective modifier, coordination, and conjunction.
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
Figure 3. A non-projective sentence.
|
| 326 |
+
|
| 327 |
+
|
| 328 |
+
4MaltOptimizer chooses stacklazy parsing algorithm and SVM learning.
|
| 329 |
+
|
| 330 |
+
|
| 331 |
+
|
| 332 |
+
IV. PARSING RESULTS
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
We evaluated the parsers using 5-fold cross validation
|
| 336 |
+
scheme with the average fold size of 2400 sentences (about
|
| 337 |
+
43.750 words). We used the built-in feature set of the two
|
| 338 |
+
parsers that includes word features, part of speech features, and
|
| 339 |
+
dependency type features. We did not add any special feature
|
| 340 |
+
for Vietnamese parsing. For MaltParser, we used the MaltOptimizer [4] [9] in order to choose suitable feature model and
|
| 341 |
+
parameters and the best parsing algorithm for non-projective
|
| 342 |
+
structures. For MSTParser, we employed the non-projective
|
| 343 |
+
parsing algorithm. In these experiments, we used gold standard
|
| 344 |
+
part-of-speech tags.
|
| 345 |
+
|
| 346 |
+
|
| 347 |
+
In general, the accuracy of MSTParser surpassed that of
|
| 348 |
+
MaltParser. For UAS score, the MSTParser obtained an accuracy of 76.58% which is 0.5% higher than that of MaltParser
|
| 349 |
+
(76.08%). For LAS score, MSTParser performed better with
|
| 350 |
+
70.10% accuracy, while MaltParser achieved a score of 69.88%.
|
| 351 |
+
It should be noted that we included punctuation dependencies in
|
| 352 |
+
calculation of the scores.
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
V. ERROR ANALYSIS RESULTS
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
The analysis results are measured on the test and parsed
|
| 359 |
+
(predicted) data. We compare our results with those reported
|
| 360 |
+
in the paper [14] in several aspects. Our error anlysis results are
|
| 361 |
+
presented in detail below.
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
_A. Length Factors_
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
Table IV shows the accuracy of the two parsers relative to
|
| 368 |
+
sentence length. Difference between the two parsing accuracies
|
| 369 |
+
(∆) is less than 1.0. In general, both of the parsers tend to
|
| 370 |
+
have higher accuracies for shorter sentences. Similar to other
|
| 371 |
+
languages, MaltParser tends to perform better on short sentences (sentence length of 11–20 accounts for 35.39%). This is
|
| 372 |
+
because the greedy inference algorithm employed by MaltParser
|
| 373 |
+
makes fewer parsing decisions. As a result, the likelihood of
|
| 374 |
+
error propagation is reduced when parsing short sentences. The
|
| 375 |
+
rich feature representation also increases the performance of
|
| 376 |
+
MaltParser.
|
| 377 |
+
|
| 378 |
+
|
| 379 |
+
Table IV. ACCURACY RELATIVE TO SENTENCE LENGTH.
|
| 380 |
+
|
| 381 |
+
|Sentence Length|Percentage|MST|Malt|∆|
|
| 382 |
+
|---|---|---|---|---|
|
| 383 |
+
|1–10|19.00|79.73|79.47|0.26|
|
| 384 |
+
|11–20|35.39|73.23|73.35|-0.12|
|
| 385 |
+
|21–30|25.61|70.02|69.93|0.09|
|
| 386 |
+
|31–40|12.17|67.43|67.33|0.10|
|
| 387 |
+
|41-50|4.94|65.77|65.94|-0.17|
|
| 388 |
+
|_>_50|2.89|64.74|63.89|0.85|
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
|
| 392 |
+
In Vietnamese, short dependencies are often noun modifiers, prepositional objects, adjective modifiers and direct objects. Long sentences contain increasingly complex syntactic
|
| 393 |
+
structures, resulting in long dependencies which often contain
|
| 394 |
+
prepositions, conjunctions, or multiple clauses (see the column
|
| 395 |
+
of average dependency lengths in Table X). These characteristics affect the accuracy of the parser.
|
| 396 |
+
|
| 397 |
+
|
| 398 |
+
Table V measures the precision and recall of each parser
|
| 399 |
+
relative to dependency length in predicted and gold standard
|
| 400 |
+
dependency graphs. Precision measures the percentage of predicted arcs of length d that were correct. Recall presents the
|
| 401 |
+
percentage of gold standard arcs of length d that were predicted
|
| 402 |
+
|
| 403 |
+
|
| 404 |
+
correctly. We can see that both parsers tend to have higher
|
| 405 |
+
precision for shorter dependency lengths. MSTParser is more
|
| 406 |
+
precise than MatlParser for shorter dependency length (length
|
| 407 |
+
of 1 and 2 accounts for 67.97%), especially dependency length
|
| 408 |
+
of 1 with ∆ = 1.15. MaltParser is far more precise for longer
|
| 409 |
+
dependency arcs (dependency length >2) except dependency
|
| 410 |
+
length of 12. For the recall measure, MSTParser is better than
|
| 411 |
+
MaltParser for longer dependency lengths. These observations
|
| 412 |
+
are contrary to those of the analysis of the other languages.
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
Theoretically, MSTParser should not perform better or
|
| 416 |
+
worse for arcs of any length [14]. However, it can be seen that
|
| 417 |
+
the number of dependency arcs with a length larger than 2 is
|
| 418 |
+
smaller than the number with length less than or equal to 2. The
|
| 419 |
+
rich feature space employed by the MaltParser can efficiently
|
| 420 |
+
reduced the phenomenon of error propagation, which could be
|
| 421 |
+
the reason why the overall accuracies of the two parsers are
|
| 422 |
+
nearly identical.
|
| 423 |
+
|
| 424 |
+
|
| 425 |
+
Table V. DEPENDENCY ARC PRECISION/RECALL RELATIVE TO
|
| 426 |
+
PREDICTED/GOLD DEPENDENCY LENGTH.
|
| 427 |
+
|
| 428 |
+
|Length|Percentage|Precision|Col4|Col5|Recall|Col7|Col8|
|
| 429 |
+
|---|---|---|---|---|---|---|---|
|
| 430 |
+
|**Length**|**Percentage**|**MST**|**Malt**|∆|**MST**|**Malt**|∆|
|
| 431 |
+
|1|50.18|85.13|83.98|1.15|81.91|82.07|-0.16|
|
| 432 |
+
|2|17.79|67.01|66.75|0.26|65.38|66.56|-1.18|
|
| 433 |
+
|3|8.14|56.20|56.66|-0.46|56.78|58.81|-2.03|
|
| 434 |
+
|4|4.75|49.53|50.05|-0.52|51.73|52.71|-0.98|
|
| 435 |
+
|5|3.37|47.05|48.17|-1.12|49.76|50.14|-0.38|
|
| 436 |
+
|6|2.46|42.69|44.86|-2.17|48.16|47.83|0.33|
|
| 437 |
+
|7|1.86|43.97|45.45|-1.48|47.61|46.23|1.38|
|
| 438 |
+
|8|1.53|42.94|43.52|-0.58|46.82|45.52|1.30|
|
| 439 |
+
|9|1.25|40.34|43.06|-2.72|46.17|45.07|1.10|
|
| 440 |
+
|10|1.05|38.46|42.13|-3.67|42.57|43.84|-1.27|
|
| 441 |
+
|11|0.90|42.69|43.24|-0.55|45.45|45.04|0.41|
|
| 442 |
+
|12|0.77|44.09|42.96|1.13|47.66|44.53|3.13|
|
| 443 |
+
|13|0.69|45.35|48.20|-2.85|50.91|49.76|1.15|
|
| 444 |
+
|14|0.57|42.62|45.62|-3.00|47.29|46.94|0.35|
|
| 445 |
+
|15|0.50|45.59|47.86|-2.27|52.25|47.49|4.76|
|
| 446 |
+
|_≥_16|4.19|47.72|53.34|-5.62|59.75|54.66|5.09|
|
| 447 |
+
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
_B. Graph Factors_
|
| 451 |
+
|
| 452 |
+
|
| 453 |
+
Table VI shows the precisions and recalls of dependency
|
| 454 |
+
arcs relative to distance to root. Precision is the percentage of
|
| 455 |
+
dependency arcs in the predicted graphs at a distance of d that
|
| 456 |
+
is correct. Recall is the percentage of dependency arcs in the
|
| 457 |
+
gold standard graphs at a distance of d that is predicted. As
|
| 458 |
+
a result, both parsers have low precision and recall, and tend
|
| 459 |
+
to be more precise for distances of 2 and 3. The figures in
|
| 460 |
+
this table shows that for arcs close to the root, MSTParser is
|
| 461 |
+
better than MaltParser, and the reverse trend is observed for
|
| 462 |
+
arcs further away from the root. For MaltParser, dependency
|
| 463 |
+
arcs further away from the root are usually constructed early by
|
| 464 |
+
the parsing algorithm. Words that are not assigned as modifiers
|
| 465 |
+
are automatically linked to the root. Therefore, MaltParser has a
|
| 466 |
+
low precision for root modifiers, and these results are consistent
|
| 467 |
+
with their previous analysis results.
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
The second graph property we examine is the sibling of arcs.
|
| 471 |
+
We want to quantify the local neighborhood of an arc within
|
| 472 |
+
a dependency graph. Table VII measures the precisions and
|
| 473 |
+
recalls of the parsers relative to the number of predicted and
|
| 474 |
+
gold-standard siblings of dependency arcs. In general, both of
|
| 475 |
+
parsers have low precisions and recalls, and tend to be more
|
| 476 |
+
precise for those arcs with fewer siblings. MSTParser performs
|
| 477 |
+
better for dependency arcs that have no siblings (dependency
|
| 478 |
+
relations containing dependent is leaf), whereas MaltParser
|
| 479 |
+
|
| 480 |
+
|
| 481 |
+
|
| 482 |
+
Table VI. DEPENDENCY ARC PRECISION/RECALL RELATIVE TO
|
| 483 |
+
PREDICTED/GOLD DISTANCE TO ROOT.
|
| 484 |
+
|
| 485 |
+
|Distance|Percentage|Precision|Col4|Col5|Recall|Col7|Col8|
|
| 486 |
+
|---|---|---|---|---|---|---|---|
|
| 487 |
+
|**Distance**|**Percentage**|**MST**|**Malt**|∆|**MST**|**Malt**|∆|
|
| 488 |
+
|1|15.05|59.93|46.62|13.31|60.43|61.55|-1.12|
|
| 489 |
+
|2|37.22|61.92|64.05|-2.13|61.29|65.58|-4.29|
|
| 490 |
+
|3|34.31|61.41|65.46|-4.05|59.05|61.01|-1.96|
|
| 491 |
+
|4|9.48|44.56|56.66|-12.10|45.54|48.86|-3.32|
|
| 492 |
+
|5|2.81|31.98|48.25|-16.27|36.98|38.76|-1.78|
|
| 493 |
+
|6|0.88|20.27|49.50|-29.23|27.19|37.01|-9.82|
|
| 494 |
+
|_≥_7|0.24|11.97|24.55|-12.58|31.36|29.42|1.94|
|
| 495 |
+
|
| 496 |
+
|
| 497 |
+
|
| 498 |
+
tends to be more accurate for those arcs with more siblings.
|
| 499 |
+
When a sentence has more siblings, it generates more longdistance dependencies. These results are consistent with the
|
| 500 |
+
previous analysis results.
|
| 501 |
+
|
| 502 |
+
|
| 503 |
+
Table VIII shows the precisions and recalls relative to different arc degrees in predicted and gold standard non-projective
|
| 504 |
+
dependency graphs. MSTParser recognizes more degrees than
|
| 505 |
+
MaltParser. In general, both of the parsers yield low precisions
|
| 506 |
+
and recalls. These results can be explained by two reasons. First,
|
| 507 |
+
the training and test data sets contain too few non-projective
|
| 508 |
+
dependency structures (from 3% to 5%). Second, a high degree
|
| 509 |
+
of non-projectivity corresponds to longer dependencies which
|
| 510 |
+
are more challenging for the parsers to predict correctly.
|
| 511 |
+
|
| 512 |
+
|
| 513 |
+
Table VII. DEPENDENCY ARC PRECISIONS/RECALLS RELATIVE TO
|
| 514 |
+
PREDICTED/GOLD SIBLINGS. NMS = NUMBER OF MODIFIER SIBLINGS;
|
| 515 |
+
PER = PERCENTAGE.
|
| 516 |
+
|
| 517 |
+
|NMS|PER|Precision|Col4|Col5|Recall|Col7|Col8|
|
| 518 |
+
|---|---|---|---|---|---|---|---|
|
| 519 |
+
|**NMS**|**PER**|**MST**|**Malt**|∆|**MST**|**Malt**|∆|
|
| 520 |
+
|0|35.77|80.83|78.66|2.17|77.04|77.37|-0.33|
|
| 521 |
+
|1|35.77|44.92|49.19|-4.27|47.04|50.28|-3.24|
|
| 522 |
+
|2|15.04|28.50|36.57|-8.07|33.10|38.57|-5.47|
|
| 523 |
+
|3|5.65|25.52|32.50|-6.98|28.92|33.63|-4.71|
|
| 524 |
+
|4|3.09|22.46|28.80|-6.34|25.29|29.02|-3.73|
|
| 525 |
+
|5|1.73|25.16|31.97|-6.81|24.70|31.46|-6.76|
|
| 526 |
+
|6|1.16|24.26|28.64|-4.38|20.37|26.86|-6.49|
|
| 527 |
+
|7|0.76|22.01|25.01|-3.00|16.33|23.80|-7.47|
|
| 528 |
+
|8|0.45|20.80|22.20|-1.40|10.97|19.86|-8.89|
|
| 529 |
+
|9|0.27|21.42|17.53|3.89|8.95|13.49|-4.54|
|
| 530 |
+
|_≥_10|0.36|9.04|9.14|-0.10|2.96|11.18|-8.22|
|
| 531 |
+
|
| 532 |
+
|
| 533 |
+
|
| 534 |
+
Table VIII. DEPENDENCY ARC PRECISION/RECALL RELATIVE TO
|
| 535 |
+
PREDICTED/GOLD DEGREE OF NON-PROJECTIVITY.
|
| 536 |
+
|
| 537 |
+
|Degree|MST|Col3|Malt|Col5|
|
| 538 |
+
|---|---|---|---|---|
|
| 539 |
+
|**Degree**|**Precision**|**Recall**|**Precision**|**Recall**|
|
| 540 |
+
|0|5.21|51.33|8.99|2.50|
|
| 541 |
+
|1|0.06|0.91|0.00|0.00|
|
| 542 |
+
|2|0.25|0.95|N/A|N/A|
|
| 543 |
+
|3|0.67|5.00|N/A|N/A|
|
| 544 |
+
|
| 545 |
+
|
| 546 |
+
|
| 547 |
+
_C. Linguistic Factors_
|
| 548 |
+
|
| 549 |
+
|
| 550 |
+
Table IX shows the accuracies of the two parsers for different parts of speech. We measure labeled dependency accuracy
|
| 551 |
+
relative to the part-of-speech of the modifier word in dependency relations. As a result, we can see that both of the parsers
|
| 552 |
+
achieve very high performances for adjuncts, quantities, and
|
| 553 |
+
determiners ( _≥_ 91.00%). For dependent parts-of-speech corresponding to lower accuracies, we see that MaltParser performs
|
| 554 |
+
slightly better for verbs, conjunctions and punctuations (comma,
|
| 555 |
+
period, quotation mark), while MSTParser performs better on
|
| 556 |
+
the other categories including nouns, prepositions, adjectives,
|
| 557 |
+
pronouns, and particles. The difference between the accuracies
|
| 558 |
+
of two parsers (∆) varies from 0.1% to 4.5%.
|
| 559 |
+
|
| 560 |
+
|
| 561 |
+
Table IX. DEPENDENCY ARC PRECISION/RECALL RELATIVE TO
|
| 562 |
+
PREDICTED/GOLD DEGREE OF NON-PROJECTIVITY.
|
| 563 |
+
|
| 564 |
+
|Dependent POS|MST|Malt|∆|
|
| 565 |
+
|---|---|---|---|
|
| 566 |
+
|Noun|73.87|72.31|1.56|
|
| 567 |
+
|Verb|63.33|64.13|-0.80|
|
| 568 |
+
|Adjunct|92.85|92.55|0.30|
|
| 569 |
+
|Preposition|52.91|51.03|1.88|
|
| 570 |
+
|Adjective|69.21|68.19|1.02|
|
| 571 |
+
|Pronoun|79.61|79.21|0.40|
|
| 572 |
+
|Conjunction|47.25|51.28|-4.03|
|
| 573 |
+
|Determiner|98.76|98.88|-0.12|
|
| 574 |
+
|Quantity|91.76|91.12|0.64|
|
| 575 |
+
|Particle|72.06|70.17|1.89|
|
| 576 |
+
|Punctuation|62.93|65.65|-2.72|
|
| 577 |
+
|
| 578 |
+
|
| 579 |
+
|
| 580 |
+
Table XII shows the dependent parts-of-speech and possible
|
| 581 |
+
dependency types for each POS. We can see the correlation between the accuracies of dependent part-of-speech and its dependency types. For instance, MaltParser achieves high accuracies
|
| 582 |
+
for verbs and conjunctions related to the types which appear
|
| 583 |
+
with high frequencies: VMOD, NMOD, DEP, and COORD.
|
| 584 |
+
On the other hand, MSTParser is better on categories such as
|
| 585 |
+
nouns, pronouns, prepositions, and adjectives. Because these
|
| 586 |
+
categories are related to high-frequency dependency relations
|
| 587 |
+
(SUB, DET, POB, DOB, LOC, and DET).
|
| 588 |
+
|
| 589 |
+
|
| 590 |
+
Table X displays precisions and recalls for different dependency types. In addtion, this table also gives us some information such as the percentage of dependency types and the average
|
| 591 |
+
of dependency lengths. MSTParser tends to be more accurate
|
| 592 |
+
for shorter dependency-lengths with the relations such as SUB,
|
| 593 |
+
DET, DOB, ADV, PMOD, AMOD, LOC, and CONJ, while
|
| 594 |
+
MaltParser has higher precision for longer dependency-lengths
|
| 595 |
+
with the relations such as PUNCT, DEP, COORD, and PRD.
|
| 596 |
+
These results is consistent with the previous results in Table
|
| 597 |
+
V. However, we can also observe that some cases reverse the
|
| 598 |
+
general trend, i.e, NMOD, VMOD, and ROOT. In particular,
|
| 599 |
+
dependency relations achieving high accuracies are DET, POB
|
| 600 |
+
and ADV. Because they have short dependency lengths (LDA
|
| 601 |
+
< 1.5) and fixed-word heads. And dependency relation ADV
|
| 602 |
+
primarily links verb to adverb and appears frequently in training
|
| 603 |
+
set.
|
| 604 |
+
|
| 605 |
+
|
| 606 |
+
Table X. PRECISION/RECALL FOR DIFFERENT DEPENDENCY TYPES.
|
| 607 |
+
DT = DEPENDENCY TYPE; PER = PERCENTAGE; DLA = DEPENDENCY
|
| 608 |
+
LENGTH AVERAGE.
|
| 609 |
+
|
| 610 |
+
|
| 611 |
+
|
| 612 |
+
We consider precision and recall for dependents of the root
|
| 613 |
+
node (mostly verbal predicate, noun predicate, and adjective
|
| 614 |
+
predicate), and for subjects and objects (direct objects and indirect objects). MSTParser has considerably better precision (and
|
| 615 |
+
better recall) for the root, subject, and direct object relations, but
|
| 616 |
+
MaltParser is better for indirect objects. The accuracy of verbal
|
| 617 |
+
predicate (ROOT-Verb) is more precise for MSTParser, shown
|
| 618 |
+
in Table XI. As results of root distance, we seen that MSTParser
|
| 619 |
+
is precise for root modifiers.
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
Table XI. ACCURACY OF ROOT RELATION.
|
| 623 |
+
|
| 624 |
+
|Root relation|Percentage|Accuracy|Col4|
|
| 625 |
+
|---|---|---|---|
|
| 626 |
+
|**Root relation**|**Percentage**|**MST**|**Malt**|
|
| 627 |
+
|Root - Verb|88.80|86.46|82.98|
|
| 628 |
+
|Root - Noun|5.80|56.82|68.77|
|
| 629 |
+
|Root - Adjective|4.70|50.92|45.71|
|
| 630 |
+
|
| 631 |
+
|
| 632 |
+
|
| 633 |
+
In term of COORD and CONJ, MSTParser is better for
|
| 634 |
+
CONJ, but MaltParser has better precision for COORD. We
|
| 635 |
+
can see that COORD often links a noun to a conjunction with
|
| 636 |
+
long dependency length (5.64). Linking a conjunction to a
|
| 637 |
+
noun forms a relation as CONJ with short dependency length
|
| 638 |
+
(2.43). Accuracies of relations related to conjunctions are also
|
| 639 |
+
consistent with previous results.
|
| 640 |
+
|
| 641 |
+
|
| 642 |
+
All experiments in this section show that there is a tradeoff between global learning and inference in the MSTParser
|
| 643 |
+
and rich feature presentation in the MaltParser. Although the
|
| 644 |
+
accuracy of MaltParser is affected by error propagation, the rich
|
| 645 |
+
feature presentation employed by the model helps to overcome
|
| 646 |
+
the problem in many cases. As a result, it performs rather well
|
| 647 |
+
for long dependencies, whereas MSTParser is more precise for
|
| 648 |
+
short dependencies. This is the main difference between the
|
| 649 |
+
Vietnamese language and other languages (from average of 13
|
| 650 |
+
languages in paper [14]) .
|
| 651 |
+
|
| 652 |
+
|
| 653 |
+
Table XII. DEPENDENT POS AND A LIST OF ITS DEPENDENCY TYPES.
|
| 654 |
+
|
| 655 |
+
|Dependent POS|Dependency Type|
|
| 656 |
+
|---|---|
|
| 657 |
+
|Adjunct|adv (76.45%), amod (12.88%), nmod (7.90%), dep (2.50%),<br>others(0.27%).|
|
| 658 |
+
|Determiner|det (99.59%), others(0.41%).|
|
| 659 |
+
|Quantity|det (95,32%), nmod (1.45%), others(3.23%).|
|
| 660 |
+
|Verb|vmod (50.62%), root (21%), nmod (9.53%), conj (7.19%),<br>dep (5.80%), others(5.86%).|
|
| 661 |
+
|Conjunction|coord (50.48%), dep (32.39%), nmod (8.34%), vmod<br>(5.73%), amod (2.96%), others(0.37%).|
|
| 662 |
+
|Noun|nmod (33.17%), dob (16.97%), sub (16.69%), pob (15.64%),<br>others(17.53%).|
|
| 663 |
+
|Pronoun|sub (31.61%), det (21.92%), nmod (17.69%), pob (11.56%),<br>dob (5.89%), vmod (4.17%), tmp (2.59%), others(4.57%).|
|
| 664 |
+
|Preposition|<br>loc<br>(23.49%),<br>nmod<br>(22.30%),<br>vmod<br>(15.34%),<br>prp<br>(10.85%), pmod (3.58%), mnr (3.21%), dir (3.08%), iob<br>(3.00%), amod (2.28%), others(12.87%).|
|
| 665 |
+
|Adjective|nmod (49.77%), vmod (24.35%), amod (5.75%), dep<br>(4.69%), root (4.52%), prd (3.27%), others(7.65%).|
|
| 666 |
+
|Particle|nmod (36.34%), vmod (29.39%), amod (13.98%), dep<br>(13.69%), det (6.52%), others(0.08%).|
|
| 667 |
+
|Punctuation|punct (100%).|
|
| 668 |
+
|
| 669 |
+
|
| 670 |
+
|
| 671 |
+
_D. Comparison with Other Languages_
|
| 672 |
+
|
| 673 |
+
|
| 674 |
+
Each language has its own characteristics which lead to
|
| 675 |
+
differences in the accuracy relative to the part-of-speech tags as
|
| 676 |
+
well as the dependency types. Table XIII and Table XIV show
|
| 677 |
+
that the difference between the parsing accuracies of the Vietnamese language and the average accuracies of 13 languages
|
| 678 |
+
(listed in Table II) relative to the dependency type is significant.
|
| 679 |
+
The average accuracies of 13 languages in these tables are taken
|
| 680 |
+
from paper [13].
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
|DT|PER|DLA|Precision|Col5|Recall|Col7|
|
| 684 |
+
|---|---|---|---|---|---|---|
|
| 685 |
+
|**DT**|**PER**|**DLA**|**MST**|**Malt**|**MST**|**Malt**|
|
| 686 |
+
|NMOD|19.49|1.83|78.22|79.04|77.07|75.09|
|
| 687 |
+
|VMOD|14.77|2.58|59.48|60.70|58.17|58.22|
|
| 688 |
+
|PUNCT|14.17|8.39|61.32|64.00|61.32|64.34|
|
| 689 |
+
|SUB|6.76|3.57|66.47|65.70|68.66|67.29|
|
| 690 |
+
|DET|6.28|1.21|94.54|93.94|93.49|93.77|
|
| 691 |
+
|DOB|5.89|1.63|76.19|68.76|64.38|64.00|
|
| 692 |
+
|ADV|5.83|1.45|92.80|92.72|93.69|93.61|
|
| 693 |
+
|POB|5.56|1.27|96.75|95.87|93.81|93.22|
|
| 694 |
+
|ROOT|4.69|5.62|82.69|79.92|82.69|79.84|
|
| 695 |
+
|DEP|3.13|7.29|33.47|41.51|51.18|47.83|
|
| 696 |
+
|AMOD|2.25|1.50|73.51|72.01|71.71|69.12|
|
| 697 |
+
|LOC|2.28|2.59|52.21|45.93|49.54|50.18|
|
| 698 |
+
|TMP|2.14|5.40|42.29|38.99|46.46|50.62|
|
| 699 |
+
|COORD|1.88|5.64|48.52|50.94|43.68|50.74|
|
| 700 |
+
|CONJ|1.87|2.43|75.44|70.32|67.01|69.85|
|
| 701 |
+
|PRP|1.28|3.98|32.26|32.47|45.61|42.28|
|
| 702 |
+
|MNR|0.39|3.84|25.96|21.44|40.71|40.04|
|
| 703 |
+
|PRD|0.32|5.83|9.25|1.00|16.41|15.78|
|
| 704 |
+
|PMOD|0.24|4.81|42.92|41.03|46.71|40.81|
|
| 705 |
+
|IOB|0.20|2.80|25.69|27.45|36.69|37.95|
|
| 706 |
+
|
| 707 |
+
|
| 708 |
+
The parsing results for adverbs for Vietnamese are higher in
|
| 709 |
+
comparison with the other languages. However for other types
|
| 710 |
+
of parts-of-speech, the accuracies of the Vietnamese parsing
|
| 711 |
+
are considerably lower, especially verbs, adjectives, and conjunctions. Roots, subjects and objects in Vietnamese are far
|
| 712 |
+
less precise than in others. One reason for such low accuracy
|
| 713 |
+
could be that the VnDT treebank contains many long sentences
|
| 714 |
+
with complex structures (see the statistics in Section II.B).
|
| 715 |
+
Inconsistencies in the Vietnamese Treebank may also affect
|
| 716 |
+
as presented in paper [12]. Other reasons may come from the
|
| 717 |
+
difference between the characteristics of Vietnamese and others,
|
| 718 |
+
which requires further effort of the research community.
|
| 719 |
+
|
| 720 |
+
|
| 721 |
+
Table XIII. ACCURACY RELATIVE TO DEPENDENT PART-OF-SPECH OF
|
| 722 |
+
VIETNAMESE (VIL) VERSUS AVERAGE OF 13 LANGUAGES (OTHERS).
|
| 723 |
+
|
| 724 |
+
|Dependent POS|MST|Col3|Col4|Malt|Col6|Col7|
|
| 725 |
+
|---|---|---|---|---|---|---|
|
| 726 |
+
|**Dependent POS**|**ViL**|**Others**|∆|**ViL**|**Others**|∆|
|
| 727 |
+
|Verb|63.3|82.6|-19.3|63.6|81.9|-18.3|
|
| 728 |
+
|Noun|73.9|80.0|-6.1|72.3|80.7|-8.4|
|
| 729 |
+
|Pronoun|79.6|88.4|-8.8|79.5|89.2|-9.7|
|
| 730 |
+
|Adjective|69.2|89.1|-19.9|68.1|87.9|-19.8|
|
| 731 |
+
|Adverb~~5~~|92.9|78.3|14.6|92.6|77.4|15.2|
|
| 732 |
+
|Conjunction|47.3|73.1|-25.8|48.8|69.8|-21.0|
|
| 733 |
+
|
| 734 |
+
|
| 735 |
+
|
| 736 |
+
Table XIV. PRECISION RELATIVE TO DEPENDENCY TYPE OF
|
| 737 |
+
VIETNAMESE (VIL) VERSUS AVERAGE OF 13 LANGUAGES (OTHERS).
|
| 738 |
+
|
| 739 |
+
|Dependency Type|MST|Col3|Col4|Malt|Col6|Col7|
|
| 740 |
+
|---|---|---|---|---|---|---|
|
| 741 |
+
|**Dependency Type**|**ViL**|**Others**|∆|**ViL**|**Others**|∆|
|
| 742 |
+
|Root|82.7|89.9|-7.2|79.0|84.7|-5.7|
|
| 743 |
+
|Subject|66.5|79.9|-13.4|66.5|80.3|-13.8|
|
| 744 |
+
|Object|50.9|76.5|-25.6|49.7|77.2|-27.5|
|
| 745 |
+
|
| 746 |
+
|
| 747 |
+
|
| 748 |
+
VI. CONCLUSION AND FUTURE DIRECTIONS
|
| 749 |
+
|
| 750 |
+
|
| 751 |
+
In this paper, we have presented a thorough study of distinctive error distributions produced by MSTParser and MaltParser for the Vietnamese language. In particular, we provide a
|
| 752 |
+
comparison with the error analysis of dependency parsing for
|
| 753 |
+
otherss. This would be helpful for researchers to create better
|
| 754 |
+
parsing models.
|
| 755 |
+
|
| 756 |
+
|
| 757 |
+
Based on the analysis results, we suggest some possible directions for the improvement of data-driven dependency parsing
|
| 758 |
+
for the Vietnamese language in future:
|
| 759 |
+
|
| 760 |
+
|
| 761 |
+
1) We can study a way to represent feature models suitable for Vietnamese language. For instance, we can
|
| 762 |
+
focus on improving the subject (SUB) dependency that
|
| 763 |
+
links the main verb to its modifiers. This work leads to
|
| 764 |
+
the improvement of POS features relative to subjects
|
| 765 |
+
such as nouns and verbs.
|
| 766 |
+
2) Vietnamese dependency parsing can be improved
|
| 767 |
+
by integrating the strength of both graph-based and
|
| 768 |
+
transition-based models in a similar way as proposed
|
| 769 |
+
by Nirve and McDonald [6].
|
| 770 |
+
3) We can also build ensemble systems as proposed by
|
| 771 |
+
Sagae and Lavie (2006) [7]. The error analysis for
|
| 772 |
+
a range of linguistic and graph-based factors in this
|
| 773 |
+
paper can help to build the weighing schemes for
|
| 774 |
+
ensemble systems.
|
| 775 |
+
|
| 776 |
+
|
| 777 |
+
5In Vietnamese, an adjunct is often an adverb which used to modify a verb.
|
| 778 |
+
|
| 779 |
+
|
| 780 |
+
|
| 781 |
+
REFERENCES
|
| 782 |
+
|
| 783 |
+
|
| 784 |
+
[1] Buchholz, Sabine, and Erwin Marsi. ”CoNLL-X shared task on multilingual language processing”. _In Proceedings of the 10th Conference on_
|
| 785 |
+
_Computational Natural Language Learning (CoNLL)_, pp. 149-164, New
|
| 786 |
+
York, 2006.
|
| 787 |
+
|
| 788 |
+
[2] Dat Nguyen, Dai Nguyen, Son Pham, Phuong-Thai Nguyen, and Minh
|
| 789 |
+
Le Nguyen. ”From treebank conversion to automatic dependency parsing
|
| 790 |
+
for Vietnamese”, _In Proceedings of 19th International Conference on_
|
| 791 |
+
_Application of Natural Language to Information Systems, NLDB’14_,
|
| 792 |
+
pp.196-207, France, 2014.
|
| 793 |
+
|
| 794 |
+
[3] Joakim Nirve and Sandra Kubler. ”Tutorial: Dependency Parsing”. _In_
|
| 795 |
+
_Proceedings of COLING/ACL 2006_, Sydney, Australia, 2006.
|
| 796 |
+
|
| 797 |
+
[4] Joakim Nivre. ”Constraints on non-projective dependency parsing”, _In_
|
| 798 |
+
_Proceedings of the 11th Conference of the European Chapter of the_
|
| 799 |
+
_Association for Computational Linguistics_, pp. 73-80, Italy, 2006.
|
| 800 |
+
|
| 801 |
+
[5] Joakim Nivre, Johan Hall, Sandra Kubler, Ryan McDonald, Jens Nilsson,
|
| 802 |
+
Sebastian Riedel, and Deniz Yure. ”The CoNLL 2007 Shared Task on
|
| 803 |
+
Dependency Parsing”. _In Proceedings of the CoNLL Shared Task Session_
|
| 804 |
+
_of EMNLP-CoNLL 2007_, pp. 915–932, Prague, 2007.
|
| 805 |
+
|
| 806 |
+
[6] Joakim Nivre and Ryan McDonald. ”Integrating Graph-Based and
|
| 807 |
+
Transition-Based Dependency Parsers”. _In Proceedings of the 46th An-_
|
| 808 |
+
_nual Meeting of the Association for Computational Linguistics: Human_
|
| 809 |
+
_Language Technologies (ACL-08: HLT)_, pp. 950–958, Ohio, 2008.
|
| 810 |
+
|
| 811 |
+
[7] Kenji Sagae and Alon Lavie. ”Parser Combination by Reparsing”. _In_
|
| 812 |
+
_Proceedings of the Human Language Technology Conference of the North_
|
| 813 |
+
_American Chapter of the ACL_, pp. 129–132, New York, 2006.
|
| 814 |
+
|
| 815 |
+
[8] Luong Nguyen Thi, Linh Ha My, Hung Nguyen Viet, Huyen Nguyen Thi
|
| 816 |
+
Minh, and Phuong Le Hong. ”Building a treebank for Vietnamese dependency parsing”. _In Proceedings of the 10th IEEE RIVF International_
|
| 817 |
+
_Conference on Computing and Communication Technologies, Research,_
|
| 818 |
+
_Innovation, and Vision for the Future_, pp.147-151, Vietnam, 2013.
|
| 819 |
+
|
| 820 |
+
[9] Miguel Ballesteros and Joakim Nivre. ”MaltOptimizer: An Optimization
|
| 821 |
+
Tool for MaltParser”. _In Proceedings of the System Demonstration_
|
| 822 |
+
_Session of the Thirteenth Conference of the European Chapter of the_
|
| 823 |
+
_Association for Computational Linguistics (EACL)_, France, 2012.
|
| 824 |
+
|
| 825 |
+
[10] Nguyen Phuong-Thai, Vu Xuan-Luong, Nguyen Thi-Minh-Huyen,
|
| 826 |
+
Nguyen Van-Hiep and Le Hong-Phuong. ”Building a Large SyntacticallyAnnotated Corpus of Vietnamese”. _In Proceedings of the Third Linguistic_
|
| 827 |
+
_Annotation Workshop_, pp. 182–185, Singapore, 2009.
|
| 828 |
+
|
| 829 |
+
[11] Qin Iris Wang and Yue Zhang. ”Tutorial: Recent Advances in Dependency Parsing”. _In Proceedings of the 11th Annual Conference of_
|
| 830 |
+
_the North American Chapter of the Association for Computational_
|
| 831 |
+
_Linguistics (NAACL)_, Los Angeles, 2010.
|
| 832 |
+
|
| 833 |
+
[12] Quy Nguyen, Ngan Nguyen, and Yusuke Miyao. ”Utilizing State-ofthe-art Parsers to Diagnose Problems in Treebank Annotation for a Less
|
| 834 |
+
Resourced Language”. _Proceedings of the 7th Linguistic Annotation_
|
| 835 |
+
_Workshop and Interoperability with Discourse_, pp. 19–27, Bulgaria,
|
| 836 |
+
2013.
|
| 837 |
+
|
| 838 |
+
[13] Ryan McDonald and Joakim Nirve. ”Analyzing and Integrating Dependency Parsers”. _Computational Linguistics - MIT Press Journal_, vol. 37,
|
| 839 |
+
no. 1, pp. 197-230, 2011.
|
| 840 |
+
|
| 841 |
+
[14] Ryan McDonald and Joakim Nirve. ”Characterizing the Errors of DataDriven Dependency Parsing Models”. _In Proceedings of the 2007 Joint_
|
| 842 |
+
_Conference on Empirical Methods in Natural Language Processing and_
|
| 843 |
+
_Computational Natural Language Learning_, pp. 122–131, Prague, 2007.
|
| 844 |
+
|
| 845 |
+
[15] Ryan McDonald and Joakim Nivre. ”Tutorial: Recent Advances in
|
| 846 |
+
Dependency Parsing”. _In Proceedings of the 14th Conference of the_
|
| 847 |
+
_European Chapter of the Association for Computational Linguistics_
|
| 848 |
+
_(EACL)_, Sweden, 2014.
|
| 849 |
+
|
| 850 |
+
[16] Wenliang Chen, Zhenghua Li, and Min Zhang. ”Tutorial: Dependency
|
| 851 |
+
Parsing: Past, Present, and Future”. _In Proceedings of the 25th Inter-_
|
| 852 |
+
_national Conference on Computational Linguistics (COLING)_, Dublin,
|
| 853 |
+
2014.
|
| 854 |
+
|
| 855 |
+
[17] Zhenghua Li, Wenliang Chen, and Min Zhang. ”Tutorial: Dependency
|
| 856 |
+
Parsing: Past, Present, and Future”. _In Proceedings of the 6th Inter-_
|
| 857 |
+
_national Joint Conference on Natural Language Processing (IJCNLP)_,
|
| 858 |
+
Japan, 2013.
|
| 859 |
+
|
| 860 |
+
|
references/2015.kse.nguyen/paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f3a1e1e3de11159b51667408bfc15b64f05f1569424cac340e30b32a5862b906
|
| 3 |
+
size 429910
|