Skip to content

Commit a815185

Browse files
committed
merge in develop
2 parents 3998ae9 + 8f5a20a commit a815185

33 files changed

+898
-51
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ _2016-05-28_
99
* New: Added Conversation abstraction
1010
* New: Added Visual Recognition v3 abstraction
1111
* Fix: Creating test project dynamically for Travis CL integration
12+
* Fix: Refactored Language Translation to Language Translator
1213

1314
## Version 0.3.0
1415

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
using UnityEngine;
19+
using System.Collections;
20+
using IBM.Watson.DeveloperCloud.Services.Conversation.v1;
21+
22+
public class ExampleConversation : MonoBehaviour
23+
{
24+
private Conversation m_Conversation = new Conversation();
25+
private string m_WorkspaceID = "car_demo_1";
26+
private string m_Input = "Can you unlock the door?";
27+
28+
void Start () {
29+
Debug.Log("User: " + m_Input);
30+
m_Conversation.Message(m_WorkspaceID, m_Input, OnMessage);
31+
}
32+
33+
void OnMessage (DataModels.MessageResponse resp)
34+
{
35+
foreach(DataModels.MessageIntent mi in resp.intents)
36+
Debug.Log("intent: " + mi.intent + ", confidence: " + mi.confidence);
37+
38+
Debug.Log("response: " + resp.output.text);
39+
}
40+
}

Examples/ServiceExamples/Scripts/ExampleConversation.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/ServiceExamples/Scripts/ExampleLanguageTranslation.cs renamed to Examples/ServiceExamples/Scripts/ExampleLanguageTranslator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
*/
1717

1818
using UnityEngine;
19-
using IBM.Watson.DeveloperCloud.Services.LanguageTranslation.v1;
19+
using IBM.Watson.DeveloperCloud.Services.LanguageTranslator.v1;
2020

21-
public class ExampleLanguageTranslation : MonoBehaviour {
22-
private LanguageTranslation m_Translate = new LanguageTranslation();
21+
public class ExampleLanguageTranslator : MonoBehaviour {
22+
private LanguageTranslator m_Translate = new LanguageTranslator();
2323
private string m_PharseToTranslate = "How do I get to the disco?";
2424

2525
void Start ()

Examples/ServiceExamples/Scripts/ExampleLanguageTranslation.cs.meta renamed to Examples/ServiceExamples/Scripts/ExampleLanguageTranslator.cs.meta

File renamed without changes.

Examples/WidgetExamples/ExampleLanguageTranslation.unity renamed to Examples/WidgetExamples/ExampleLanguageTranslator.unity

File renamed without changes.

Examples/WidgetExamples/ExampleLanguageTranslation.unity.meta renamed to Examples/WidgetExamples/ExampleLanguageTranslator.unity.meta

File renamed without changes.

Examples/WidgetExamples/Prefabs/ExampleLanguageTranslation.prefab renamed to Examples/WidgetExamples/Prefabs/ExampleLanguageTranslator.prefab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ GameObject:
440440
m_Component:
441441
- 224: {fileID: 22495556}
442442
m_Layer: 0
443-
m_Name: ExampleLanguageTranslation
443+
m_Name: ExampleLanguageTranslator
444444
m_TagString: Untagged
445445
m_Icon: {fileID: 0}
446446
m_NavMeshLayer: 0

Examples/WidgetExamples/Prefabs/ExampleLanguageTranslation.prefab.meta renamed to Examples/WidgetExamples/Prefabs/ExampleLanguageTranslator.prefab.meta

File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ GameObject:
185185
- 114: {fileID: 11410204}
186186
- 114: {fileID: 11489172}
187187
m_Layer: 0
188-
m_Name: LanguageTranslationWidget
188+
m_Name: LanguageTranslatorWidget
189189
m_TagString: Untagged
190190
m_Icon: {fileID: 0}
191191
m_NavMeshLayer: 0

0 commit comments

Comments
 (0)