2024-11-10 20:28:47 +09:00
|
|
|
# substitution mapping for descriptions
|
2024-10-30 11:01:57 +09:00
|
|
|
# Abbreviations and their replacements
|
2024-11-10 20:28:47 +09:00
|
|
|
desc_replacement_dict = {
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bLIST\b': 'LIST',
|
|
|
|
r'\bList\b': 'LIST',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bEXH\.\b': 'EXHAUST',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bEXH\b': 'EXHAUST',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bEXHAUST\.\b': 'EXHAUST',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bExhaust\b': 'EXHAUST',
|
|
|
|
r'\bEXHAUST\b': 'EXHAUST',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bTEMP\.\b': 'TEMPERATURE',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bTEMP\b': 'TEMPERATURE',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bTEMPERATURE\.\b': 'TEMPERATURE',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bTEMPERATURE\b': 'TEMPERATURE',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bW\.\b': 'WATER',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bWATER\b': 'WATER',
|
|
|
|
r'\bCW\b': 'COOLING WATER',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bCYL\.\b': 'CYLINDER',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bCyl\b': 'CYLINDER',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bcyl\.\b': 'CYLINDER',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bCYL\b': 'CYLINDER',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bCYL(?=\d|\W|$)\b': 'CYLINDER',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bcylinder\b': 'CYLINDER',
|
|
|
|
r'\bCYLINDER\b': 'CYLINDER',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bCOOL\.\b': 'COOLING',
|
|
|
|
r'\bcool\.\b': 'COOLING',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bcooling\b': 'COOLING',
|
|
|
|
r'\bCOOLING\b': 'COOLING',
|
|
|
|
r'\bcooler\b': 'COOLER',
|
|
|
|
r'\bCOOLER\b': 'COOLER',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bScav\.\b': 'SCAVENGE',
|
|
|
|
r'\bSCAV\.\b': 'SCAVENGE',
|
|
|
|
r'\bINL\.\b': 'INLET',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\binlet\b': 'INLET',
|
|
|
|
r'\bINLET\b': 'INLET',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bOUT\.\b': 'OUTLET',
|
|
|
|
r'\bOUTL\.\b': 'OUTLET',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\boutlet\b': 'OUTLET',
|
|
|
|
r'\bOUTLET\b': 'OUTLET',
|
2024-11-11 20:20:43 +09:00
|
|
|
# bunker tank
|
|
|
|
r'\bBK\b': 'BUNKER',
|
|
|
|
r'\bTK\b': 'TANK',
|
2024-11-10 20:28:47 +09:00
|
|
|
# pressure
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bPRESS\b': 'PRESSURE',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bPRESS\.\b': 'PRESSURE',
|
|
|
|
r'\bPress\.\b': 'PRESSURE',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bpressure\b': 'PRESSURE',
|
|
|
|
r'\bPRESSURE\b': 'PRESSURE',
|
2024-11-10 20:28:47 +09:00
|
|
|
# this is a special replacement - it is safe to replace PRS w/o checks
|
|
|
|
r'PRS\b': 'PRESSURE',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bCLR\b': 'CLEAR',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bENG\.\b': 'ENGINE',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bENG\b': 'ENGINE',
|
|
|
|
r'\bENGINE\b': 'ENGINE',
|
|
|
|
r'\bEngine speed\b': 'ENGINE SPEED',
|
|
|
|
r'\bEngine running\b': 'ENGINE RUNNING',
|
|
|
|
r'\bEngine RPM pickup\b': 'ENGINE RPM PICKUP',
|
|
|
|
r'\bEngine room\b': 'ENGINE ROOM',
|
2024-11-10 20:28:47 +09:00
|
|
|
# main engine
|
2024-10-30 11:01:57 +09:00
|
|
|
r'\bM/E\b': 'MAIN_ENGINE',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bM_E\b': 'MAIN_ENGINE',
|
|
|
|
r'\bME(?=\d|\W|$)\b': 'MAIN_ENGINE',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bMAIN ENGINE\b': 'MAIN_ENGINE',
|
|
|
|
r'\bGen\b': 'GENERATOR_ENGINE',
|
2024-11-10 20:28:47 +09:00
|
|
|
# ensure that we substitute only for terms where following GE is num or special
|
|
|
|
r'\bGE(?=\d|\W|$)\b': 'GENERATOR_ENGINE',
|
2024-10-30 11:01:57 +09:00
|
|
|
r'\bG/E\b': 'GENERATOR_ENGINE',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bG_E\b': 'GENERATOR_ENGINE',
|
|
|
|
r'\bDG\b': 'GENERATOR_ENGINE',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bD/G\b': 'GENERATOR_ENGINE',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bGEN\.\b': 'GENERATOR_ENGINE',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bGENERATOR ENGINE\b': 'GENERATOR_ENGINE',
|
|
|
|
r'\b(\d+)MGE\b': r'NO\1 GENERATOR_ENGINE',
|
|
|
|
r'\bGEN\.WIND\.TEMP\b': 'GENERATOR WINDING TEMPERATURE',
|
|
|
|
r'\bENGINE ROOM\b': 'ENGINE ROOM',
|
|
|
|
r'\bE/R\b': 'ENGINE ROOM',
|
|
|
|
r'\bFLTR\b': 'FILTER',
|
2024-11-10 20:28:47 +09:00
|
|
|
# marine gas oil
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bM\.G\.O\b': 'MARINE GAS OIL',
|
|
|
|
r'\bMGO\b': 'MARINE GAS OIL',
|
|
|
|
r'\bMDO\b': 'MARINE DIESEL OIL',
|
2024-11-10 20:28:47 +09:00
|
|
|
# light fuel oil
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bL\.F\.O\b': 'LIGHT FUEL OIL',
|
|
|
|
r'\bLFO\b': 'LIGHT FUEL OIL',
|
2024-11-10 20:28:47 +09:00
|
|
|
# heavy fuel oil
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bHFO\b': 'HEAVY FUEL OIL',
|
|
|
|
r'\bH\.F\.O\b': 'HEAVY FUEL OIL',
|
2024-11-10 20:28:47 +09:00
|
|
|
# for remaining fuel oil that couldn't be substituted
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bF\.O\b': 'FUEL OIL',
|
|
|
|
r'\bFO\b': 'FUEL OIL',
|
2024-11-10 20:28:47 +09:00
|
|
|
# lubricant
|
|
|
|
r'\bLUB\.\b': 'LUBRICANT',
|
|
|
|
# lubricating oil
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bL\.O\b': 'LUBRICATING OIL',
|
|
|
|
r'\bLO\b': 'LUBRICATING OIL',
|
2024-11-10 20:28:47 +09:00
|
|
|
# lubricating oil pressure
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bLO_PRESS\b': 'LUBRICATING OIL PRESSURE',
|
|
|
|
r'\bLO_PRESSURE\b': 'LUBRICATING OIL PRESSURE',
|
2024-11-10 20:28:47 +09:00
|
|
|
# temperature
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bL\.T\b': 'LOW TEMPERATURE',
|
|
|
|
r'\bLT\b': 'LOW TEMPERATURE',
|
|
|
|
r'\bH\.T\b': 'HIGH TEMPERATURE',
|
|
|
|
r'\bHT\b': 'HIGH TEMPERATURE',
|
2024-11-10 20:28:47 +09:00
|
|
|
# auxiliary boiler
|
|
|
|
# replace these first before replacing AUXILIARY only
|
2024-11-11 20:20:43 +09:00
|
|
|
r'\bAUX\.BOILER\b': 'AUXILIARY BOILER',
|
|
|
|
r'\bAUX\. BOILER\b': 'AUXILIARY BOILER',
|
|
|
|
r'\bAUX BLR\b': 'AUXILIARY BOILER',
|
|
|
|
r'\bAUX\.\b': 'AUXILIARY ',
|
2024-11-10 20:28:47 +09:00
|
|
|
# composite boiler
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bCOMP\. BOILER\b': 'COMPOSITE BOILER',
|
|
|
|
r'\bCOMP\.BOILER\b': 'COMPOSITE BOILER',
|
|
|
|
r'\bCOMP BOILER\b': 'COMPOSITE BOILER',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bWIND\.\b': 'WINDING',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bWINDING\b': 'WINDING',
|
|
|
|
r'\bC\.S\.W\b': 'CSW',
|
|
|
|
r'\bCSW\b': 'CSW',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bVLOT\.\b': 'VOLTAGE',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bVOLTAGE\b': 'VOLTAGE',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bVOLT\.\b': 'VOLTAGE',
|
|
|
|
r'\bFREQ\.\b': 'FREQUENCY',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bFREQUENCY\b': 'FREQUENCY',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bCURR\.\b': 'CURRENT',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bCURRENT\b': 'CURRENT',
|
|
|
|
r'\bTCA\b': 'TURBOCHARGER',
|
|
|
|
r'\bTCB\b': 'TURBOCHARGER',
|
2024-10-30 11:01:57 +09:00
|
|
|
r'\bT/C\b': 'TURBOCHARGER',
|
2024-11-10 20:28:47 +09:00
|
|
|
r'\bT_C\b': 'TURBOCHARGER',
|
|
|
|
r'\bTC(?=\d|\W|$)\b': 'TURBOCHARGER',
|
2024-11-20 15:07:47 +09:00
|
|
|
r'\bTURBOCHAGER\b': 'TURBOCHARGER',
|
|
|
|
r'\bTURBOCHARGER\b': 'TURBOCHARGER',
|
2024-11-10 20:28:47 +09:00
|
|
|
# misc spelling errors
|
|
|
|
r'\bOPERATOIN\b': 'OPERATION',
|
2024-11-11 20:20:43 +09:00
|
|
|
# wrongly attached terms
|
|
|
|
r'BOILERMGO': 'BOILER MGO',
|
2024-11-10 20:28:47 +09:00
|
|
|
# additional standardizing replacement
|
|
|
|
# replace # followed by a number with NO
|
|
|
|
r'#(?=\d)\b': 'NO',
|
|
|
|
r'\bNO\.(?=\d)\b': 'NO',
|
|
|
|
# yes, there was one with two dots - what the hell?
|
|
|
|
r'\bNO\.\.(?=\d)\b': 'NO',
|
|
|
|
r'\bNo\.(?=\d)\b': 'NO',
|
|
|
|
}
|
|
|
|
|
|
|
|
# substitution mapping for units
|
|
|
|
# Abbreviations and their replacements
|
|
|
|
unit_replacement_dict = {
|
|
|
|
r'\b%\b': 'PERCENT',
|
|
|
|
r'\b-\b': '',
|
|
|
|
r'\b- \b': '',
|
|
|
|
# ensure no character after A
|
|
|
|
r'\bA(?!\w|/)': 'CURRENT',
|
|
|
|
r'\bAmp(?!\w|/)': 'CURRENT',
|
|
|
|
r'\bHz\b': 'HERTZ',
|
|
|
|
r'\bKG/CM2\b': 'PRESSURE',
|
|
|
|
r'\bKG/H\b': 'KILOGRAM PER HOUR',
|
|
|
|
r'\bKNm\b': 'RPM',
|
|
|
|
r'\bKW\b': 'POWER',
|
|
|
|
r'\bKg(?!\w|/)': 'MASS',
|
|
|
|
r'\bKw\b': 'POWER',
|
|
|
|
r'\bL(?!\w|/)': 'VOLUME',
|
|
|
|
r'\bMT/h\b': 'METRIC TONNES PER HOUR',
|
|
|
|
r'\bMpa\b': 'PRESSURE',
|
|
|
|
r'\bPF\b': 'POWER FACTOR',
|
|
|
|
r'\bRPM\b': 'RPM',
|
|
|
|
r'\bV(?!\w|/)': 'VOLTAGE',
|
|
|
|
r'\bbar(?!\w|/)': 'PRESSURE',
|
|
|
|
r'\bbarA\b': 'SCAVENGE PRESSURE',
|
|
|
|
r'\bcST\b': 'VISCOSITY',
|
|
|
|
r'\bcSt\b': 'VISCOSITY',
|
|
|
|
r'\bcst\b': 'VISCOSITY',
|
|
|
|
r'\bdeg(?!\w|/|\.)': 'DEGREE',
|
|
|
|
r'\bdeg.C\b': 'TEMPERATURE',
|
|
|
|
r'\bdegC\b': 'TEMPERATURE',
|
|
|
|
r'\bdegree\b': 'DEGREE',
|
|
|
|
r'\bdegreeC\b': 'TEMPERATURE',
|
|
|
|
r'\bhPa\b': 'PRESSURE',
|
|
|
|
r'\bhours\b': 'HOURS',
|
|
|
|
r'\bkN\b': 'THRUST',
|
|
|
|
r'\bkNm\b': 'TORQUE',
|
|
|
|
r'\bkW\b': 'POWER',
|
|
|
|
# ensure that kg is not followed by anything
|
|
|
|
r'\bkg(?!\w|/)': 'FLOW', # somehow in the data its flow
|
|
|
|
r'\bkg/P\b': 'MASS FLOW',
|
|
|
|
r'\bkg/cm2\b': 'PRESSURE',
|
|
|
|
r'\bkg/cm²\b': 'PRESSURE',
|
|
|
|
r'\bkg/h\b': 'MASS FLOW',
|
|
|
|
r'\bkg/hr\b': 'MASS FLOW',
|
|
|
|
r'\bkg/pulse\b': '',
|
|
|
|
r'\bkgf/cm2\b': 'PRESSURE',
|
|
|
|
r'\bkgf/cm²\b': 'PRESSURE',
|
|
|
|
r'\bkgf/㎠\b': 'PRESSURE',
|
|
|
|
r'\bknots\b': 'SPEED',
|
|
|
|
r'\bkw\b': 'POWER',
|
|
|
|
r'\bl/Hr\b': 'VOLUME FLOW',
|
|
|
|
r'\bl/h\b': 'VOLUME FLOW',
|
|
|
|
r'\bl_Hr\b': 'VOLUME FLOW',
|
|
|
|
r'\bl_hr\b': 'VOLUME FLOW',
|
|
|
|
r'\bM\b': 'DRAFT', # for wind draft
|
|
|
|
r'm': 'm', # wind draft and trim - not useful
|
|
|
|
r'\bm/s\b': 'SPEED',
|
|
|
|
r'\bm3\b': 'VOLUME',
|
|
|
|
r'\bmH2O\b': 'DRAFT',
|
|
|
|
r'\bmWC\b': 'DRAFT',
|
|
|
|
r'\bmbar\b': 'PRESSURE',
|
|
|
|
r'\bmg\b': 'ACCELERATION',
|
|
|
|
r'\bmin-¹\b': '', # data too varied
|
|
|
|
r'\bmm\b': '', # data too varied
|
|
|
|
r'\bmmH2O\b': 'WATER DRUM LEVEL',
|
|
|
|
r'\brev\b': 'RPM',
|
|
|
|
r'\brpm\b': 'RPM',
|
|
|
|
r'\bx1000min-¹\b': '',
|
|
|
|
r'\b°C\b': 'TEMPERATURE',
|
|
|
|
r'\bºC\b': 'TEMPERATURE',
|
|
|
|
r'\b℃\b': 'TEMPERATURE'
|
2024-10-30 11:01:57 +09:00
|
|
|
}
|