Commit 6a35d7205e24f3b06f1bca9fa374b63775bd3c15

Authored by janek37
1 parent 5bd1366e

pomijanie nieistniejących wzorow w odmieniasiach przy imporcie

dictionary/management/commands/import_data.py
... ... @@ -566,7 +566,7 @@ class ImportData(object):
566 566 for crt in CrossReferenceType.objects.all()
567 567 )
568 568 for row in result:
569   - # niekompletne odsyłacze zdarzają się dla 'asp'
  569 + # POMIJANIE niekompletne odsyłacze zdarzają się dla 'asp'
570 570 if row['nrod'] and row['nrdo']:
571 571 cr_type = cr_type_table[
572 572 (row['typods'], row['pos1'], row['pos2'])]
... ... @@ -644,6 +644,7 @@ class ImportData(object):
644 644 endings = []
645 645 ending_quals = []
646 646 for row in self.sqlite_cursor.execute('SELECT * FROM zakonczenia'):
  647 + # POMIJANIE
647 648 if row['zak'] is not None:
648 649 endings.append(Ending(
649 650 pattern=self.patterns[row['wzor']],
... ... @@ -677,13 +678,15 @@ class ImportData(object):
677 678 lip_quals = []
678 679 for row in result:
679 680 lexeme_id = row['nr']
680   - lips.append(LexemeInflectionPattern(
681   - lexeme_id=lexeme_id,
682   - index=row['oskl'],
683   - pattern=self.patterns[row['wzor']],
684   - gender = self.genders.get(row['charfl']),
685   - root=row['rdzen'],
686   - ))
  681 + # POMIJANIE
  682 + if row['wzor'] in self.patterns: # wzór D w zmiotkach
  683 + lips.append(LexemeInflectionPattern(
  684 + lexeme_id=lexeme_id,
  685 + index=row['oskl'],
  686 + pattern=self.patterns[row['wzor']],
  687 + gender = self.genders.get(row['charfl']),
  688 + root=row['rdzen'],
  689 + ))
687 690 if row['okwal']:
688 691 for qual in row['okwal'].split(', '):
689 692 lip_quals.append((lexeme_id, row['oskl'], self.qual[qual]))
... ...