Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 12335d27 rédigé par ayushkumarshah's avatar ayushkumarshah
Parcourir les fichiers

Convert to Python3 syntax

parent 662ad6d6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -150,7 +150,7 @@ def translateStructure( lg, label, nodeRelationPairs, structureMap,\
return strString
def translateRelation(lg, (relation, nextChildId), structureMap, \
def translateRelation(lg, relation, nextChildId, structureMap,
segPrimMap, edgeMap, symbolMap, nodeString):
"""Translate an individual spatial relation."""
relString = ""
......@@ -252,7 +252,7 @@ def translate(lg, segId, segPrimMap, edgeMap, symbolMap, structureMap):
if not strString == "":
nodeString = strString
for (nextChildId, relation) in sorted(subSupPairs, key=byValue):
nodeString = translateRelation(lg, (relation, nextChildId),\
nodeString = translateRelation(lg, relation, nextChildId,
structureMap, segPrimMap, edgeMap, symbolMap, nodeString)
#nodeString += translateRelation(lg, (relation, nextChildId),\
......@@ -260,13 +260,13 @@ def translate(lg, segId, segPrimMap, edgeMap, symbolMap, structureMap):
else:
# DEFAULT: map relations independently.
for (nextChildId, relation) in sorted(nodeRelationPairs, key=byValue):
nodeString = translateRelation(lg, (relation, nextChildId),\
nodeString = translateRelation(lg, relation, nextChildId,
structureMap, segPrimMap, edgeMap, symbolMap, nodeString)
# Lastly, generate string for adjacent symbols on the baseline.
# **if there are multiple 'HOR' symbols all will be mapped.
for (child, relation) in horRelation:
nodeString = translateRelation(lg, (relation, child),\
nodeString = translateRelation(lg, relation, child,
structureMap, segPrimMap, edgeMap, symbolMap, nodeString)
return nodeString
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter