def rank(value: str) -> int:
    """ Convert GENERIC_ORDER NLU concept to an index value.
        The GENERIC_ORDER concept return a string that can be "max", "min", "succ", "prec", "0", "1", ...<br>
            "max" -> -1<br>
            "min" -> 0<br>
            "1" -> 0<br>
            "2" -> 1<br>
            ...<br>
        The "succ" value is not handled and should not be used in the intent samples.<br>
        Please see https://developer.nuance.com/mix/documentation/nlu/#nuance_generic_order

    :param value:   GENERIC_ORDER concept value.
    :return: index
    """
    _ = {
        'min': 0,
        'max': -1,
        'prec': -2,
    }
    try:
        return _[value]
    except KeyError:
        return int(value) - 1