from django.core.management.base import BaseCommand

from syntacticframes.models import VerbNetClass
from parsecorrespondance import parse
from loadmapping import mapping

class Command(BaseCommand):
    def handle(self, *args, **options):
        for vn_class in VerbNetClass.objects.all():
            try:
                parse.get_ladl_list(vn_class.ladl_string)
            except parse.UnknownClassException as e:
                print('{:<30} {}'.format(vn_class.name, e))

            try:
                parse.get_lvf_list(vn_class.lvf_string)
            except parse.UnknownClassException as e:
                print('{:<30} {}'.format(vn_class.name, e))

from django.core.management.base import BaseCommand

from syntacticframes.models import VerbNetFrameSet
from parsecorrespondance import parse
from loadmapping import mapping

class Command(BaseCommand):
    def handle(self, *args, **options):
        for frameset in VerbNetFrameSet.objects.all():
            print("{}: {}/{}".format(frameset.name, frameset.ladl_string, frameset.lvf_string))

            if frameset.ladl_string:
                try:
                    parse.FrenchMapping('LADL', frameset.ladl_string).result()
                except parse.UnknownClassException as e:
                    print('{:<30} {}'.format(frameset.name, e))

            if frameset.lvf_string:
                try:
                    parse.FrenchMapping('LVF', frameset.lvf_string)
                except parse.UnknownClassException as e:
                    print('{:<30} {}'.format(frameset.name, e))

Check correspondances in framesets now
Check correspondances in framesets now

  from django.core.management.base import BaseCommand
  
- from syntacticframes.models import VerbNetClass
+ from syntacticframes.models import VerbNetFrameSet
  from parsecorrespondance import parse
  from loadmapping import mapping
  
  class Command(BaseCommand):
      def handle(self, *args, **options):
-         for vn_class in VerbNetClass.objects.all():
+         for frameset in VerbNetFrameSet.objects.all():
+             print("{}: {}/{}".format(frameset.name, frameset.ladl_string, frameset.lvf_string))
-             try:
-                 parse.get_ladl_list(vn_class.ladl_string)
-             except parse.UnknownClassException as e:
-                 print('{:<30} {}'.format(vn_class.name, e))
  
+             if frameset.ladl_string:
-             try:
+                 try:
-                 parse.get_lvf_list(vn_class.lvf_string)
+                     parse.FrenchMapping('LADL', frameset.ladl_string).result()
-             except parse.UnknownClassException as e:
+                 except parse.UnknownClassException as e:
-                 print('{:<30} {}'.format(vn_class.name, e))
+                     print('{:<30} {}'.format(frameset.name, e))
  
+             if frameset.lvf_string:
+                 try:
+                     parse.FrenchMapping('LVF', frameset.lvf_string)
+                 except parse.UnknownClassException as e:
+                     print('{:<30} {}'.format(frameset.name, e))
+ 
Check correspondances in framesets now
## Code Before:
from django.core.management.base import BaseCommand

from syntacticframes.models import VerbNetClass
from parsecorrespondance import parse
from loadmapping import mapping

class Command(BaseCommand):
    def handle(self, *args, **options):
        for vn_class in VerbNetClass.objects.all():
            try:
                parse.get_ladl_list(vn_class.ladl_string)
            except parse.UnknownClassException as e:
                print('{:<30} {}'.format(vn_class.name, e))

            try:
                parse.get_lvf_list(vn_class.lvf_string)
            except parse.UnknownClassException as e:
                print('{:<30} {}'.format(vn_class.name, e))

## Instruction:
Check correspondances in framesets now
## Code After:
from django.core.management.base import BaseCommand

from syntacticframes.models import VerbNetFrameSet
from parsecorrespondance import parse
from loadmapping import mapping

class Command(BaseCommand):
    def handle(self, *args, **options):
        for frameset in VerbNetFrameSet.objects.all():
            print("{}: {}/{}".format(frameset.name, frameset.ladl_string, frameset.lvf_string))

            if frameset.ladl_string:
                try:
                    parse.FrenchMapping('LADL', frameset.ladl_string).result()
                except parse.UnknownClassException as e:
                    print('{:<30} {}'.format(frameset.name, e))

            if frameset.lvf_string:
                try:
                    parse.FrenchMapping('LVF', frameset.lvf_string)
                except parse.UnknownClassException as e:
                    print('{:<30} {}'.format(frameset.name, e))
