mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
723 B
14 lines
723 B
from django_filters.rest_framework import FilterSet, BooleanFilter
|
|
from .models import Document
|
|
|
|
|
|
class DocumentFilter(FilterSet):
|
|
seq_annotations__isnull = BooleanFilter(field_name='seq_annotations', lookup_expr='isnull')
|
|
doc_annotations__isnull = BooleanFilter(field_name='doc_annotations', lookup_expr='isnull')
|
|
seq2seq_annotations__isnull = BooleanFilter(field_name='seq2seq_annotations', lookup_expr='isnull')
|
|
|
|
class Meta:
|
|
model = Document
|
|
fields = ('project', 'text', 'meta', 'created_at', 'updated_at',
|
|
'doc_annotations__label__id', 'seq_annotations__label__id',
|
|
'doc_annotations__isnull', 'seq_annotations__isnull', 'seq2seq_annotations__isnull')
|