Skip to content

Commit

Permalink
Updated HelpText Analyze Char
Browse files Browse the repository at this point in the history
  • Loading branch information
dyohan9 committed Nov 9, 2019
1 parent 075cf15 commit 2f5ae11
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
14 changes: 9 additions & 5 deletions bothub/api/v2/repository/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,19 @@ class Meta:
languages_warnings = serializers.ReadOnlyField(style={"show": False})
use_language_model_featurizer = serializers.ReadOnlyField(style={"show": False})

language = serializers.ChoiceField(
LANGUAGE_CHOICES, label=_("Language")
)
language = serializers.ChoiceField(LANGUAGE_CHOICES, label=_("Language"))
owner = serializers.PrimaryKeyRelatedField(read_only=True, style={"show": False})
owner__nickname = serializers.SlugRelatedField(
source="owner", slug_field="nickname", read_only=True, style={"show": False}
)
intents = serializers.SerializerMethodField(style={"show": False})
intents_list = serializers.SerializerMethodField(style={"show": False})
categories_list = serializers.SlugRelatedField(
source="categories", slug_field="name", many=True, read_only=True, style={"show": False}
source="categories",
slug_field="name",
many=True,
read_only=True,
style={"show": False},
)
categories = serializers.ManyRelatedField(
child_relation=serializers.PrimaryKeyRelatedField(
Expand All @@ -249,7 +251,9 @@ class Meta:
absolute_url = serializers.SerializerMethodField(style={"show": False})
authorization = serializers.SerializerMethodField(style={"show": False})
request_authorization = serializers.SerializerMethodField(style={"show": False})
available_request_authorization = serializers.SerializerMethodField(style={"show": False})
available_request_authorization = serializers.SerializerMethodField(
style={"show": False}
)
entities = serializers.SerializerMethodField(style={"show": False})
nlp_server = serializers.SerializerMethodField(style={"show": False})

Expand Down
10 changes: 9 additions & 1 deletion bothub/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,15 @@ class Meta:
),
default=False,
)
use_analyze_char = models.BooleanField(_("Use analyze char"), default=False)
use_analyze_char = models.BooleanField(
_("Use analyze char"),
help_text=_(
"When selected, the algorithm will learn the patterns of "
+ "individual characters instead of whole words. "
+ "This approach works better for some languages."
),
default=False,
)
categories = models.ManyToManyField(
RepositoryCategory, help_text=CATEGORIES_HELP_TEXT
)
Expand Down

0 comments on commit 2f5ae11

Please sign in to comment.