コード例 #1
0
ファイル: Main.py プロジェクト: ThiagoCF05/EACH-GRE
def initialize():
    anotacoes = parser.parseAnnotation()
    dominios = parser.parseDominio()
    participantes = parser.parseParticipantes()
    targets = {"1":"b3","2":"b2","3":"b3","4":"b2","5":"b3","6":"b1","7":"b3","8":"b1","9":"b2","10":"b1","11":"b2","12":"b1","13":"b3","14":"b1","15":"b3","16":"b1","17":"b1","18":"b1","19":"b1","20":"b1","21":"b1","22":"b1","23":"b1","24":"b1","25":"b4","26":"b3","27":"b4","28":"b3","29":"b3","30":"b3","31":"b3","32":"b3"}
    atributos = ['loc', 'left-of', 'next-to', 'on-top-of', 'right-of', 'type', 'col', 'size']
    return dominios, targets, anotacoes, participantes, atributos
コード例 #2
0
ファイル: Main.py プロジェクト: ThiagoCF05/EACH-GRE
def initialize():
    anotacoes = parser.parseAnnotation()
    dominios = parser.parseDominio()
    targets = {"1":"b1","2":"b1","3":"b1","4":"c2","5":"c1","6":"b1","7":"b1","8":"b1","9":"c1","10":"c2","11":"b1","12":"b1","13":"b1","14":"c2","15":"c1","16":"b1","17":"b1","18":"b1","19":"c1","20":"c1"}
    atributos = ['loc', 'left-of', 'next-to', 'on-top-of', 'right-of', 'type', 'col', 'size', 'in-front-of']
    return dominios, targets, anotacoes, atributos
コード例 #3
0
ファイル: Relatorio.py プロジェクト: ThiagoCF05/EACH-GRE
'''
Created on 06/01/2014

@author: thiagocastroferreira
'''

import ParserGRE3D as parser
import itertools as iter

targets = {"1":"b1","2":"b1","3":"b1","4":"c2","5":"c1","6":"b1","7":"b1","8":"b1","9":"c1","10":"c2","11":"b1","12":"b1","13":"b1","14":"c2","15":"c1","16":"b1","17":"b1","18":"b1","19":"c1","20":"c1"}
dominios = parser.parseDominio()

def isUnderspecified(expressao):
    for target in expressao["descricao"].keys():
        if target == "tg":
            properties = expressao["descricao"][target]
            dominio = dominios[expressao["caracteristicas"]["context"]]
            distractors = {}
            for property in properties.keys():
                distractors = {}
                for element in properties[property]:
                    for object in dominio.keys():
                        if property in dominio[object].keys():
                            if element in dominio[object][property]:
                                distractors[object] = dominio[object]
                    dominio = distractors
            
            if len(distractors.keys()) > 1:
                return True
    return False