<commit_before>from rest_framework import serializers as ser

from api.base.serializers import JSONAPISerializer


class TaxonomySerializer(JSONAPISerializer):
    filterable_fields = frozenset([
        'text',
        'parent_ids'
    ])

    type = ser.CharField(max_length=200)
    text = ser.CharField(max_length=200)
    parent_ids = ser.ListField()
    id = ser.CharField(max_length=200)

    def get_absolute_url(self, obj):
        return obj.get_absolute_url()

    class Meta:
        type_ = 'taxonomies'<commit_msg>allow id to be a filter :<commit_after>from rest_framework import serializers as ser

from api.base.serializers import JSONAPISerializer


class TaxonomySerializer(JSONAPISerializer):
    filterable_fields = frozenset([
        'text',
        'parent_ids',
        'id'
    ])

    type = ser.CharField(max_length=200)
    text = ser.CharField(max_length=200)
    parent_ids = ser.ListField()
    id = ser.CharField(max_length=200)

    def get_absolute_url(self, obj):
        return obj.get_absolute_url()

    class Meta:
        type_ = 'taxonomies'
{'fraction_non_alphanumeric': 0.09242144177449169, 'fraction_numerical': 0.0166358595194085, 'mean_word_length': 3.3669354838709675, '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': '6933178', 'n_tokens_mistral': 364, 'n_tokens_neox': 343, 'n_words': 72}