Commit fd124999413fe660efaf9430048d92735e9d0ebe
1 parent
a10c91b3
wywalony widok analizy tabelek
Showing
3 changed files
with
0 additions
and
64 deletions
dictionary/templates/table_analyzer.html deleted
1 | -{% extends "base.html" %} | |
2 | - | |
3 | -{% block title %}Analiza tabelek{% endblock %} | |
4 | - | |
5 | -{% block content %} | |
6 | - <table> | |
7 | - {% for key, item in table_data %} | |
8 | - <tr> | |
9 | - <td> | |
10 | - {{ key.0 }},{{ key.1 }} | |
11 | - {{ key.2 }},{{ key.3 }} | |
12 | - </td> | |
13 | - <td> | |
14 | - <ul> | |
15 | - {% for bfl, pairs in item.iteritems %} | |
16 | - <li> | |
17 | - {{ bfl }}: | |
18 | - <ul> | |
19 | - {% for pt, ic in bfl.pairs %} | |
20 | - <li>{{ pt }},{{ ic }}</li> | |
21 | - {% endfor %} | |
22 | - </ul> | |
23 | - </li> | |
24 | - {% endfor %} | |
25 | - </ul> | |
26 | - </td> | |
27 | - </tr> | |
28 | - {% endfor %} | |
29 | - </table> | |
30 | -{% endblock %} | |
31 | 0 | \ No newline at end of file |
dictionary/views.py
... | ... | @@ -400,36 +400,3 @@ def wsjp_table(request, entry): |
400 | 400 | result = '\n'.join( |
401 | 401 | '\t'.join(['%s'] * len(data_row)) % data_row for data_row in data) |
402 | 402 | return HttpResponse(result, content_type="text/plain") |
403 | - | |
404 | -@render('table_analyzer.html') | |
405 | -def table_analyzer(request): | |
406 | - variant = Variant.objects.get(id='1') | |
407 | - parts_of_speech = ('v',) | |
408 | - cells = Cell.objects.filter( | |
409 | - table_template__variant=variant, | |
410 | - table_template__inflection_characteristic__part_of_speech__symbol__in= | |
411 | - parts_of_speech) | |
412 | - groups = {} | |
413 | - for cell in cells: | |
414 | - key = (cell.tablecell.row, cell.tablecell.col, | |
415 | - cell.tablecell.rowspan, cell.tablecell.colspan) | |
416 | - if key not in groups: | |
417 | - groups[key] = {} | |
418 | - bfl = (cell.base_form_label.symbol, cell.prefix, cell.suffix) | |
419 | - if bfl not in groups[key]: | |
420 | - groups[key][bfl] = {} | |
421 | - pt = cell.table_template.pattern_type.symbol | |
422 | - if pt not in groups[key][bfl]: | |
423 | - groups[key][bfl][pt] = set() | |
424 | - groups[key][bfl][pt].add( | |
425 | - cell.table_template.inflection_characteristic.symbol) | |
426 | - for key, item in sorted(groups.iteritems()): | |
427 | - print key | |
428 | - for bfl, pairs in item.iteritems(): | |
429 | - for pt, ic_set in pairs.iteritems(): | |
430 | - if ic_set == {u'qndk/dk', u'qndk/(dk)', u'qdk', u'qndk'}: | |
431 | - pairs[pt] = 'q' | |
432 | - if ic_set == {u'ndk/(dk)', u'dk/ndk', u'ndk', u'dk', u'ndk/dk', u'dk/(ndk)'}: | |
433 | - pairs[pt] = '-q' | |
434 | - print bfl, pairs | |
435 | - return {'table_data': []} | |
436 | 403 | \ No newline at end of file |
... | ... |
urls.py
... | ... | @@ -103,7 +103,6 @@ urlpatterns += patterns('dictionary.views', |
103 | 103 | url(r'^eksport/$', 'export'), |
104 | 104 | url(r'^administracja/$', 'management_menu'), |
105 | 105 | url(r'^WSJP/(.+)/$', 'wsjp_table'), |
106 | - url(r'^tables/$', 'table_analyzer') | |
107 | 106 | ) |
108 | 107 | |
109 | 108 | urlpatterns += patterns('paginer.ajax', |
... | ... |