From 6c9258e1e07f090371d6da74fbeeda327a8caed2 Mon Sep 17 00:00:00 2001 From: Norman Rzepka Date: Wed, 26 Sep 2018 13:58:24 +0200 Subject: [PATCH 1/6] Update persistor.py --- rasa_nlu/persistor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rasa_nlu/persistor.py b/rasa_nlu/persistor.py index b55b0082651b..374621af57dc 100644 --- a/rasa_nlu/persistor.py +++ b/rasa_nlu/persistor.py @@ -9,8 +9,6 @@ import shutil import tarfile -import boto3 -import botocore from builtins import object from typing import Optional, Tuple, List, Text @@ -143,6 +141,7 @@ class AWSPersistor(Persistor): def __init__(self, bucket_name, endpoint_url=None): # type: (Text, Optional[Text]) -> None + import boto3 super(AWSPersistor, self).__init__() self.s3 = boto3.resource('s3', endpoint_url=endpoint_url) self._ensure_bucket_exists(bucket_name) @@ -173,6 +172,8 @@ def list_projects(self): return [] def _ensure_bucket_exists(self, bucket_name): + import boto3 + import botocore bucket_config = { 'LocationConstraint': boto3.DEFAULT_SESSION.region_name} try: From d676be1f86b5106512a8269205def11f0ac31d29 Mon Sep 17 00:00:00 2001 From: Norman Rzepka Date: Wed, 26 Sep 2018 13:59:25 +0200 Subject: [PATCH 2/6] Update requirements_bare.txt --- alt_requirements/requirements_bare.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/alt_requirements/requirements_bare.txt b/alt_requirements/requirements_bare.txt index 01407415f144..e3b494e14d98 100644 --- a/alt_requirements/requirements_bare.txt +++ b/alt_requirements/requirements_bare.txt @@ -1,7 +1,6 @@ gevent==1.2.2 klein==17.10.0 hyperlink==17.3.1 -boto3==1.5.20 typing==3.6.2 future==0.16.0 six==1.11.0 From 09a677a7f6cd9ec998807eba9f04a094f566e204 Mon Sep 17 00:00:00 2001 From: Norman Rzepka Date: Thu, 27 Sep 2018 11:27:49 +0200 Subject: [PATCH 3/6] import boto3 explicitly in tests --- tests/base/test_persistor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/base/test_persistor.py b/tests/base/test_persistor.py index 00e385df5b3c..e262211f724c 100644 --- a/tests/base/test_persistor.py +++ b/tests/base/test_persistor.py @@ -7,6 +7,8 @@ import mock import pytest +import boto3 +import botocore from moto import mock_s3 from tests import utilities From a4b500e5345c443f7ef3ce198417f51da2e80ee3 Mon Sep 17 00:00:00 2001 From: Justina Petraityte Date: Fri, 28 Sep 2018 15:45:54 +0200 Subject: [PATCH 4/6] language support --- docs/faq.rst | 13 +++++++++++++ docs/index.rst | 2 +- docs/languages.rst | 11 +++++++---- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index c36158c55e86..736cbe1dbd51 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -4,6 +4,19 @@ Frequently Asked Questions ========================== +Which languages does the Rasa NLU support? +------------------------------------------ +Rasa NLU can be used to understand any language, but some backends are restricted to specific languages. + +The ``tensorflow_embedding`` pipeline can be used for any language, because +it trains custom word embeddings for your domain using the data you provide in the NLU training examples. + +Other backends use pre-trained word vectors and therefore are restricted to languages which have pre-trained +vectors available. + +You can read more about the Rasa NLU supported languages in :ref:`section_languages`. + + How many training examples do I need? ------------------------------------- Unfortunately, the answer is *it depends*. diff --git a/docs/index.rst b/docs/index.rst index 7635bd3e1b1e..56cf45e90a74 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -55,8 +55,8 @@ You can see an independent benchmark comparing Rasa NLU to closed source alterna :hidden: choosing_pipeline - entities languages + entities evaluation fallback faq diff --git a/docs/languages.rst b/docs/languages.rst index ecb55c526d09..c6563420f88a 100644 --- a/docs/languages.rst +++ b/docs/languages.rst @@ -4,11 +4,14 @@ Language Support ================ -Rasa NLU can be used to understand any language, but some backends are -restricted to specific languages. +**You can use Rasa NLU to build assistants in any language you want!** The +``tensorflow_embedding`` pipeline can be used for **any language** because +it trains custom word embeddings for your domain. Read more about this +pipeline in :ref:`choosing_pipeline`. + +Other backends have some restrictions and support those languages +which have pre-trained word vectors available. -The ``tensorflow_embedding`` pipeline can be used for any language, because -it trains custom word embeddings for your domain. Pre-trained Word Vectors ------------------------ From 7f5f5e1956657edb1072fee43237069061982902 Mon Sep 17 00:00:00 2001 From: Justina Petraityte Date: Mon, 1 Oct 2018 14:48:55 +0200 Subject: [PATCH 5/6] update on language support --- docs/faq.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 736cbe1dbd51..cd581f59ce94 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -6,10 +6,10 @@ Frequently Asked Questions Which languages does the Rasa NLU support? ------------------------------------------ -Rasa NLU can be used to understand any language, but some backends are restricted to specific languages. +Rasa NLU can be used to understand any language that can be tokenized (on whitespace or using a custom tokenizer), +but some backends are restricted to specific languages. -The ``tensorflow_embedding`` pipeline can be used for any language, because -it trains custom word embeddings for your domain using the data you provide in the NLU training examples. +The ``tensorflow_embedding`` pipeline can be used for any language because it trains custom word embeddings for your domain using the data you provide in the NLU training examples. Other backends use pre-trained word vectors and therefore are restricted to languages which have pre-trained vectors available. From 5f931c9b860c2d4833930e411032b63b2cecf0dc Mon Sep 17 00:00:00 2001 From: Norman Rzepka Date: Tue, 2 Oct 2018 16:54:09 +0200 Subject: [PATCH 6/6] changelog --- CHANGELOG.rst | 1 + alt_requirements/requirements_dev.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 993298ba6725..91747023f3de 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,7 @@ Changed ------- - Training data is now validated after loading from files in ``loading.py`` instead of on initialisation of ``TrainingData`` object +- ``boto3`` is now loaded lazily in ``AWSPersistor`` and is not included in ``requirements_bare.txt`` anymore Removed ------- diff --git a/alt_requirements/requirements_dev.txt b/alt_requirements/requirements_dev.txt index 16480ec315e9..667b14c534a7 100644 --- a/alt_requirements/requirements_dev.txt +++ b/alt_requirements/requirements_dev.txt @@ -16,3 +16,4 @@ httpretty==0.9.5 # other google-cloud-storage==1.7.0 azure-storage-blob==1.0.0 +boto3==1.5.20