<commit_before>import os

from astropy.stats import mad_std as mad

from astroNN.config import MAGIC_NUMBER
from astroNN.models.NeuralNetMaster import NeuralNetMaster


def target_name_conversion(targetname):
    """
    NAME:
        target_name_conversion
    PURPOSE:
        to convert targetname to string used to plot graph
    INPUT:
        targetname (string)
    OUTPUT:
        converted name (string)
    HISTORY:
        2017-Nov-25 - Written - <NAME> (University of Toronto)
    """
    if targetname == 'C1':
        fullname = 'CI'
    elif len(targetname) < 3:
        fullname = f'[{targetname}/H]'
    elif targetname == 'teff':
        fullname = '$T_{\mathrm{eff}}$'
    elif targetname == 'alpha':
        fullname = '[Alpha/M]'
    elif targetname == 'logg':
        fullname = '[Log(g)]'
    elif targetname == 'Ti2':
        fullname = '[TiII/H]'
    else:
        fullname = targetname
    return fullname


def aspcap_windows_url_correction(targetname):
    """
    NAME:
        target_name_conversion
    PURPOSE:
        to convert targetname to string used to get ASPCAP windows url
    INPUT:
        targetname (string)
    OUTPUT:
        converted name (string)
    HISTORY:
        2017-Nov-25 - Written - <NAME> (University of Toronto)
    """
    if targetname == 'C1':
        fullname = 'CI'
    elif len(targetname) < 3:
        fullname = f'{targetname}'
    elif targetname == 'teff':
        fullname = 'Surface Temperature'
    elif targetname == 'alpha':
        fullname = '[Alpha/M]'
    elif targetname == 'logg':
        fullname = '[Log(g)]'<commit_msg>add support for full targetname conversion<commit_after>import os

from astropy.stats import mad_std as mad

from astroNN.config import MAGIC_NUMBER
from astroNN.models.NeuralNetMaster import NeuralNetMaster


def target_name_conversion(targetname):
    """
    NAME:
        target_name_conversion
    PURPOSE:
        to convert targetname to string used to plot graph
    INPUT:
        targetname (string)
    OUTPUT:
        converted name (string)
    HISTORY:
        2017-Nov-25 - Written - <NAME> (University of Toronto)
    """
    targetname.replace("/H]", "")
    targetname.replace("/Fe]", "")
    targetname.replace("[", "")
    if targetname == 'C1':
        fullname = 'CI'
    elif len(targetname) < 3:
        fullname = f'[{targetname}/H]'
    elif targetname == 'teff':
        fullname = '$T_{\mathrm{eff}}$'
    elif targetname == 'alpha':
        fullname = '[Alpha/M]'
    elif targetname == 'logg':
        fullname = '[Log(g)]'
    elif targetname == 'Ti2':
        fullname = '[TiII/H]'
    else:
        fullname = targetname
    return fullname


def aspcap_windows_url_correction(targetname):
    """
    NAME:
        target_name_conversion
    PURPOSE:
        to convert targetname to string used to get ASPCAP windows url
    INPUT:
        targetname (string)
    OUTPUT:
        converted name (string)
    HISTORY:
        2017-Nov-25 - Written - <NAME> (University of Toronto)
    """
    targetname.replace("/H]", "")
    targetname.replace("/Fe]", "")
    targetname.replace("[", "")
    if targetname == 'C1':
        fullname = 'CI'
    elif len(targetname) < 3:
        fullname = f'{targetname}'
    elif targetname == 'teff':
        fullname = 'Surface Temperature'
    elif targetname == 'alpha':
        fullname = '[Alpha/M]'
    elif targetname == 'logg':
        fullname = '[Log(g)]'
{'fraction_non_alphanumeric': 0.12038383250945042, 'fraction_numerical': 0.009886594940389648, 'mean_word_length': 2.4538152610441766, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4708009', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1042, 'n_words': 280}