<commit_before>from superdesk.resource import Resource
from superdesk.services import BaseService
from eve.utils import ParsedRequest
from settings import SUPPORTED_LANGUAGES


class LanguagesResource(Resource):

    schema = {
        'language_code': {
            'type': 'string',
            'allowed': SUPPORTED_LANGUAGES['languages']
        }
    }

    datasource = {
        'default_sort': [('_updated', -1)]
    }

    RESOURCE_METHODS = ['GET', 'POST']
    ITEM_METHODS = ['GET', 'POST', 'DELETE']
<commit_msg>Languages: language_name added to model and alphabetical order set<commit_after>from superdesk.resource import Resource
from superdesk.services import BaseService
from eve.utils import ParsedRequest
from settings import SUPPORTED_LANGUAGES


class LanguagesResource(Resource):

    schema = {
        'language_code': {
            'type': 'string',
            'allowed': SUPPORTED_LANGUAGES['languages']
        },
        'language_name': {
            'type': 'string'
        }
    }

    datasource = {
        'default_sort': [('language_name', 1)]
    }

    RESOURCE_METHODS = ['GET', 'POST']
    ITEM_METHODS = ['GET', 'POST', 'DELETE']

{'fraction_non_alphanumeric': 0.1170940170940171, 'fraction_numerical': 0.0017094017094017094, 'mean_word_length': 2.9965870307167237, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5201920', 'n_tokens_mistral': 367, 'n_tokens_neox': 340, 'n_words': 81}