<commit_before># encoding: utf-8
from django import forms
from ielex.forms import ChooseLanguageListField, ChooseMeaningListField
from ielex.lexicon.models import LanguageList, MeaningList, RELIABILITY_CHOICES

class ChooseOutputBaseForm(forms.Form):
    language_list = ChooseLanguageListField(
            queryset=LanguageList.objects.all(),
            empty_label=None,
            widget=forms.Select())
    meaning_list = ChooseMeaningListField(
            queryset=MeaningList.objects.all(),
            empty_label=None,
            widget=forms.Select())

class ChooseNexusOutputForm(ChooseOutputBaseForm):
    DIALECT = (("BP", "BayesPhylogenies"),
            ("NN", "NeighborNet"),
            ("MB", "MrBayes"))
    dialect = forms.ChoiceField(choices=DIALECT,
            widget=forms.RadioSelect,
            label="NEXUS dialect",
            help_text=u"""BayesPhylogenies uses a ‘data’ block rather than ‘taxa’
            and ‘character’ blocks; NeighborNet and MrBayes require slightly
            different ‘format’ specification""")
    reliability = forms.MultipleChoiceField(choices=RELIABILITY_CHOICES,
            widget=forms.CheckboxSelectMultiple,
            required=False,
            label="Exclude ratings")
    ascertainment_marker = forms.BooleanField(required=False,
            label=u"Ascertainment bias correction marker",
            help_text="""Sets of cognates referring to the same meaning are
            marked by an initial all-zero column; column indexes  of character
            sets are listed in an ‘assumptions’ block""")

class DumpSnapshotForm(ChooseOutputBaseForm):
    pass<commit_msg>pep8 ielex/lexicon/forms.py<commit_after># encoding: utf-8
from django import forms
from ielex.forms import ChooseLanguageListField, ChooseMeaningListField
from ielex.lexicon.models import LanguageList, MeaningList, RELIABILITY_CHOICES


class ChooseOutputBaseForm(forms.Form):
    language_list = ChooseLanguageListField(
            queryset=LanguageList.objects.all(),
            empty_label=None,
            widget=forms.Select())
    meaning_list = ChooseMeaningListField(
            queryset=MeaningList.objects.all(),
            empty_label=None,
            widget=forms.Select())


class ChooseNexusOutputForm(ChooseOutputBaseForm):
    DIALECT = (("BP", "BayesPhylogenies"),
               ("NN", "NeighborNet"),
               ("MB", "MrBayes"))
    dialect = forms.ChoiceField(
        choices=DIALECT,
        widget=forms.RadioSelect,
        label="NEXUS dialect",
        help_text=u"""BayesPhylogenies uses a ‘data’ block rather than ‘taxa’
        and ‘character’ blocks; NeighborNet and MrBayes require slightly
        different ‘format’ specification""")
    reliability = forms.MultipleChoiceField(
        choices=RELIABILITY_CHOICES,
        widget=forms.CheckboxSelectMultiple,
        required=False,
        label="Exclude ratings")
    ascertainment_marker = forms.BooleanField(
        required=False,
        label=u"Ascertainment bias correction marker",
        help_text="""Sets of cognates referring to the same meaning are
        marked by an initial all-zero column; column indexes  of character
        sets are listed in an ‘assumptions’ block""")


class DumpSnapshotForm(ChooseOutputBaseForm):
    pass
{'fraction_non_alphanumeric': 0.08718104495747266, 'fraction_numerical': 0.0009113001215066828, 'mean_word_length': 3.173637515842839, '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': '5358255', 'n_tokens_mistral': 899, 'n_tokens_neox': 877, 'n_words': 211}