Commit 4eb18189efe46b91419a9bd30b273d5c54ecfcca

Authored by janek37
1 parent f96a3f7f

wstępny wstęp do tworzenia derywatow

Showing 1 changed file with 26 additions and 0 deletions
dictionary/auto_derivatives.py 0 → 100644
  1 +# -*- coding: utf-8 -*-
  2 +from dictionary.models import Ending
  3 +
  4 +
  5 +def lexeme_derivatives(lexeme):
  6 + if lexeme.part_of_speech.symbol == 'v':
  7 + proper = lexeme.lexemeattributevalue_set.filter(
  8 + attribute__name=u'właściwy', value__in=('', '(Q)'))
  9 + if proper:
  10 + # ger, pact, ppas, appas
  11 + patterns = list(lexeme.patterns.all())
  12 + endings3 = Ending.objects.filter(
  13 + pattern__in=patterns, base_form_label='3')
  14 + endings10 = Ending.objects.filter(
  15 + pattern__in=patterns, base_form_label='10')
  16 + endings11 = Ending.objects.filter(
  17 + pattern__in=patterns, base_form_label='11')
  18 + endings12 = Ending.objects.filter(
  19 + pattern__in=patterns, base_form_label='12')
  20 + for ending in endings11:
  21 + # ger
  22 + pass
  23 +
  24 +
  25 +def create_derivative(lexeme, part_of_speech, root):
  26 + pass
... ...