def create_trip(tokens, predicted_labels):
    destination_tokens = []
    origin_tokens = []
    price = -1
    for token, label in zip(tokens, predicted_labels):
        if label == 'o':
            origin_tokens.append(token)
        elif label == 'd':
            destination_tokens.append(token)
        elif label == 'p':
            try:
                price = float(token.replace(',', ''))
            except ValueError:
                pass
    return {'origin': ' '.join(origin_tokens), 'destination': ' '.join(
        destination_tokens), 'price': price}

46a99ee5eb9e301204726922198d61a0fa758d0c
<mask token>

def create_trip(tokens, predicted_labels):
    destination_tokens = []
    origin_tokens = []
    price = -1
    for token, label in zip(tokens, predicted_labels):
        if label == 'o':
            origin_tokens.append(token)
        elif label == 'd':
            destination_tokens.append(token)
        elif label == 'p':
            try:
                price = float(token.replace(',', ''))
            except ValueError:
                pass
    return {'origin': ' '.join(origin_tokens), 'destination': ' '.join(
        destination_tokens), 'price': price}
