Skip to content

Commit 6a81c41

Browse files
committed
renaming nlu to natural_language_understanding
1 parent aa04e06 commit 6a81c41

7 files changed

Lines changed: 17 additions & 11 deletions

File tree

examples/natural_language_understanding_v1.ipynb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@
7777
"editable": true
7878
},
7979
"outputs": [],
80-
"source": []
80+
"source": [
81+
""
82+
]
8183
}
8284
],
8385
"metadata": {
@@ -89,7 +91,7 @@
8991
"language_info": {
9092
"codemirror_mode": {
9193
"name": "ipython",
92-
"version": 3
94+
"version": 3.0
9395
},
9496
"file_extension": ".py",
9597
"mimetype": "text/x-python",
@@ -100,5 +102,5 @@
100102
}
101103
},
102104
"nbformat": 4,
103-
"nbformat_minor": 2
104-
}
105+
"nbformat_minor": 0
106+
}

examples/natural_language_understanding_v1.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,23 @@
77
import os
88
sys.path.append(os.path.join(os.getcwd(),'..'))
99
import watson_developer_cloud
10-
import watson_developer_cloud.nlu.features.v1 as features
10+
import watson_developer_cloud.natural_language_understanding.features.v1 as \
11+
features
1112

1213

1314
# In[3]:
1415

15-
nlu = watson_developer_cloud.NaturalLanguageUnderstandingV1(version='2016-01-23',
16-
username='USERNAME',
17-
password='PASSWORD')
16+
nlu = watson_developer_cloud.NaturalLanguageUnderstandingV1(
17+
version='2016-01-23',
18+
username='USERNAME',
19+
password='PASSWORD')
1820

1921

2022
# In[6]:
2123

22-
nlu.analyze(text='this is my experimental text. Bruce Banner is the Hulk and Bruce Wayne is BATMAN! Superman fears not Banner, but Wayne.',
24+
nlu.analyze(text='this is my experimental text. Bruce Banner is the Hulk'
25+
' and Bruce Wayne is BATMAN! Superman fears not Banner, '
26+
'but Wayne.',
2327
features=[features.Entities(), features.Keywords()])
2428

2529

test/test_natural_language_understanding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from unittest import TestCase
22
from watson_developer_cloud import NaturalLanguageUnderstandingV1
33
from watson_developer_cloud import WatsonException
4-
import watson_developer_cloud.nlu.features.v1 as features
4+
import watson_developer_cloud.natural_language_understanding.features.v1 as features
55
import pytest
66
import responses
77
import json

watson_developer_cloud/nlu/__init__.py renamed to watson_developer_cloud/natural_language_understanding/__init__.py

File renamed without changes.

watson_developer_cloud/nlu/features/__init__.py renamed to watson_developer_cloud/natural_language_understanding/features/__init__.py

File renamed without changes.

watson_developer_cloud/nlu/features/v1/__init__.py renamed to watson_developer_cloud/natural_language_understanding/features/v1/__init__.py

File renamed without changes.

watson_developer_cloud/natural_language_understanding_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class NaturalLanguageUnderstandingV1(WatsonDeveloperCloudService):
2121
"""
2222
All methods taking features use the feature classes
23-
from watson_developer_cloud/nlu/features/v1
23+
from watson_developer_cloud/natural_language_understanding/features/v1
2424
2525
"""
2626
base_url = 'https://gateway.watsonplatform.net'

0 commit comments

Comments
 (0)