masterthesis/src/twomartens/masterthesis/definitions.py

77 lines
3.7 KiB
Python

# -*- coding: utf-8 -*-
#
# Copyright 2019 Jim Martens
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Provides defined constants.
Attributes:
COCO_TO_WNID: specifies a mapping from COCO ids to WordNet ids
WNID_TO_COCO: specifies a mapping from WordNet ids to COCO ids
"""
COCO_TO_WNID = {
15: ['02828884', '03891251', '03920867', '20000022', '20000037', '20000041'],
33: ['02773838'],
44: ['02876657', '04591713'],
47: ['03063599', '03438257', '03603722', '03797390'],
51: ['02880940', '02881193'],
62: ['02738535', '03001627', '03168217', '03262932', '03376595', '03649674', '03786621', '04331277', '04373704',
'04590933', '04593077', '08647616', '20000015', '20000016', '20000018', '20000020', '20000021', '20000023',
'20000024', '20000025', '20000026', '20000027'],
63: ['03002711', '03165096', '04177820', '04256520', '20000028', '20000029', '20000030'],
64: ['03990474', '03991062'],
65: ['02920259', '03962852', '04062428', '04099969', '20000004', '20000006', '20000007'],
67: ['03063968', '03092883', '03179701', '03246933', '03620967', '03904060', '04164868', '04379243', '04398951',
'08266235', '20000038', '20000039', '20000040'],
70: ['04446276'],
72: ['03085219', '03211117', '03211616', '03676759', '03782190', '04152593', '06277280'],
73: ['03642806'],
75: ['04074963'],
76: ['03085013'],
77: ['02992529', '03179910', '03261776', '03488438', '04401088'],
78: ['03761084'],
79: ['04330267'],
81: ['04223580', '04553920'],
84: ['06410904'],
85: ['03046257', '04548280'],
86: ['03593526', '04522168'],
90: ['04453156']
}
WNID_TO_COCO = {
'02738535': 62, '02773838': 33, '02828884': 15,
'02876657': 44, '02880940': 51, '02881193': 51, '02920259': 65,
'02992529': 77, '03001627': 62, '03002711': 63, '03046257': 85,
'03063599': 47, '03063968': 67, '03085013': 76, '03085219': 72, '03092883': 67, '03165096': 63, '03168217': 62,
'03179701': 67, '03179910': 77, '03211117': 72, '03211616': 72, '03246933': 67,
'03261776': 77, '03262932': 62, '03376595': 62, '03438257': 47,
'03488438': 77, '03593526': 86, '03603722': 47,
'03620967': 67, '03642806': 73, '03649674': 62, '03676759': 72,
'03761084': 78, '03782190': 72, '03786621': 62, '03797390': 47,
'03891251': 15, '03904060': 67, '03920867': 15, '03962852': 65,
'03990474': 64, '03991062': 64, '04062428': 65, '04074963': 75, '04099969': 65, '04152593': 72,
'04164868': 67, '04177820': 63, '04223580': 81, '04256520': 63, '04330267': 79,
'04331277': 62, '04373704': 62, '04379243': 67, '04398951': 67, '04401088': 77, '04446276': 70, '04453156': 90,
'04522168': 86, '04548280': 85, '04553920': 81,
'04590933': 62, '04591713': 44, '04593077': 62, '06277280': 72, '06410904': 84,
'08266235': 67, '08647616': 62, '20000004': 65, '20000006': 65, '20000007': 65,
'20000015': 62, '20000016': 62, '20000018': 62, '20000020': 62, '20000021': 62, '20000022': 15, '20000023': 62,
'20000024': 62,
'20000025': 62, '20000026': 62, '20000027': 62, '20000028': 63, '20000029': 63, '20000030': 63, '20000037': 15,
'20000038': 67, '20000039': 67, '20000040': 67,
'20000041': 15
}