Zh2Vi::Dict::DepDict
DepDict looks up word translations based on dependency relations Format: Each line in JSONL is ["child", "parent", "deprel", "child_val", "parent_val"]
Pattern matching:
- parent can be "suffix" or "prefix" for wildcard matching
- deprel can be "*" to match all relations
- When wildcard is used, parent_val is not applied
Constructors
new
SourceInstance methods
add(child : String, parent : String, deprel : String, child_val : String, parent_val : String | Nil) : Nil
Add an entry
Look up translation based on child, parent, and dependency relation Returns the most specific match (exact > pattern > wildcard)
size
Source