1 2 3 | taxonomy = alchemyapi.taxonomy('text', text) if not taxonomy['status'] == 'OK': return jsonify({'success': 'false'}) |
1 | return jsonify({'taxonomy': taxonomy, 'concepts': concepts}) |
1 2 3 4 5 6 7 | var taxonomy = html.taxonomy.taxonomy; var taxonomyHTML = '<p><b>Taxonomy (General Topic):</b></p>' $.each(taxonomy, function( index, value ) { taxonomyHTML += '<p>' + value.label + ': ' + value.score + '</p>' }); $('#taxonomy').html(taxonomyHTML); |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |