Skip to content
Snippets Groups Projects
Select Git revision
  • 0d514882b10859587eb6fd61cfc5bb48a09d22e0
  • master default protected
  • vertical_relations
  • lu_without_semantic_frames
  • hierarchy
  • additional-unification-filters
  • v0.1.1
  • v0.1.0
  • v0.0.9
  • v0.0.8
  • v0.0.7
  • v0.0.6
  • v0.0.5
  • v0.0.4
  • v0.0.3
  • v0.0.2
  • v0.0.1
17 results

models.py

Blame
  • PreprocessSemantics.py 576 B
    #! /usr/bin/python
    # -*- coding: utf-8 -*-
    
    from importer.Frame import Frame
    
    
    class Semantics:
    
        def __init__(self, base, pos, frames):
            self._frames = frames
            self._base = base
            self._pos = pos
    
        @classmethod
        def fromTree(cls, base, pos, frames_tree, meanings):
            arguments = {}
            
            frames = []
            for frame_subtree in frames_tree._children[0]._children[0]._children:
                frame = Frame.fromTree(base, pos, frame_subtree)
                frames.append(frame)
            
            return cls(base, pos, frames)