module

Zh2Vi::UTT

UTT - Unified Translation Tagset Minimal tagset for dictionary lookup, focusing on meaning differentiation See: doc/unified-tagset.md

Constants

FALLBACK_CHAIN = {"NR" => ["N", "X"], "PN" => ["N", "X"], "M" => ["N", "X"], "A" => ["V", "D", "X"], "V" => ["A", "N", "X"], "N" => ["V", "A", "X"], "D" => ["A", "V", "M", "N", "X"], "F" => ["V", "N", "X"], "I" => ["V", "N", "X"], "X" => [] of String}

Fallback chain for dictionary lookup: Mỗi tag có logic fallback riêng dựa trên đặc tính ngữ pháp

Class methods

fallback(utt : String) : String | Nil

Legacy method for backward compatibility

Source
fallbacks(utt : String) : Array(String)

Get fallback tags for a UTT tag (returns array of fallbacks to try)

Source
for_token(pos : String, ner : String | Nil = nil) : String

Get UTT tag for a token, prioritizing NER if available

Source
from_con(con : String) : String

Map CON-CTB phrase tag to UTT tag

Source
from_ner(ner : String) : String

Map NER-OntoNotes tag to UTT tag

Source
from_pos(pos : String) : String

Map POS-CTB tag to UTT tag

Source