diff --git a/dialogy/plugins/text/duckling_plugin/__init__.py b/dialogy/plugins/text/duckling_plugin/__init__.py index 5b09064c..b1a6c5ba 100644 --- a/dialogy/plugins/text/duckling_plugin/__init__.py +++ b/dialogy/plugins/text/duckling_plugin/__init__.py @@ -597,11 +597,12 @@ def __create_req_body( :rtype: Dict[str, Any] """ dimensions = self.dimensions - self.activate_latent_entities = use_latent or self.activate_latent_entities + activate_latent_entities = use_latent + activate_latent_entities = ( - self.activate_latent_entities - if isinstance(self.activate_latent_entities, bool) - else self.activate_latent_entities() + activate_latent_entities + if isinstance(activate_latent_entities, bool) + else activate_latent_entities() ) payload = { diff --git a/docs/.buildinfo b/docs/.buildinfo index 63da9ce5..52639e68 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: c49aa7e37a5eef9d9b5d7193dbe5cf54 +config: 7d590465bce22dcff23310e826e335c2 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_modules/dialogy/base/entity_extractor.html b/docs/_modules/dialogy/base/entity_extractor.html index 7fed3972..f1803cfc 100644 --- a/docs/_modules/dialogy/base/entity_extractor.html +++ b/docs/_modules/dialogy/base/entity_extractor.html @@ -5,7 +5,7 @@ - dialogy.base.entity_extractor - dialogy 0.9.1 documentation + dialogy.base.entity_extractor - dialogy 0.9.4 documentation @@ -124,7 +124,7 @@
-
dialogy 0.9.1 documentation
+
dialogy 0.9.4 documentation
@@ -147,7 +147,7 @@ diff --git a/docs/_modules/dialogy/cli.html b/docs/_modules/dialogy/cli.html index 5fab0739..43680627 100644 --- a/docs/_modules/dialogy/cli.html +++ b/docs/_modules/dialogy/cli.html @@ -5,7 +5,7 @@ - dialogy.cli - dialogy 0.9.1 documentation + dialogy.cli - dialogy 0.9.4 documentation @@ -124,7 +124,7 @@
-
dialogy 0.9.1 documentation
+
dialogy 0.9.4 documentation
@@ -147,7 +147,7 @@ @@ -340,5 +402,7 @@

Source code for dialogy.plugins.text.slot_filler.rule_slot_filler

+ + \ No newline at end of file diff --git a/docs/_modules/dialogy/types/entity/base_entity.html b/docs/_modules/dialogy/types/entity/base_entity.html index d11e0d11..bcf46bc1 100644 --- a/docs/_modules/dialogy/types/entity/base_entity.html +++ b/docs/_modules/dialogy/types/entity/base_entity.html @@ -5,7 +5,7 @@ - dialogy.types.entity.base_entity - dialogy 0.9.3 documentation + dialogy.types.entity.base_entity - dialogy 0.9.4 documentation @@ -124,7 +124,7 @@
@@ -147,7 +147,7 @@ @@ -491,5 +435,7 @@

Source code for dialogy.types.intent

     
     
     
+    
+    
     
 
\ No newline at end of file
diff --git a/docs/_modules/dialogy/types/slots.html b/docs/_modules/dialogy/types/slots.html
index e42c6bd8..ee337cb7 100644
--- a/docs/_modules/dialogy/types/slots.html
+++ b/docs/_modules/dialogy/types/slots.html
@@ -5,7 +5,7 @@
     
 
     
-        dialogy.types.slots - dialogy 0.9.1 documentation
+        dialogy.types.slots - dialogy 0.9.4 documentation
       
     
     
@@ -124,7 +124,7 @@
       
     
@@ -147,7 +147,7 @@ @@ -327,5 +342,7 @@

Source code for dialogy.utils.misc

     
     
     
+    
+    
     
 
\ No newline at end of file
diff --git a/docs/_modules/dialogy/utils/naive_lang_detect.html b/docs/_modules/dialogy/utils/naive_lang_detect.html
index 1745353e..43218f1d 100644
--- a/docs/_modules/dialogy/utils/naive_lang_detect.html
+++ b/docs/_modules/dialogy/utils/naive_lang_detect.html
@@ -5,7 +5,7 @@
     
 
     
-        dialogy.utils.naive_lang_detect - dialogy 0.9.1 documentation
+        dialogy.utils.naive_lang_detect - dialogy 0.9.4 documentation
       
     
     
@@ -124,7 +124,7 @@
       
     
@@ -147,7 +147,7 @@
@@ -148,7 +148,7 @@
@@ -146,7 +146,7 @@
@@ -145,7 +145,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -371,32 +326,8 @@

dialogy.types.intent package -
-name: str
-

The description of an intent separated by ‘_’

-

-
-
-parsers: List[str]
-

Contains a list of plugins that have created, updated this Intent.

-
-
-
-score: float
-

A positive real number that represents confidence of this intent -being the meaning of an utterance. Higher is better.

-

Should be a value between 0 and 1.

-
-
-
-slots: Dict[str, dialogy.types.slots.Slot]
-

Placeholders for entities that are relevant to this intent. -More details are available in the doc for slots.

-
- @@ -451,10 +382,7 @@

dialogy.types.intent package diff --git a/docs/source/dialogy.types.plugin.html b/docs/source/dialogy.types.plugin.html index 0f523f17..943d0686 100644 --- a/docs/source/dialogy.types.plugin.html +++ b/docs/source/dialogy.types.plugin.html @@ -6,7 +6,7 @@ - dialogy.types.plugin package - dialogy 0.9.3 documentation + dialogy.types.plugin package - dialogy 0.9.4 documentation @@ -125,7 +125,7 @@

@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@
@@ -148,7 +148,7 @@ @@ -692,33 +635,22 @@

Submodulesnormalize(maybe_utterance, key='transcript')[source]

Adapt various non-standard ASR alternative forms.

The output will be a list of strings since models will expect that.

-
In [1]: In [1]: from dialogy.utils.normalize_utterance import normalize
-   ...: In [2]: # A popular case
-   ...: In [3]: normalize([[{"transcript": "this"}, {"transcript": "works"}]])
-   ...: 
-Out[1]: ['this', 'works']
-
-
-
In [2]: In [3]: # A case with multiple utterances
-   ...: In [4]: normalize([
-   ...:             [{"transcript": "hello hello?", "transcript": "yellow yellow?"}],
-   ...:             [{"transcript": "I wanted to check"}],
-   ...:             [{"transcript": "if you have space for us?"}]
-   ...:         ])
-   ...: 
-Out[2]: ['yellow yellow? I wanted to check if you have space for us?']
-
-
-
In [3]: In [5]: normalize([{"transcript": "I wanted to know umm hello?"}])
-Out[3]: ['I wanted to know umm hello?']
-
-
-
In [4]: In [6]: normalize(["I wanted to know umm hello?"])
-Out[4]: ['I wanted to know umm hello?']
-
-
-
In [5]: In [7]: normalize("I wanted to know umm hello?")
-Out[5]: ['I wanted to know umm hello?']
+
In [1]: from dialogy.utils.normalize_utterance import normalize
+
+In [2]: normalize([[{"transcript": "hi"}]])
+Out[2]: ['hi']
+
+In [3]: normalize([[{"transcript": "hello"}], [{"transcript": "world"}]])
+Out[3]: ['hello world']
+
+In [4]: normalize([{"transcript": "I wanted to know umm hello?"}])
+Out[4]: ['i wanted to know umm hello?']
+
+In [5]: normalize(["I wanted to know umm hello?"])
+Out[5]: ['i wanted to know umm hello?']
+
+In [6]: normalize("I wanted to know umm hello?")
+Out[6]: ['i wanted to know umm hello?']
 
@@ -800,7 +732,7 @@

Submodulesdialogy.utils package

@@ -148,7 +148,7 @@
-input: Optional[dialogy.base.input.Input]
-

Represents the SLU API request object. A few nested properties and intermediates are flattened out -for readability.

-
+input: Dict[str, Any] +
json()[source]
@@ -382,49 +335,37 @@

How does it do it?
lock: _thread.allocate_lock
-

A workflow isn’t thread-safe by itself. We need locks -to prevent race conditions.

-

+
-output: Optional[dialogy.base.output.Output]
-

Represents the SLU API response object.

-
-
-
-plugins
-

List of plugins.

-
+output: Dict[str, Any] +
run(input_)[source]

Get final results from the workflow.

The current workflow exhibits the following simple procedure: pre-processing -> inference -> post-processing.

+
+
Args:

input_ (Any): This function receives any arbitrary input. Subclasses may enforce +a stronger check.

+
+
Returns:

(Any): This function can return any arbitrary value. Subclasses may enforce a stronger check.

+
+
Return type
-

Tuple[Dict[str, Any], Dict[str, Any]]

+

Any

-
-set(path, value, replace=False)[source]
-

Set attribute path with value.

-

This method (re)-sets the input or output object without losing information -from previous instances.

+
+set_io()[source]
+

Use this method to keep workflow-io in the same format as expected.

-
Parameters
-
    -
  • path (str) – A ‘.’ separated attribute path.

  • -
  • value (Any) – A value to set.

  • -
-
-
Returns
-

This instance

-
Return type
-

Workflow

+

None

@@ -440,7 +381,7 @@

How does it do it?

training_data (pd.DataFrame) – [description]

Return type
-

Workflow

+

None

@@ -506,8 +447,8 @@

How does it do it?dialogy.workflow package

@@ -148,7 +148,7 @@