Conjunto de cambios fb25bf8 en modelado_topicos para topic_explorer/views.py
- Fecha y hora:
- 12/06/2015 09:47:58 (hace 9 años)
- Branches:
- master, preprocesamiento, v1.0
- Children:
- ff807e0
- Parents:
- 27c3620
- Fichero:
-
- 1 editado
Leyenda
- No modificado
- Añadido
- Eliminado
-
topic_explorer/views.py
rc617763 rfb25bf8 15 15 16 16 17 path = settings.PATH17 #path = settings.PATH 18 18 corpus_file = settings.CORPUS_FILE 19 19 context_type = settings.CONTEXT_TYPE … … 22 22 corpus_name = settings.CORPUS_NAME 23 23 icons = settings.ICONS 24 #path = 'logs/aux/{0}.log'25 24 26 25 corpus_link = settings.CORPUS_LINK 27 #topic_range = settings.TOPIC_RANGE28 26 topics_range = [int(item) for item in settings.TOPICS.split(',')] 29 27 doc_title_format = settings.DOC_TITTLE_FORMAT … … 47 45 return HttpResponseServerError(str(exc_value)) 48 46 49 # Create your views here.50 47 51 48 def doc_topic_csv(request, doc_id): 52 #response.content_type = 'text/csv; charset=UTF8'53 54 49 data = lda_v.doc_topics(doc_id) 55 50 … … 62 57 63 58 def doc_csv(request, doc_id, threshold=0.2): 64 #response.content_type = 'text/csv; charset=UTF8'65 66 59 data = lda_v.sim_doc_doc(doc_id) 67 60 … … 77 70 lda_m = LCM.load(model_pattern.format(k_param)) 78 71 lda_v = LDAViewer(lda_c, lda_m) 79 #response.content_type = 'application/json; charset=UTF8'80 72 try: 81 73 N = int(request.query.n) … … 106 98 except: 107 99 pass 108 109 #response.content_type = 'application/json; charset=UTF8'110 111 100 if N > 0: 112 101 data = lda_v.dist_doc_doc(doc_id)[:N] … … 130 119 def topics(request): 131 120 try: 132 #response.content_type = 'application/json; charset=UTF8'133 #response.set_header('Expires', _cache_date())134 135 121 # populate entropy values 136 122 data = lda_v.topic_oscillations() … … 157 143 158 144 def docs(request): 159 #response.content_type = 'application/json; charset=UTF8'160 #response.set_header('Expires', _cache_date())161 145 try: 162 146 docs = lda_v.corpus.view_metadata(context_type)[doc_label_name(context_type)]
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.