# Generated by Django 2.2.24 on 2021-09-15 14:40

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('embedding', '0015_embedding_snowball_language'),
        ('core', '0017_name_and_uaa_changes'),
    ]

    operations = [
        migrations.CreateModel(
            name='RakunExtractor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(max_length=1000)),
                ('distance_method', models.CharField(default='editdistance', max_length=1000)),
                ('distance_threshold', models.FloatField(default=2.0, null=True, validators=[django.core.validators.MinValueValidator(0.0)])),
                ('num_keywords', models.IntegerField(default=25, null=True)),
                ('pair_diff_length', models.IntegerField(default=2, null=True)),
                ('stopwords', models.TextField(default='[]', null=True)),
                ('bigram_count_threshold', models.IntegerField(default=2, null=True)),
                ('min_tokens', models.IntegerField(default=1, null=True)),
                ('max_tokens', models.IntegerField(default=1, null=True)),
                ('max_similar', models.IntegerField(default=3, null=True)),
                ('max_occurrence', models.IntegerField(default=3, null=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('fasttext_embedding', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='embedding.Embedding')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Project')),
                ('task', models.OneToOneField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Task')),
            ],
        ),
        migrations.AddConstraint(
            model_name='rakunextractor',
            constraint=models.CheckConstraint(check=models.Q(distance_threshold__gte=0.0), name='distance_threshold_min'),
        ),
    ]
