摘要 |
A dictionary mapping source locale strings to target locale strings is constructed. A tree is constructed from the dictionary. The tree has nodes including a start node, end nodes, and string nodes. The nodes form node chains of the tree that correspond to the source locale strings. Each node chain links a collection of the nodes from the start node to a string node. Each node other than the start node has a parent node and corresponds to a character of the source locale strings. Each node other than the end nodes has one or more child nodes. Each string node ends a node chain, and corresponds to a mapping within the dictionary of a source locale string to a target locale string. An input string having the source locale is processed against the tree to generate an output string having the target locale.
|