Commit 7994b81f1aec4cfcab2f462f3d5bcff910758467

Authored by Katarzyna Krasnowska
1 parent e8b1b850

updated import_tei command

syntax/management/commands/import_tei.py
... ... @@ -18,7 +18,7 @@ from syntax.models_phrase import (
18 18 ModificationType,
19 19 )
20 20 from semantics.models import FrameOpinion, ArgumentRole, SemanticRole, RoleAttribute, PredefinedSelectionalPreference, SelectionalPreferenceRelation
21   -
  21 +from common.models import ImportInProgress
22 22  
23 23 class Command(BaseCommand):
24 24 args = 'none'
... ... @@ -28,9 +28,8 @@ class Command(BaseCommand):
28 28 import_tei()
29 29  
30 30 def import_tei():
31   - xml_file = os.path.join(BASE_DIR, 'data', 'tei', 'walenty_tei.xml')
32   - #xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'walenty_20200801.xml')
33   - #xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'walenty_20200801_smaller.xml')
  31 + #xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'walenty_20200926_smaller.xml')
  32 + xml_file = os.path.join(BASE_DIR, 'data', 'walenty', 'walenty_20200926.xml')
34 33  
35 34 xml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), xml_file)
36 35  
... ... @@ -48,6 +47,7 @@ def import_tei():
48 47  
49 48 parser.setContentHandler(WalentyTeiHandler(entry_meanings, meanings, frames))
50 49 parser.parse(xml_path)
  50 + ImportInProgress.objects.all().delete()
51 51  
52 52 def import_constants():
53 53 import_poses()
... ...