diff --git a/LICENSE b/LICENSE index a9c712a..3620dc1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ Slowal, a web tool designed for creating, editing and browsing valence dictionaries. http://zil.ipipan.waw.pl/Slowal -Copyright (c) 2012-2016 by Institute of Computer Science, Polish Academy of Sciences (IPI PAN) +Copyright (c) 2012-2018 by Institute of Computer Science, Polish Academy of Sciences (IPI PAN) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/dictionary/ajax_vocabulary_management.py b/dictionary/ajax_vocabulary_management.py index c5b57e1..726898d 100644 --- a/dictionary/ajax_vocabulary_management.py +++ b/dictionary/ajax_vocabulary_management.py @@ -121,7 +121,7 @@ def create_copyrights_str(dictionary_file, frame_opinions_pks, license_clause.extend([u"% http://zil.ipipan.waw.pl/Walenty", u"%% version: %s" % date.strftime(month + ' %d, %Y'), u"%", - u"% © Copyright 2012–2017 by the Institute of Computer Science, Polish", + u"% © Copyright 2012–2018 by the Institute of Computer Science, Polish", u"% Academy of Sciences (IPI PAN)", u"%", u"% This work is distributed under a CC BY-SA license:", diff --git a/dictionary/management/commands/get_stats_from.py b/dictionary/management/commands/get_stats_from.py index ea37bc6..e70a91d 100644 --- a/dictionary/management/commands/get_stats_from.py +++ b/dictionary/management/commands/get_stats_from.py @@ -11,7 +11,7 @@ from django.db.models import Count, Max from dictionary.models import get_ready_statuses -STARTDATE = datetime.datetime(2017, 1, 1, 00, 00) +STARTDATE = datetime.datetime(2016, 7, 1, 00, 00) class Command(BaseCommand): @@ -113,8 +113,6 @@ def get_stats(pos): stats_dict[u'frames_with_shared'] += visible_frames.count() stats_dict[u'sem_lemmas'] += 1 - - return stats_dict diff --git a/dictionary/teixml.py b/dictionary/teixml.py index 7307534..524ecc9 100644 --- a/dictionary/teixml.py +++ b/dictionary/teixml.py @@ -65,7 +65,7 @@ def write_license_elem(parent_elem): licence.attrib['target'] = u'http://creativecommons.org/licenses/by-sa/4.0/' p = etree.SubElement(licence, 'p') - p.text = u'(C) Copyright 2012–2017 by the Institute of Computer Science, Polish Academy of Sciences (IPI PAN)' + p.text = u'(C) Copyright 2012–2018 by the Institute of Computer Science, Polish Academy of Sciences (IPI PAN)' p = etree.SubElement(licence, 'p') p.text = u'This work is distributed under a CC BY-SA license: http://creativecommons.org/licenses/by-sa/4.0/' diff --git a/semantics/management/commands/adjectives_todo.py b/semantics/management/commands/adjectives_todo.py index 7b3a634..895f4f4 100644 --- a/semantics/management/commands/adjectives_todo.py +++ b/semantics/management/commands/adjectives_todo.py @@ -1,37 +1,34 @@ #! /usr/bin/python # -*- coding: utf-8 -*- -import sys, os, codecs - from django.core.management.base import BaseCommand from django.core.exceptions import ObjectDoesNotExist from dictionary.models import Entry, POS -from wordnet.models import LexicalUnit -from settings import PROJECT_PATH + + +REL_POS = 'noun' +REL_STATUS = '(S) sprawdzone' + class Command(BaseCommand): args = 'none' help = '' def handle(self, **options): - nouns_todo() + adj_todo() + -def nouns_todo(): +def adj_todo(): adj = POS.objects.get(tag='adj') - verb = POS.objects.get(tag='verb') entries = Entry.objects.filter(pos=adj).order_by('name') for entry in entries: try: - temp = entry.actual_lemma() + entry.actual_lemma() except ObjectDoesNotExist: continue - rel_entries = entry.rel_entries.filter(pos=verb) + + rel_entries = entry.rel_entries.filter(pos__tag=REL_POS) for rel_entry in rel_entries: - try: - temp = entry.actual_lemma() - except ObjectDoesNotExist: - continue - if rel_entry.actual_lemma().status.priority == 100: + if rel_entry.actual_lemma().status.status == REL_STATUS: print entry.name, ' ', entry.actual_lemma().status.status, '\t->\t', rel_entry.name, ' ', rel_entry.actual_lemma().status.status -