function Introduction
Pass in a Chinese character and return the dictionary of its radical radicals
Local dictionary and Network Dictionary, local dictionary from the simplified version of the Xinhua dictionary, the Network Dictionary from Baidu Chinese. If the current Chinese characters in the local dictionary, then directly query its radical and return the results if not found in the local dictionary, Baidu Chinese Search
If you want, you can add the results from the network dictionary to your local dictionary. Code
Below two all can download to the source code free of charge
Https://github.com/WenDesi/Chinese_radical
http://download.csdn.net/detail/wds2006sdo/9607195 Results
# Encoding=utf-8 from
radical import radical
if __name__ = = ' __main__ ':
radical = Radical ()
# If the word you want to find is in the dictionary, return directly to its radical
print radical.get_radical (' good ')
# Local Dictionary is not found, then from Baidu Chinese search
print radical.get_radical (' 淥 ')
# You can save the newly added word
# radical.save () by doing the following
Run the demo above, and the results are as follows: