Commit 9d4d556d1b47905ef4ba4a301ee1be1549d87484
1 parent
76ee3cb6
lepsza poprawka do ppas w widoku WSJP
Showing
1 changed file
with
3 additions
and
2 deletions
dictionary/wsjp.py
... | ... | @@ -34,10 +34,11 @@ NESTED_BASE = ''' |
34 | 34 | join leksemy g on l_id_do = g.id |
35 | 35 | left outer join dictionary_lexemeav refl |
36 | 36 | on (g.id = refl.lexeme_id and refl.attribute_value_id in (%(refl)s)) |
37 | - join odmieniasie o on l.id = o.l_id | |
37 | + join odmieniasie o | |
38 | + on case when l.pos = 'ppas' then g.id else l.id end = o.l_id | |
38 | 39 | join wzory on (o.w_id = wzory.id) |
39 | 40 | join paradygmatywsjp p |
40 | - on (%%s = p.charfl and wzory.typ = p.typr) | |
41 | + on (%%s = p.charfl and wzory.typ = p.typr and l.pos = p.pos) | |
41 | 42 | join zakonczenia z on (o.w_id = z.w_id and p.efobaz = z.efobaz) |
42 | 43 | where l.slownik in ('SGJP', 'WSJP') and |
43 | 44 | g.id=%%s and %(main_clause)s |
... | ... |