Closed justinmoon closed 7 years ago
The Natural Language Classifier editor is found under the Watson
menu. Watson -> Natural Language Classifier Editor. I will update the documentation. Let me know if that was the issue.
I was able to find the Natural Language Classifier Editor, but I still can't get the application to run.
The documentation is still pretty confusing. Here are some details:
"expand the classes, and determine which questions about the weather to ask to test the classifier"
Not sure whether I'm actually required to do anything here. Its seems that there are already 2 preconfigured "classes", each with many example phrases. It seems like it's already configured?
The documentation doesn't mention anything about the "train" button that is visible in the previous screenshot. I'm assuming this needs to be clicked before the NLC service will work?
If I do click that "train" button and wait until the "instance" has the "Status: Available" attribute and then run, I get an error:
ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at /Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:268) UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7153) UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7133) IBM.Watson.DeveloperCloud.Editor.NaturalLanguageClassifierEditor.OnGUI () (at Assets/Watson/Scripts/Editor/NaturalLanguageClassifierEditor.cs:267) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Any idea what might be going wrong here?
The Natural Language Classifier Editor edits a json file on your local filesystem. You define intents (classes) and phrases to trigger the intent. In this case the two classes are temperature
and conditions
.
This json file is used to train your particular Natural Classifier service instance. You simply need to click the train
button and it will create a classifier associated with your service instance. You must wait for the status of the classifier to change from training
to available
to be able to use it.
After training is complete you need to speak into the microphone ("What's the weather like?"). The MicrophoneWidget
will convert microphone audio into AudioData
and pass it to the SpeechToTextWidget
. The SpeechToTextWidget
then passes the result text to the NaturalLanguageClassifierWidget
. The NaturalLanguageClassifierWidget
passes the returned intent to the ClassDisplayWIdget
displaying the intent and the confidence.
Using this you would be able to create an application that will execute logic based on the received intent.
@superquest Is it working?
No, it is not.
Have you asked the application a question? Say "is it raining today?"
Yes I did, but nothing happened.
In an hour I will try again and update you.
On Wed, Feb 15, 2017 at 10:12 AM, Ajiemar Santiago <notifications@github.com
wrote:
Have you asked the application a question? Say "is it raining today?"
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/watson-developer-cloud/unity-sdk/issues/210#issuecomment-279897666, or mute the thread https://github.com/notifications/unsubscribe-auth/AEIoBcP2BFBpwj5PX1n5zENDrioFueJ1ks5rcl8IgaJpZM4L60G8 .
Any update on this? I'd like to help find the issue if possible.
I tried it again from scratch, and I'm getting exactly the same error I described 9 days ago.
ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at /Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:268) UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7153) UnityEditor.EditorGUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:7133) IBM.Watson.DeveloperCloud.Editor.NaturalLanguageClassifierEditor.OnGUI () (at Assets/Watson/Scripts/Editor/NaturalLanguageClassifierEditor.cs:267) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
That error is just a front end error coming from the NLC editor window and shouldn't stop the service from working. Close the Natural Language Classifier editor window after you train your instance. Be sure your classifier instance is "Available" and when you click play check the connections of the microphone widget, speech to text widget, natural language classifier widget and class display widget are working by looking at each game object's properties.
I'm trying to run the Developing a basic application in one minute demo.
Steps to Reproduce
Assets
and rename folder toWatson
.Expected behavior
I would be able to record my voice and something interesting would happen! Or at least, there would be an error in the console — but it's empty.
png)
Actual behavior
The UI is frozen with this image:
Unity SDK version
SDK v0.13.0 Unity 5.5.1f1 OSX 10.11.6.
Other
The directions "Ensure that you prepare the test data before you complete the the following steps". I have no idea what is meant by this. Perhaps this is also part of the problem.