Commit 0319942848e1165fe56b8594cea3614785c4ee7d
1 parent
110a14d0
Zmiany związane z importowaniem bazy
Showing
3 changed files
with
12 additions
and
14 deletions
semantics/admin.py
1 | 1 | from django.contrib import admin |
2 | 2 | |
3 | -from .models import Argument, Frame, FrameOpinion, GeneralSelectivePreference, RelationalSelectivePreference, \ | |
4 | - SelectivePreference, SelectivePreferenceRelation, SemanticRole | |
3 | +from .models import Argument, Frame, FrameOpinion, PredefinedSelectionalPreference, RelationalSelectionalPreference, \ | |
4 | + SelectionalPreferenceRelation, SemanticRole | |
5 | 5 | |
6 | 6 | admin.site.register(Argument) |
7 | 7 | admin.site.register(Frame) |
8 | 8 | admin.site.register(FrameOpinion) |
9 | -admin.site.register(GeneralSelectivePreference) | |
10 | -admin.site.register(RelationalSelectivePreference) | |
11 | -admin.site.register(SelectivePreference) | |
12 | -admin.site.register(SelectivePreferenceRelation) | |
9 | +admin.site.register(PredefinedSelectionalPreference) | |
10 | +admin.site.register(RelationalSelectionalPreference) | |
11 | +admin.site.register(SelectionalPreferenceRelation) | |
13 | 12 | admin.site.register(SemanticRole) |
... | ... |
semantics/models.py
... | ... | @@ -29,9 +29,9 @@ class FrameOpinion(models.Model): |
29 | 29 | |
30 | 30 | class Argument(models.Model): |
31 | 31 | roles = models.ManyToManyField('SemanticRole') |
32 | - generals = models.ManyToManyField('GeneralSelectivePreference') | |
32 | + predefined = models.ManyToManyField('PredefinedSelectionalPreference') | |
33 | 33 | synsets = models.ManyToManyField(Synset) |
34 | - relations = models.ManyToManyField('RelationalSelectivePreference') | |
34 | + relations = models.ManyToManyField('RelationalSelectionalPreference') | |
35 | 35 | |
36 | 36 | def __str__(self): |
37 | 37 | return str(self.roles.all()) |
... | ... | @@ -50,24 +50,23 @@ class SemanticRole(models.Model): |
50 | 50 | return self.role |
51 | 51 | |
52 | 52 | |
53 | -class GeneralSelectivePreference(models.Model): | |
53 | +class PredefinedSelectionalPreference(models.Model): | |
54 | 54 | key = models.CharField(max_length=20, unique=True) |
55 | 55 | # name = TODO: wymaga lokalizacji |
56 | - members = models.ForeignKey('SelectivePreference', on_delete=models.PROTECT) | |
57 | 56 | |
58 | 57 | def __str__(self): |
59 | 58 | return self.key |
60 | 59 | |
61 | 60 | |
62 | -class RelationalSelectivePreference(models.Model): | |
63 | - relation = models.ForeignKey('SelectivePreferenceRelation', on_delete=models.PROTECT) | |
61 | +class RelationalSelectionalPreference(models.Model): | |
62 | + relation = models.ForeignKey('SelectionalPreferenceRelation', on_delete=models.PROTECT) | |
64 | 63 | to = models.ForeignKey('Argument', on_delete=models.PROTECT) |
65 | 64 | |
66 | 65 | def __str__(self): |
67 | 66 | return '%s -> %s' % (self.relation, self.to) |
68 | 67 | |
69 | 68 | |
70 | -class SelectivePreferenceRelation(models.Model): | |
69 | +class SelectionalPreferenceRelation(models.Model): | |
71 | 70 | key = models.CharField(max_length=40, unique=True) |
72 | 71 | # name = TODO: wymaga lokalizacji |
73 | 72 | plwn_id = models.IntegerField(null=True) |
... | ... |
syntax/models.py
... | ... | @@ -139,7 +139,7 @@ class PredicativeControl(models.Model): |
139 | 139 | |
140 | 140 | class PhraseType(models.Model): |
141 | 141 | main_type = models.ForeignKey('PhraseTypeModel', related_name='main_phrase_types', on_delete=models.PROTECT) |
142 | - lexicalized_type = models.ForeignKey('PhraseTypeModel', related_name='lex_phrase_types', on_delete=models.PROTECT) | |
142 | + lexicalized_phrase = models.ForeignKey('PhraseType', related_name='lex_phrases', on_delete=models.PROTECT) | |
143 | 143 | text_rep = models.TextField(unique=True) |
144 | 144 | # realizations = TODO: uwzglednic jakos realizacje typow fraz |
145 | 145 | |
... | ... |