MCPcopy
hub / github.com/skywind3000/ECDICT / get_extra

Method get_extra

dictutils.py:904–921  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

902 return '<br><br>\n'.join(output)
903
904 def get_extra (self, data):
905 detail = data.get('detail')
906 if not detail:
907 return None
908 output = []
909 resemble = detail.get('resemble')
910 if resemble:
911 head = u'<span class="head">【有道词语辨析】</div><br>\n'
912 head = ''
913 output.append(head + resemble)
914 syno = detail.get('syno')
915 if syno:
916 head = u'<span class="head">【有道近义词】</div><br>\n'
917 head = ''
918 output.append(head + self.get_syno(data))
919 if not output:
920 return None
921 return '<br>\n'.join(output)
922
923 def get_explain (self, data):
924 cald = self.get_cald(data)

Callers 1

generate_backMethod · 0.95

Calls 2

get_synoMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected