Skip to content

Commit

Permalink
Improve data imports
Browse files Browse the repository at this point in the history
Signed-off-by: ArthurTemporim <arthurrtl@gmail.com>
  • Loading branch information
arthurTemporim committed Jul 4, 2019
1 parent 421e888 commit e84c11c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rasa/core/domain.py
Expand Up @@ -6,7 +6,6 @@
from typing import Any, Dict, List, Optional, Text, Tuple, Union, Set

import rasa.utils.io
from rasa import data
from rasa.cli.utils import bcolors
from rasa.constants import DOMAIN_SCHEMA_FILE
from rasa.core import utils
Expand Down Expand Up @@ -131,6 +130,7 @@ def from_directory(
cls, path: Text, skill_imports: Optional[SkillSelector] = None
) -> "Domain":
"""Loads and merges multiple domain files recursively from a directory tree."""
from rasa import data

domain = Domain.empty()
skill_imports = skill_imports or SkillSelector.all_skills()
Expand Down
3 changes: 1 addition & 2 deletions rasa/data.py
Expand Up @@ -6,6 +6,7 @@
import typing
import re
from typing import Tuple, List, Text, Set, Union, Optional
from rasa.nlu.training_data import loading

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -155,8 +156,6 @@ def _is_valid_filetype(path: Text) -> bool:

def _is_nlu_file(file_path: Text) -> bool:
"""Checks whether a file is an NLU file."""
from rasa.nlu.training_data import loading

return loading.guess_format(file_path) != loading.UNK


Expand Down

0 comments on commit e84c11c

Please sign in to comment.