Commit 9e0dc4e9dc7a81848c44fb915cc16f1b121136ec
1 parent
be36a645
Creation years update.
Showing
5 changed files
with
16 additions
and
21 deletions
LICENSE
1 | Slowal, a web tool designed for creating, editing and browsing valence dictionaries. | 1 | Slowal, a web tool designed for creating, editing and browsing valence dictionaries. |
2 | http://zil.ipipan.waw.pl/Slowal | 2 | http://zil.ipipan.waw.pl/Slowal |
3 | 3 | ||
4 | -Copyright (c) 2012-2016 by Institute of Computer Science, Polish Academy of Sciences (IPI PAN) | 4 | +Copyright (c) 2012-2018 by Institute of Computer Science, Polish Academy of Sciences (IPI PAN) |
5 | All rights reserved. | 5 | All rights reserved. |
6 | 6 | ||
7 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | 7 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
dictionary/ajax_vocabulary_management.py
@@ -121,7 +121,7 @@ def create_copyrights_str(dictionary_file, frame_opinions_pks, | @@ -121,7 +121,7 @@ def create_copyrights_str(dictionary_file, frame_opinions_pks, | ||
121 | license_clause.extend([u"% http://zil.ipipan.waw.pl/Walenty", | 121 | license_clause.extend([u"% http://zil.ipipan.waw.pl/Walenty", |
122 | u"%% version: %s" % date.strftime(month + ' %d, %Y'), | 122 | u"%% version: %s" % date.strftime(month + ' %d, %Y'), |
123 | u"%", | 123 | u"%", |
124 | - u"% © Copyright 2012–2017 by the Institute of Computer Science, Polish", | 124 | + u"% © Copyright 2012–2018 by the Institute of Computer Science, Polish", |
125 | u"% Academy of Sciences (IPI PAN)", | 125 | u"% Academy of Sciences (IPI PAN)", |
126 | u"%", | 126 | u"%", |
127 | u"% This work is distributed under a CC BY-SA license:", | 127 | u"% This work is distributed under a CC BY-SA license:", |
dictionary/management/commands/get_stats_from.py
@@ -11,7 +11,7 @@ from django.db.models import Count, Max | @@ -11,7 +11,7 @@ from django.db.models import Count, Max | ||
11 | from dictionary.models import get_ready_statuses | 11 | from dictionary.models import get_ready_statuses |
12 | 12 | ||
13 | 13 | ||
14 | -STARTDATE = datetime.datetime(2017, 1, 1, 00, 00) | 14 | +STARTDATE = datetime.datetime(2016, 7, 1, 00, 00) |
15 | 15 | ||
16 | 16 | ||
17 | class Command(BaseCommand): | 17 | class Command(BaseCommand): |
@@ -113,8 +113,6 @@ def get_stats(pos): | @@ -113,8 +113,6 @@ def get_stats(pos): | ||
113 | stats_dict[u'frames_with_shared'] += visible_frames.count() | 113 | stats_dict[u'frames_with_shared'] += visible_frames.count() |
114 | stats_dict[u'sem_lemmas'] += 1 | 114 | stats_dict[u'sem_lemmas'] += 1 |
115 | 115 | ||
116 | - | ||
117 | - | ||
118 | return stats_dict | 116 | return stats_dict |
119 | 117 | ||
120 | 118 |
dictionary/teixml.py
@@ -65,7 +65,7 @@ def write_license_elem(parent_elem): | @@ -65,7 +65,7 @@ def write_license_elem(parent_elem): | ||
65 | licence.attrib['target'] = u'http://creativecommons.org/licenses/by-sa/4.0/' | 65 | licence.attrib['target'] = u'http://creativecommons.org/licenses/by-sa/4.0/' |
66 | 66 | ||
67 | p = etree.SubElement(licence, 'p') | 67 | p = etree.SubElement(licence, 'p') |
68 | - p.text = u'(C) Copyright 2012–2017 by the Institute of Computer Science, Polish Academy of Sciences (IPI PAN)' | 68 | + p.text = u'(C) Copyright 2012–2018 by the Institute of Computer Science, Polish Academy of Sciences (IPI PAN)' |
69 | 69 | ||
70 | p = etree.SubElement(licence, 'p') | 70 | p = etree.SubElement(licence, 'p') |
71 | p.text = u'This work is distributed under a CC BY-SA license: http://creativecommons.org/licenses/by-sa/4.0/' | 71 | p.text = u'This work is distributed under a CC BY-SA license: http://creativecommons.org/licenses/by-sa/4.0/' |
semantics/management/commands/adjectives_todo.py
1 | #! /usr/bin/python | 1 | #! /usr/bin/python |
2 | # -*- coding: utf-8 -*- | 2 | # -*- coding: utf-8 -*- |
3 | 3 | ||
4 | -import sys, os, codecs | ||
5 | - | ||
6 | from django.core.management.base import BaseCommand | 4 | from django.core.management.base import BaseCommand |
7 | 5 | ||
8 | from django.core.exceptions import ObjectDoesNotExist | 6 | from django.core.exceptions import ObjectDoesNotExist |
9 | from dictionary.models import Entry, POS | 7 | from dictionary.models import Entry, POS |
10 | -from wordnet.models import LexicalUnit | ||
11 | -from settings import PROJECT_PATH | 8 | + |
9 | + | ||
10 | +REL_POS = 'noun' | ||
11 | +REL_STATUS = '(S) sprawdzone' | ||
12 | + | ||
12 | 13 | ||
13 | class Command(BaseCommand): | 14 | class Command(BaseCommand): |
14 | args = 'none' | 15 | args = 'none' |
15 | help = '' | 16 | help = '' |
16 | 17 | ||
17 | def handle(self, **options): | 18 | def handle(self, **options): |
18 | - nouns_todo() | 19 | + adj_todo() |
20 | + | ||
19 | 21 | ||
20 | -def nouns_todo(): | 22 | +def adj_todo(): |
21 | adj = POS.objects.get(tag='adj') | 23 | adj = POS.objects.get(tag='adj') |
22 | - verb = POS.objects.get(tag='verb') | ||
23 | entries = Entry.objects.filter(pos=adj).order_by('name') | 24 | entries = Entry.objects.filter(pos=adj).order_by('name') |
24 | for entry in entries: | 25 | for entry in entries: |
25 | try: | 26 | try: |
26 | - temp = entry.actual_lemma() | 27 | + entry.actual_lemma() |
27 | except ObjectDoesNotExist: | 28 | except ObjectDoesNotExist: |
28 | continue | 29 | continue |
29 | - rel_entries = entry.rel_entries.filter(pos=verb) | 30 | + |
31 | + rel_entries = entry.rel_entries.filter(pos__tag=REL_POS) | ||
30 | for rel_entry in rel_entries: | 32 | for rel_entry in rel_entries: |
31 | - try: | ||
32 | - temp = entry.actual_lemma() | ||
33 | - except ObjectDoesNotExist: | ||
34 | - continue | ||
35 | - if rel_entry.actual_lemma().status.priority == 100: | 33 | + if rel_entry.actual_lemma().status.status == REL_STATUS: |
36 | print entry.name, ' ', entry.actual_lemma().status.status, '\t->\t', rel_entry.name, ' ', rel_entry.actual_lemma().status.status | 34 | print entry.name, ' ', entry.actual_lemma().status.status, '\t->\t', rel_entry.name, ' ', rel_entry.actual_lemma().status.status |
37 | - |